diff --git a/modules/smime-module/pom.xml b/modules/smime-module/pom.xml index 8b8a111e..bb33cabd 100644 --- a/modules/smime-module/pom.xml +++ b/modules/smime-module/pom.xml @@ -34,7 +34,7 @@ org.simplejavamail utils-mail-smime - 2.3.0 + 2.3.1 diff --git a/modules/smime-module/src/main/java/org/simplejavamail/internal/smimesupport/SMIMESupport.java b/modules/smime-module/src/main/java/org/simplejavamail/internal/smimesupport/SMIMESupport.java index d1bceb89..eca1a838 100644 --- a/modules/smime-module/src/main/java/org/simplejavamail/internal/smimesupport/SMIMESupport.java +++ b/modules/smime-module/src/main/java/org/simplejavamail/internal/smimesupport/SMIMESupport.java @@ -448,13 +448,16 @@ private static SignerInformationVerifier getVerifier(X509Certificate certificate @NotNull @Override public MimeMessage signMessageWithSmime(@Nullable final Session session, @NotNull final Email email, @NotNull final MimeMessage messageToProtect, @NotNull final Pkcs12Config pkcs12Config) { - return SmimeUtil.sign(session, email.getId(), messageToProtect, retrieveSmimeKeyFromPkcs12Keystore(pkcs12Config)); + return SmimeUtil.sign(session, email.getId(), messageToProtect, retrieveSmimeKeyFromPkcs12Keystore(pkcs12Config), + SmimeUtil.DEFAULT_SIGNATURE_ALGORITHM_NAME); } @NotNull @Override public MimeMessage encryptMessageWithSmime(@Nullable final Session session, @NotNull final Email email, @NotNull final MimeMessage messageToProtect, @NotNull final X509Certificate x509Certificate) { - return SmimeUtil.encrypt(session, email.getId(), messageToProtect, x509Certificate); + return SmimeUtil.encrypt(session, messageToProtect, email.getId(), x509Certificate, + SmimeUtil.DEFAULT_KEY_ENCAPSULATION_ALGORITHM, + SmimeUtil.DEFAULT_CIPHER); } @Override