S/MIME is short for Secure/Multipurpose Internet Mail Extensions, a standard for public key encryption and signing of MIME data. The S/MIME standard allows you to sign, authenticate and encrypt plaintext MIME messages. It is commonly used in email. wolfSSL now supports both “enveloped data” (application/pkcs7-mime) and “detached signature” (multipart/signed) messages.
To enable S/MIME support in wolfSSL, run
./configure with the
--enable-smime flag, or add
HAVE_SMIME to your
user_settings.h file. Then, call
wolfSSL_SMIME_read_PKCS7() with 2 parameters:
- A BIO object containing your S/MIME message.
- A NULL BIO pointer which will be set to the signed data in case of a multipart message.
- This function call will give you a PKCS7 pointer, or NULL in case of an error.
If you have any questions, don’t hesitate to contact us at email@example.com.