Thank you. We are working on a patch.

Dear WolfCrypt Forum:

We have a requirement to include the timestamp token (defined in RFC3161https://tools.ietf.org/html/rfc3161 ) as unsignedAttribute to CMS message.

Currently the data structure, "struct PKCS7SignerInfo" does not seem to support such optional unsignedAttribute types (as defined in section 5.3 of RFC5652 https://tools.ietf.org/html/rfc5652#section-5.


Questions:
1. Are there pending patches that add the RFC3161 Timestamp Token as unsignedAttributes to CMS message?

2. if not, what is the best way to contribute a patch to add the said support?

Thank you very  much in advance,
-thomas

Thank you. Our first order of business is to build wolfcrypt into our C++ program, after that we can evaluate the CAdES-BES porting. We are struggling at the moment.

Yes we can refactor and use wc_PKCS7_* family of APIs.

Is there an utility in WC to convert client key and PK certificates from PEM to and from DER?

Now the biggest problem we face is the linking of wolfcrypt object files, compiled in clang, with the rest of the program compiled with clang++.

Does wolfcrypt require the runtime to provide  `strncasecmp'? I ask because of this linker error:

Error: TA/libseccamdemo64.a.p/.._subprojects_wolfssl_wolfcrypt_src_ecc.c.o(.text+0x1c34): undefined reference to `strncasecmp'

We are facing what look like C vs C++ linker problems:

Error: /pkg/qct/software/llvm/release/arm/8.0.12/aarch64-none-elf/lib/libc++.a(.text._ZNSt3__117iostream_categoryEv+0x4c): undefined reference to `__dso_handle'
Error: /pkg/qct/software/llvm/release/arm/8.0.12/aarch64-none-elf/lib/libc++.a(.text._ZNSt3__117__libcpp_sscanf_lEPKcP15__locale_structS1_z+0x60): undefined reference to `uselocale'

We have a desire to port a version of libcryto, wolfCrypt is in the running as an option, to a TEE environment that is fairly similar to a RTOS in terms of system libraries availability.

Our current implementation makes use of openssl/crypto/cms.c:

CMS_ContentInfo *CMS_sign(X509 *signcert, EVP_PKEY *pkey,
                          STACK_OF(X509) *certs, BIO *data,
                          unsigned int flags)

but with CMS_CADES in the "flags" argument to pick-up the new patch in OPENSSL 3.0.0-alpha4. https://github.com/openssl/openssl/pull/7893.

Question: the above patched added ASN.1 support for the CAdES-BES compliant, "ESS signing-certificate-v2" syntax.

Is it easy to port the above patch to wolfCrypt?