[libopensaml2-java] 03/07: Imported Upstream version 2.6.2
Tony Mancill
tmancill at moszumanska.debian.org
Thu Aug 28 01:35:54 UTC 2014
This is an automated email from the git hooks/post-receive script.
tmancill pushed a commit to branch master
in repository libopensaml2-java.
commit f3836a05d6f859a8f74f85f80880f41b4904d4d4
Author: tony mancill <tmancill at debian.org>
Date: Wed Aug 27 17:52:03 2014 -0700
Imported Upstream version 2.6.2
---
.checkstyle | 2 +-
doc/RELEASE-NOTES.txt | 7 +++++++
pom.xml | 6 +++---
src/main/java/org/opensaml/DefaultBootstrap.java | 20 ++++++++++++++++++++
.../org/opensaml/saml1/core/AssertionArtifact.java | 14 +++++++++-----
.../java/org/opensaml/saml1/core/StatusCode.java | 14 ++++++++++----
.../java/org/opensaml/saml1/core/StatusDetail.java | 2 +-
.../java/org/opensaml/saml1/core/StatusMessage.java | 13 +++++++++----
src/main/java/org/opensaml/saml1/core/Subject.java | 2 +-
.../opensaml/saml2/core/RequestedAuthnContext.java | 2 +-
.../opensaml/security/SAMLMDCredentialContext.java | 10 ++++++++++
11 files changed, 72 insertions(+), 20 deletions(-)
diff --git a/.checkstyle b/.checkstyle
index 5f7bc9b..6055247 100644
--- a/.checkstyle
+++ b/.checkstyle
@@ -3,7 +3,7 @@
<fileset-config file-format-version="1.2.0" simple-config="false" sync-formatter="false">
<local-check-config name="Shibboleth Checkstyle" type="remote" description=""
- location="https://svn.shibboleth.net/java-parent-projects/java-parent-project-v2/tags/1/resources/checkstyle/checkstyle.xml" >
+ location="https://svn.shibboleth.net/java-parent-projects/java-parent-project-v2/tags/2/resources/checkstyle/checkstyle.xml" >
<additional-data name="cache-file" value="true"/>
<additional-data name="cache-props-file-location" value="null_1312636288299_cache.properties"/>
<additional-data name="cache-file-location" value="null_1312636288299_cache.xml"/>
diff --git a/doc/RELEASE-NOTES.txt b/doc/RELEASE-NOTES.txt
index 0006a1d..4d5262b 100644
--- a/doc/RELEASE-NOTES.txt
+++ b/doc/RELEASE-NOTES.txt
@@ -1,3 +1,10 @@
+Changes in Release 2.6.2
+=============================================
+[JOST-223] - Misspelled error constant in SAML 1 StatusCode interface
+[JOST-224] - Superfluous/wrong type constants in SAML 1 and SAML 2 interfaces
+[JOST-226] - Mispelled method name in SAMLMDCredentialContext, getEncryptionMethod vs getEncryptionMethods
+[JOST-238] - https:// URLs with HttpResource or FileBackedHttpResource are vulnerable to MitM attacks (missing hostname verification)
+
Changes in Release 2.6.1
=============================================
[JOST-210] - AbstractSAMLObject should not override equals but not hashCode
diff --git a/pom.xml b/pom.xml
index 57772f3..f7a08b5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -7,12 +7,12 @@
<parent>
<groupId>net.shibboleth</groupId>
<artifactId>parent-v2</artifactId>
- <version>1</version>
+ <version>2</version>
</parent>
<groupId>org.opensaml</groupId>
<artifactId>opensaml</artifactId>
- <version>2.6.2-SNAPSHOT</version>
+ <version>2.6.2</version>
<packaging>jar</packaging>
<name>OpenSAML-J</name>
@@ -47,7 +47,7 @@
<dependency>
<groupId>org.opensaml</groupId>
<artifactId>openws</artifactId>
- <version>1.5.2-SNAPSHOT</version>
+ <version>1.5.2</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
diff --git a/src/main/java/org/opensaml/DefaultBootstrap.java b/src/main/java/org/opensaml/DefaultBootstrap.java
index f503320..f9ec444 100644
--- a/src/main/java/org/opensaml/DefaultBootstrap.java
+++ b/src/main/java/org/opensaml/DefaultBootstrap.java
@@ -17,9 +17,12 @@
package org.opensaml;
+import org.apache.commons.httpclient.protocol.Protocol;
+import org.apache.commons.httpclient.protocol.ProtocolSocketFactory;
import org.apache.xml.security.Init;
import org.opensaml.saml1.binding.artifact.SAML1ArtifactBuilderFactory;
import org.opensaml.saml2.binding.artifact.SAML2ArtifactBuilderFactory;
+import org.opensaml.ws.soap.client.http.TLSProtocolSocketFactory;
import org.opensaml.xml.ConfigurationException;
import org.opensaml.xml.XMLConfigurator;
import org.opensaml.xml.parse.StaticBasicParserPool;
@@ -33,6 +36,10 @@ import org.slf4j.LoggerFactory;
* This class can be used to bootstrap the OpenSAML library with the default configurations that ship with the library.
*/
public class DefaultBootstrap {
+
+ /** System property used to disable global default HTTPS hostname verification in Apache Commons HttpClient. */
+ public static final String SYSPROP_HTTPCLIENT_HTTPS_DISABLE_HOSTNAME_VERIFICATION =
+ "org.opensaml.httpclient.https.disableHostnameVerification";
/** List of default XMLTooling configuration files. */
private static String[] xmlToolingConfigs = {
@@ -98,6 +105,19 @@ public class DefaultBootstrap {
initializeParserPool();
initializeESAPI();
+
+ initializeHttpClient();
+ }
+
+ /**
+ * Initializes the Apache Commons HttpClient library.
+ */
+ protected static void initializeHttpClient() {
+ if (!Boolean.getBoolean(SYSPROP_HTTPCLIENT_HTTPS_DISABLE_HOSTNAME_VERIFICATION)) {
+ ProtocolSocketFactory socketFactory =
+ new TLSProtocolSocketFactory(null, null, org.apache.commons.ssl.HostnameVerifier.STRICT);
+ Protocol.registerProtocol("https", new Protocol("https", socketFactory, 443));
+ }
}
/**
diff --git a/src/main/java/org/opensaml/saml1/core/AssertionArtifact.java b/src/main/java/org/opensaml/saml1/core/AssertionArtifact.java
index f32a2a4..11a8315 100644
--- a/src/main/java/org/opensaml/saml1/core/AssertionArtifact.java
+++ b/src/main/java/org/opensaml/saml1/core/AssertionArtifact.java
@@ -21,6 +21,7 @@ import javax.xml.namespace.QName;
import org.opensaml.common.SAMLObject;
import org.opensaml.common.xml.SAMLConstants;
+import org.opensaml.xml.schema.XSString;
/**
* This interface is for the SAML1 <code> AssertionArtifact </code> extention point.
@@ -34,12 +35,15 @@ public interface AssertionArtifact extends SAMLObject {
public static final QName DEFAULT_ELEMENT_NAME = new QName(SAMLConstants.SAML10P_NS, DEFAULT_ELEMENT_LOCAL_NAME,
SAMLConstants.SAML1P_PREFIX);
- /** Local name of the XSI type. */
- public static final String TYPE_LOCAL_NAME = "AssertionArtifactType";
+ /** Local name of the XSI type.
+ * @deprecated no replacement
+ */
+ public static final String TYPE_LOCAL_NAME = XSString.TYPE_LOCAL_NAME;
- /** QName of the XSI type. */
- public static final QName TYPE_NAME = new QName(SAMLConstants.SAML10P_NS, TYPE_LOCAL_NAME,
- SAMLConstants.SAML1P_PREFIX);
+ /** QName of the XSI type.
+ * @deprecated no replacement
+ */
+ public static final QName TYPE_NAME = XSString.TYPE_NAME;
/**
* Get the contents of the artifact.
diff --git a/src/main/java/org/opensaml/saml1/core/StatusCode.java b/src/main/java/org/opensaml/saml1/core/StatusCode.java
index a0cd157..b6805a1 100644
--- a/src/main/java/org/opensaml/saml1/core/StatusCode.java
+++ b/src/main/java/org/opensaml/saml1/core/StatusCode.java
@@ -62,11 +62,17 @@ public interface StatusCode extends SAMLObject {
public static final QName REQUEST_VERSION_TOO_LOW = new QName(SAMLConstants.SAML10P_NS, "RequestVersionTooLow",
SAMLConstants.SAML1P_PREFIX);
- /** RequestVersionDepricated status value. */
- public static final QName REQUEST_VERSION_DEPRICATED = new QName(SAMLConstants.SAML10P_NS,
- "RequestVersionDepricated", SAMLConstants.SAML1P_PREFIX);
+ /** RequestVersionDeprecated status value. */
+ public static final QName REQUEST_VERSION_DEPRECATED = new QName(SAMLConstants.SAML10P_NS,
+ "RequestVersionDeprecated", SAMLConstants.SAML1P_PREFIX);
- /** TooManyResponses status value. */
+ /**
+ * RequestVersionDepricated status value <i>(sic)</i>.
+ *
+ * @deprecated due to typo, use {@link #REQUEST_VERSION_DEPRECATED} instead.
+ * */
+ public static final QName REQUEST_VERSION_DEPRICATED = REQUEST_VERSION_DEPRECATED;
+
public static final QName TOO_MANY_RESPONSES = new QName(SAMLConstants.SAML10P_NS, "TooManyResponses",
SAMLConstants.SAML1P_PREFIX);
diff --git a/src/main/java/org/opensaml/saml1/core/StatusDetail.java b/src/main/java/org/opensaml/saml1/core/StatusDetail.java
index 9a1b4f5..3480417 100644
--- a/src/main/java/org/opensaml/saml1/core/StatusDetail.java
+++ b/src/main/java/org/opensaml/saml1/core/StatusDetail.java
@@ -37,7 +37,7 @@ public interface StatusDetail extends SAMLObject, ElementExtensibleXMLObject {
public final static QName DEFAULT_ELEMENT_NAME = new QName(SAMLConstants.SAML10P_NS, DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.SAML1P_PREFIX);
/** Local name of the XSI type */
- public final static String TYPE_LOCAL_NAME = "StatusDetailype";
+ public final static String TYPE_LOCAL_NAME = "StatusDetailType";
/** QName of the XSI type */
public final static QName TYPE_NAME = new QName(SAMLConstants.SAML10P_NS, TYPE_LOCAL_NAME, SAMLConstants.SAML1P_PREFIX);
diff --git a/src/main/java/org/opensaml/saml1/core/StatusMessage.java b/src/main/java/org/opensaml/saml1/core/StatusMessage.java
index 13be54e..876aadb 100644
--- a/src/main/java/org/opensaml/saml1/core/StatusMessage.java
+++ b/src/main/java/org/opensaml/saml1/core/StatusMessage.java
@@ -21,6 +21,7 @@ import javax.xml.namespace.QName;
import org.opensaml.common.SAMLObject;
import org.opensaml.common.xml.SAMLConstants;
+import org.opensaml.xml.schema.XSString;
/**
* This interface defines how the object representing a SAML1 <code> StatusMessage </code> element behaves.
@@ -33,11 +34,15 @@ public interface StatusMessage extends SAMLObject {
/** Default element name */
public final static QName DEFAULT_ELEMENT_NAME = new QName(SAMLConstants.SAML10P_NS, DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.SAML1P_PREFIX);
- /** Local name of the XSI type */
- public final static String TYPE_LOCAL_NAME = "ActionType";
+ /** Local name of the XSI type
+ * @deprecated no replacement
+ */
+ public final static String TYPE_LOCAL_NAME = XSString.TYPE_LOCAL_NAME;
- /** QName of the XSI type */
- public final static QName TYPE_NAME = new QName(SAMLConstants.SAML10P_NS, TYPE_LOCAL_NAME, SAMLConstants.SAML1P_PREFIX);
+ /** QName of the XSI type
+ * @deprecated no replacement
+ */
+ public final static QName TYPE_NAME = XSString.TYPE_NAME;
/** Return the contents of this */
String getMessage();
diff --git a/src/main/java/org/opensaml/saml1/core/Subject.java b/src/main/java/org/opensaml/saml1/core/Subject.java
index 47ee29f..f782b1e 100644
--- a/src/main/java/org/opensaml/saml1/core/Subject.java
+++ b/src/main/java/org/opensaml/saml1/core/Subject.java
@@ -36,7 +36,7 @@ public interface Subject extends SAMLObject {
public final static QName DEFAULT_ELEMENT_NAME = new QName(SAMLConstants.SAML1_NS, DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.SAML1_PREFIX);
/** Local name of the XSI type */
- public final static String TYPE_LOCAL_NAME = "ActionType";
+ public final static String TYPE_LOCAL_NAME = "SubjectType";
/** QName of the XSI type */
public final static QName TYPE_NAME = new QName(SAMLConstants.SAML1_NS, TYPE_LOCAL_NAME, SAMLConstants.SAML1_PREFIX);
diff --git a/src/main/java/org/opensaml/saml2/core/RequestedAuthnContext.java b/src/main/java/org/opensaml/saml2/core/RequestedAuthnContext.java
index 0740e60..b872b62 100644
--- a/src/main/java/org/opensaml/saml2/core/RequestedAuthnContext.java
+++ b/src/main/java/org/opensaml/saml2/core/RequestedAuthnContext.java
@@ -41,7 +41,7 @@ public interface RequestedAuthnContext extends SAMLObject {
SAMLConstants.SAML20P_PREFIX);
/** Local name of the XSI type. */
- public static final String TYPE_LOCAL_NAME = "ActionType";
+ public static final String TYPE_LOCAL_NAME = "RequestedAuthnContextType";
/** QName of the XSI type. */
public static final QName TYPE_NAME = new QName(SAMLConstants.SAML20P_NS, TYPE_LOCAL_NAME,
diff --git a/src/main/java/org/opensaml/security/SAMLMDCredentialContext.java b/src/main/java/org/opensaml/security/SAMLMDCredentialContext.java
index eb75f3f..9770397 100644
--- a/src/main/java/org/opensaml/security/SAMLMDCredentialContext.java
+++ b/src/main/java/org/opensaml/security/SAMLMDCredentialContext.java
@@ -67,8 +67,18 @@ public class SAMLMDCredentialContext implements CredentialContext {
* Return the list of {@link EncryptionMethod}'s associated with credential context.
*
* @return a list of SAML metadata encryption method associated with this context
+ * @deprecated due to typo, use {@link #getEncryptionMethods()}.
*/
public List<EncryptionMethod> getEncryptionMethod() {
+ return getEncryptionMethods();
+ }
+
+ /**
+ * Return the list of {@link EncryptionMethod}'s associated with credential context.
+ *
+ * @return a list of SAML metadata encryption method associated with this context
+ */
+ public List<EncryptionMethod> getEncryptionMethods() {
return encMethods;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/libopensaml2-java.git
More information about the pkg-java-commits
mailing list