Updates for changes in encryption defaults

This commit is contained in:
Spencer Gibb
2018-01-01 16:45:48 -05:00
parent 9b0c043f34
commit 4f54e73545
2 changed files with 4 additions and 3 deletions

View File

@@ -93,8 +93,8 @@ public class EncryptionAutoConfiguration {
KeyStoreTextEncryptorLocator locator = new KeyStoreTextEncryptorLocator(
new KeyStoreKeyFactory(keyStore.getLocation(), keyStore.getPassword().toCharArray()),
keyStore.getSecret(), keyStore.getAlias());
String algorithm = this.key.getRsa().getAlgorithm();
locator.setRsaAlgorithm(RsaAlgorithm.valueOf(algorithm.toUpperCase()));
RsaAlgorithm algorithm = this.key.getRsa().getAlgorithm();
locator.setRsaAlgorithm(algorithm);
locator.setSalt(this.key.getRsa().getSalt());
locator.setStrong(this.key.getRsa().isStrong());
return locator;

View File

@@ -18,7 +18,8 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
@RunWith(SpringRunner.class)
@SpringBootTest(classes = ConfigServerApplication.class, properties = "spring.cloud.bootstrap.name:enable-bootstrap",
@SpringBootTest(classes = ConfigServerApplication.class, properties = {"spring.cloud.bootstrap.name:enable-bootstrap",
"encrypt.rsa.algorithm=DEFAULT", "encrypt.rsa.strong=false"},
webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@ActiveProfiles({"test", "encrypt"})
public class BootstrapConfigServerIntegrationTests {