fixes gh-953 (#963)

This commit is contained in:
bberto
2021-06-01 15:45:00 +02:00
committed by GitHub
parent 28d0bc407d
commit 65df30f420
3 changed files with 14 additions and 2 deletions

View File

@@ -49,6 +49,18 @@ public class EncryptionBootstrapConfigurationTests {
context.close();
}
@Test
public void rsaPkcs12KeyStore() {
ConfigurableApplicationContext context = new SpringApplicationBuilder(EncryptionBootstrapConfiguration.class)
.web(WebApplicationType.NONE)
.properties("encrypt.keyStore.location:classpath:/server.p12", "encrypt.keyStore.password:letmein",
"encrypt.keyStore.alias:mytestkey", "encrypt.keyStore.type:PKCS12")
.run();
TextEncryptor encryptor = context.getBean(TextEncryptor.class);
then(encryptor.decrypt(encryptor.encrypt("foo"))).isEqualTo("foo");
context.close();
}
@Test
public void rsaKeyStoreWithRelaxedProperties() {
ConfigurableApplicationContext context = new SpringApplicationBuilder(EncryptionBootstrapConfiguration.class)