[java-shib-common COMMIT] in /branches/REL_1: doc/RELEASE-NOTES.txt src/main/java/edu/internet2/middleware/shibboleth...
noreply at shibboleth.net
noreply at shibboleth.net
Mon Aug 4 21:20:40 EDT 2014
Author: scantor
Date: Mon Aug 4 21:20:39 2014
New Revision: 1095
URL: http://svn.shibboleth.net/view/java-shib-common?rev=1095&view=rev
Log:
SC-191 - Credential config parsing of PublicKeys is broken in AbstractBasicCredentialBeanDefinitionParser
Added:
branches/REL_1/src/test/java/edu/internet2/middleware/shibboleth/common/config/security/BasicInlineParserTest.java (with props)
branches/REL_1/src/test/resources/data/edu/internet2/middleware/shibboleth/common/config/security/inlinePublicOnly.xml (with props)
branches/REL_1/src/test/resources/data/edu/internet2/middleware/shibboleth/common/config/security/inlinePublicPrivate.xml (with props)
Modified:
branches/REL_1/doc/RELEASE-NOTES.txt
branches/REL_1/src/main/java/edu/internet2/middleware/shibboleth/common/config/security/AbstractBasicCredentialBeanDefinitionParser.java
branches/REL_1/src/main/java/edu/internet2/middleware/shibboleth/common/config/security/AbstractCredentialBeanDefinitionParser.java
Modified: branches/REL_1/doc/RELEASE-NOTES.txt
URL: http://svn.shibboleth.net/view/java-shib-common/branches/REL_1/doc/RELEASE-NOTES.txt?rev=1095&r1=1094&r2=1095&view=diff
==============================================================================
--- branches/REL_1/doc/RELEASE-NOTES.txt (original)
+++ branches/REL_1/doc/RELEASE-NOTES.txt Mon Aug 4 21:20:39 2014
@@ -1,6 +1,7 @@
Changes in Release 1.4.1
=============================================
[SC-190] - Proxy password not handled correctly for SVNResource
+[SC-191] - Credential config parsing of PublicKeys is broken in AbstractBasicCredentialBeanDefinitionParser
Also, updating POM to implement:
[JXT-106] - Update Apache Santuario (xmlsec) to 1.5.6
Modified: branches/REL_1/src/main/java/edu/internet2/middleware/shibboleth/common/config/security/AbstractBasicCredentialBeanDefinitionParser.java
URL: http://svn.shibboleth.net/view/java-shib-common/branches/REL_1/src/main/java/edu/internet2/middleware/shibboleth/common/config/security/AbstractBasicCredentialBeanDefinitionParser.java?rev=1095&r1=1094&r2=1095&view=diff
==============================================================================
--- branches/REL_1/src/main/java/edu/internet2/middleware/shibboleth/common/config/security/AbstractBasicCredentialBeanDefinitionParser.java (original)
+++ branches/REL_1/src/main/java/edu/internet2/middleware/shibboleth/common/config/security/AbstractBasicCredentialBeanDefinitionParser.java Mon Aug 4 21:20:39 2014
@@ -26,6 +26,7 @@
import javax.xml.namespace.QName;
import org.opensaml.xml.security.SecurityHelper;
+import org.opensaml.xml.util.Base64;
import org.opensaml.xml.util.DatatypeHelper;
import org.opensaml.xml.util.XMLHelper;
import org.slf4j.Logger;
@@ -124,7 +125,8 @@
keyPasswordCharArray = keyPassword.toCharArray();
}
try {
- PublicKey pubKey = SecurityHelper.decodePublicKey(encodedKey, keyPasswordCharArray);
+ PublicKey pubKey = SecurityHelper.decodePublicKey(Base64.decode(encodedKey, 0, encodedKey.length),
+ keyPasswordCharArray);
builder.addPropertyValue("publicKey", pubKey);
} catch (KeyException e) {
throw new FatalBeanException("Unable to create credential, unable to parse public key", e);
Modified: branches/REL_1/src/main/java/edu/internet2/middleware/shibboleth/common/config/security/AbstractCredentialBeanDefinitionParser.java
URL: http://svn.shibboleth.net/view/java-shib-common/branches/REL_1/src/main/java/edu/internet2/middleware/shibboleth/common/config/security/AbstractCredentialBeanDefinitionParser.java?rev=1095&r1=1094&r2=1095&view=diff
==============================================================================
--- branches/REL_1/src/main/java/edu/internet2/middleware/shibboleth/common/config/security/AbstractCredentialBeanDefinitionParser.java (original)
+++ branches/REL_1/src/main/java/edu/internet2/middleware/shibboleth/common/config/security/AbstractCredentialBeanDefinitionParser.java Mon Aug 4 21:20:39 2014
@@ -27,6 +27,7 @@
import org.opensaml.xml.security.SecurityHelper;
import org.opensaml.xml.security.credential.UsageType;
+import org.opensaml.xml.util.Base64;
import org.opensaml.xml.util.DatatypeHelper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -127,7 +128,8 @@
keyPasswordCharArray = keyPassword.toCharArray();
}
try {
- PrivateKey privKey = SecurityHelper.decodePrivateKey(encodedKey, keyPasswordCharArray);
+ PrivateKey privKey = SecurityHelper.decodePrivateKey(Base64.decode(encodedKey, 0, encodedKey.length),
+ keyPasswordCharArray);
builder.addPropertyValue("privateKey", privKey);
} catch (KeyException e) {
throw new FatalBeanException("Unable to create credential, unable to parse private key", e);
More information about the commits
mailing list