bbottema / simple-java-mail

Simple API, Complex Emails (Jakarta Mail smtp wrapper)

Home Page:http://www.simplejavamail.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make S/MIME algorithms configurable (signature algorithm for signing, key encapsulation and cipher algorithms for encryption)

asariev opened this issue · comments

I think it was about time this was configurable. I'm almost done with it.

Feature released in 8.7.1.

Please refer to the documentation on signing and encrypting with S/MIME. You can now set any signature algorithm when signing and any key encapsulation algorithm and cipher algorithm when encrypting. Enjoy!

To give a specific example of your request:

Email emailToBeEncrypted = currentEmailBuilder
    .(..)
    .encryptWithSmime(SmimeEncryptConfig.builder()
		.x509Certificate(yourCertificate)
		.cipherAlgorithm("AES256_CBC")
		.build())
    .buildEmail();