Use relaxed property resolver in KeyCondition
Allows users to define properties like encrypt.key-store.password=letmein
fixes gh-191
(cherry picked from commit 7744b63)
This commit is contained in:
@@ -19,6 +19,20 @@ public class EncryptionBootstrapConfigurationTests {
|
||||
.run();
|
||||
TextEncryptor encryptor = context.getBean(TextEncryptor.class);
|
||||
assertEquals("foo", encryptor.decrypt(encryptor.encrypt("foo")));
|
||||
context.close();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void rsaKeyStoreWithRelaxedProperties() {
|
||||
ConfigurableApplicationContext context = new SpringApplicationBuilder(
|
||||
EncryptionBootstrapConfiguration.class).web(false).properties(
|
||||
"encrypt.key-store.location:classpath:/server.jks",
|
||||
"encrypt.key-store.password:letmein",
|
||||
"encrypt.key-store.alias:mytestkey", "encrypt.key-store.secret:changeme")
|
||||
.run();
|
||||
TextEncryptor encryptor = context.getBean(TextEncryptor.class);
|
||||
assertEquals("foo", encryptor.decrypt(encryptor.encrypt("foo")));
|
||||
context.close();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user