diff --git a/modules/core-module/src/main/java/org/simplejavamail/config/ConfigLoader.java b/modules/core-module/src/main/java/org/simplejavamail/config/ConfigLoader.java index 2600bbd5..b412a770 100644 --- a/modules/core-module/src/main/java/org/simplejavamail/config/ConfigLoader.java +++ b/modules/core-module/src/main/java/org/simplejavamail/config/ConfigLoader.java @@ -79,6 +79,9 @@ *
  • simplejavamail.smime.signing.key_alias
  • *
  • simplejavamail.smime.signing.key_password
  • *
  • simplejavamail.smime.encryption.certificate
  • + *
  • simplejavamail.smime.signing.algorithm
  • + *
  • simplejavamail.smime.encryption.key_encapsulation_algorithm
  • + *
  • simplejavamail.smime.encryption.cipher
  • *
  • simplejavamail.dkim.signing.private_key_file_or_data
  • *
  • simplejavamail.dkim.signing.selector
  • *
  • simplejavamail.dkim.signing.signing_domain
  • @@ -175,6 +178,9 @@ public enum Property { SMIME_SIGNING_KEYSTORE_PASSWORD("simplejavamail.smime.signing.keystore_password"), SMIME_SIGNING_KEY_ALIAS("simplejavamail.smime.signing.key_alias"), SMIME_SIGNING_KEY_PASSWORD("simplejavamail.smime.signing.key_password"), + SMIME_SIGNING_ALGORITHM("simplejavamail.smime.signing.algorithm"), + SMIME_ENCRYPTION_KEY_ENCAPSULATION_ALGORITHM("simplejavamail.smime.encryption.key_encapsulation_algorithm"), + SMIME_ENCRYPTION_CIPHER("simplejavamail.smime.encryption.cipher"), DKIM_PRIVATE_KEY_FILE_OR_DATA("simplejavamail.dkim.signing.private_key_file_or_data"), DKIM_SELECTOR("simplejavamail.dkim.signing.selector"), DKIM_SIGNING_DOMAIN("simplejavamail.dkim.signing.signing_domain"), diff --git a/modules/simple-java-mail/src/test/resources/simplejavamail.properties b/modules/simple-java-mail/src/test/resources/simplejavamail.properties index c3d11e7f..ae3ba22d 100644 --- a/modules/simple-java-mail/src/test/resources/simplejavamail.properties +++ b/modules/simple-java-mail/src/test/resources/simplejavamail.properties @@ -31,6 +31,9 @@ simplejavamail.smime.signing.keystore_password=letmein simplejavamail.smime.signing.key_alias=smime_test_user_alias simplejavamail.smime.signing.key_password=letmein simplejavamail.smime.encryption.certificate=src/test/resources/pkcs12/smime_test_user.pem.standard.crt +simplejavamail.smime.signing.algorithm= +simplejavamail.smime.encryption.key_encapsulation_algorithm= +simplejavamail.smime.encryption.cipher= simplejavamail.dkim.signing.private_key_file_or_data= simplejavamail.dkim.signing.selector= simplejavamail.dkim.signing.signing_domain= diff --git a/modules/spring-module/src/main/java/org/simplejavamail/springsupport/SimpleJavaMailSpringSupport.java b/modules/spring-module/src/main/java/org/simplejavamail/springsupport/SimpleJavaMailSpringSupport.java index 93b0eb18..3ca0dc46 100644 --- a/modules/spring-module/src/main/java/org/simplejavamail/springsupport/SimpleJavaMailSpringSupport.java +++ b/modules/spring-module/src/main/java/org/simplejavamail/springsupport/SimpleJavaMailSpringSupport.java @@ -75,6 +75,9 @@ *
  • simplejavamail.smime.signing.key_password
  • *
  • simplejavamail.smime.signing.key-password
  • *
  • simplejavamail.smime.encryption.certificate
  • + *
  • simplejavamail.smime.signing.algorithm
  • + *
  • simplejavamail.smime.encryption.key_encapsulation_algorithm
  • + *
  • simplejavamail.smime.encryption.cipher
  • *
  • simplejavamail.dkim.signing.private_key_file_or_data
  • *
  • simplejavamail.dkim.signing.private-key-file-or-data
  • *
  • simplejavamail.dkim.signing.selector
  • @@ -158,6 +161,9 @@ public MailerGenericBuilder loadGlobalConfigAndCreateDefaultMailer( @Nullable @Value("${simplejavamail.smime.signing.key_password:#{null}}") final String smimeSigningKeyPassword, @Nullable @Value("${simplejavamail.smime.signing.key-password:#{null}}") final String smimeSigningKeyPasswordSpringBoot, @Nullable @Value("${simplejavamail.smime.encryption.certificate:#{null}}") final String smimeEncryptionCertificate, + @Nullable @Value("${simplejavamail.smime.signing.algorithm:#{null}}") final String smimeSigningAlgorithm, + @Nullable @Value("${simplejavamail.smime.encryption.key_encapsulation_algorithm:#{null}}") final String smimeEncryptionKeyEncapsulationAlgorithm, + @Nullable @Value("${simplejavamail.smime.encryption.cipher:#{null}}") final String smimeEncryptionCipher, @Nullable @Value("${simplejavamail.dkim.signing.private_key_file_or_data:#{null}}") final String dkimSigningPrivateKeyFileOrData, @Nullable @Value("${simplejavamail.dkim.signing.private-key-file-or-data:#{null}}") final String dkimSigningPrivateKeyFileOrDataSpringBoot, @Nullable @Value("${simplejavamail.dkim.signing.selector:#{null}}") final String dkimSigningSelector, @@ -241,6 +247,15 @@ public MailerGenericBuilder loadGlobalConfigAndCreateDefaultMailer( } else { setNullableProperty(emailProperties, Property.SMIME_SIGNING_KEY_PASSWORD.key(), smimeSigningKeyPasswordSpringBoot); } + if (smimeSigningAlgorithm != null) { + setNullableProperty(emailProperties, Property.SMIME_SIGNING_ALGORITHM.key(), smimeSigningAlgorithm); + } + if (smimeEncryptionKeyEncapsulationAlgorithm != null) { + setNullableProperty(emailProperties, Property.SMIME_ENCRYPTION_KEY_ENCAPSULATION_ALGORITHM.key(), smimeEncryptionKeyEncapsulationAlgorithm); + } + if (smimeEncryptionCipher != null) { + setNullableProperty(emailProperties, Property.SMIME_ENCRYPTION_CIPHER.key(), smimeEncryptionCipher); + } setNullableProperty(emailProperties, Property.SMIME_ENCRYPTION_CERTIFICATE.key(), smimeEncryptionCertificate); if (dkimSigningPrivateKeyFileOrData != null) { setNullableProperty(emailProperties, Property.DKIM_PRIVATE_KEY_FILE_OR_DATA.key(), dkimSigningPrivateKeyFileOrData); diff --git a/modules/spring-module/src/test/resources/simplejavamail.properties b/modules/spring-module/src/test/resources/simplejavamail.properties index 662aa3f6..cbe1afa4 100644 --- a/modules/spring-module/src/test/resources/simplejavamail.properties +++ b/modules/spring-module/src/test/resources/simplejavamail.properties @@ -31,6 +31,9 @@ simplejavamail.smime.signing.keystore_password=letmein simplejavamail.smime.signing.key_alias=smime_test_user_alias simplejavamail.smime.signing.key_password=letmein simplejavamail.smime.encryption.certificate= +simplejavamail.smime.signing.algorithm= +simplejavamail.smime.encryption.key_encapsulation_algorithm= +simplejavamail.smime.encryption.cipher= simplejavamail.dkim.signing.private_key_file_or_data= simplejavamail.dkim.signing.selector= simplejavamail.dkim.signing.signing_domain=