Browse Source

Fix dependencies

pull/1255/head
Dave Syer 2 years ago
parent
commit
e090bd234f
  1. 2
      spring-cloud-commons-dependencies/pom.xml
  2. 2
      spring-cloud-context/src/main/java/org/springframework/cloud/context/encrypt/EncryptorFactory.java

2
spring-cloud-commons-dependencies/pom.xml

@ -15,7 +15,7 @@
<name>spring-cloud-commons-dependencies</name> <name>spring-cloud-commons-dependencies</name>
<description>Spring Cloud Commons Dependencies</description> <description>Spring Cloud Commons Dependencies</description>
<properties> <properties>
<spring-security-rsa.version>1.1.0</spring-security-rsa.version> <spring-security-rsa.version>1.1.1</spring-security-rsa.version>
</properties> </properties>
<dependencyManagement> <dependencyManagement>
<dependencies> <dependencies>

2
spring-cloud-context/src/main/java/org/springframework/cloud/context/encrypt/EncryptorFactory.java

@ -39,7 +39,7 @@ public class EncryptorFactory {
TextEncryptor encryptor; TextEncryptor encryptor;
if (data.contains("RSA PRIVATE KEY")) { if (data.contains("RSA PRIVATE KEY")) {
encryptor = new RsaSecretEncryptor(data); encryptor = new RsaSecretEncryptor(data.replaceAll("\\n *", ""));
} }
else if (data.startsWith("ssh-rsa") || data.contains("RSA PUBLIC KEY")) { else if (data.startsWith("ssh-rsa") || data.contains("RSA PUBLIC KEY")) {
throw new KeyFormatException(); throw new KeyFormatException();

Loading…
Cancel
Save