[java-opensaml COMMIT] in /trunk/opensaml-saml-impl/src: main/java/org/opensaml/saml/security/impl/SAMLMetadataEncryp...
noreply at shibboleth.net
noreply at shibboleth.net
Wed Sep 24 22:40:26 EDT 2014
Author: putmanb
Date: Wed Sep 24 22:40:25 2014
New Revision: 4065
URL: http://svn.shibboleth.net/view/java-opensaml?rev=4065&view=rev
Log:
Rename config flag on SAML metadata encryption params resolver to more clearly relate what it does.
Modified:
trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/security/impl/SAMLMetadataEncryptionParametersResolver.java
trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/security/impl/SAMLMetadataEncryptionParametersResolverTest.java
Modified: trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/security/impl/SAMLMetadataEncryptionParametersResolver.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/security/impl/SAMLMetadataEncryptionParametersResolver.java?rev=4065&r1=4064&r2=4065&view=diff
==============================================================================
--- trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/security/impl/SAMLMetadataEncryptionParametersResolver.java (original)
+++ trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/security/impl/SAMLMetadataEncryptionParametersResolver.java Wed Sep 24 22:40:25 2014
@@ -37,6 +37,7 @@
import org.opensaml.security.credential.UsageType;
import org.opensaml.security.criteria.UsageCriterion;
import org.opensaml.security.crypto.KeySupport;
+import org.opensaml.xmlsec.EncryptionConfiguration;
import org.opensaml.xmlsec.EncryptionParameters;
import org.opensaml.xmlsec.KeyTransportAlgorithmPredicate;
import org.opensaml.xmlsec.algorithm.AlgorithmSupport;
@@ -74,9 +75,9 @@
/** Metadata credential resolver. */
private MetadataCredentialResolver credentialResolver;
- /** Flag indicating whether the resolver should attempt to complete a partially-resolved RSAOAEPParameters instance
- * by delegating to the superclass local config resolution process. */
- private boolean completePartialRSAOAEPParametersFromConfig;
+ /** Flag indicating whether the resolver should attempt to merge RSAOAEPParameters values resolved
+ * from metadata with additional parameters from supplied instances of {@link EncryptionConfiguration}. */
+ private boolean mergeMetadataRSAOAEPParametersWithConfig;
/**
* Constructor.
@@ -88,21 +89,29 @@
}
/**
- * Determine whether to complete partially resolved RSA OAEP parameters by delegating to local configuration.
- *
- * @return true if should complete partial parameters instances, false otherwise
- */
- public boolean isCompletePartialRSAOAEPParametersFromConfig() {
- return completePartialRSAOAEPParametersFromConfig;
- }
-
- /**
- * Set whether to complete partially resolved RSA OAEP parameters by delegating to local configuration.
- *
- * @param flag true if should complete partial parameters instances, false otherwise
- */
- public void setCompletePartialRSAOAEPParametersFromConfig(boolean flag) {
- completePartialRSAOAEPParametersFromConfig = flag;
+ * Determine whether the resolver should attempt to merge RSAOAEPParameters values resolved
+ * from metadata with additional parameters from supplied instances of
+ * {@link EncryptionConfiguration}.
+ *
+ * <p>Defaults to: <code>false</code>
+ *
+ * @return true if should merge metadata parameters with configuration, false otherwise
+ */
+ public boolean isMergeMetadataRSAOAEPParametersWithConfig() {
+ return mergeMetadataRSAOAEPParametersWithConfig;
+ }
+
+ /**
+ * Set whether the resolver should attempt to merge RSAOAEPParameters values resolved
+ * from metadata with additional parameters from supplied instances of
+ * {@link EncryptionConfiguration}.
+ *
+ * <p>Defaults to: <code>false</code>
+ *
+ * @param flag true if should merge metadata parameters with configuration, false otherwise
+ */
+ public void setMergeMetadataRSAOAEPParametersWithConfig(boolean flag) {
+ mergeMetadataRSAOAEPParametersWithConfig = flag;
}
/**
@@ -180,9 +189,9 @@
* <p>
* This method itself resolves the parameters data from the metadata {@link EncryptionMethod}. If
* this results in a non-complete RSAOAEPParameters instance and if
- * {@link #isCompletePartialRSAOAEPParametersFromConfig()} evaluates true,
+ * {@link #isMergeMetadataRSAOAEPParametersWithConfig()} evaluates true,
* then the resolver will delegate to the local config resolution process via the superclass
- * for completion of any missing parameters
+ * to attempt to resolve and merge any null parameter values.
* (see {@link #resolveAndPopulateRSAOAEPParams(EncryptionParameters, CriteriaSet, Predicate)}).
* </p>
*
@@ -219,7 +228,7 @@
} else if (params.getRSAOAEPParameters().isEmpty()) {
super.resolveAndPopulateRSAOAEPParams(params, criteria, whitelistBlacklistPredicate);
} else {
- if (isCompletePartialRSAOAEPParametersFromConfig()) {
[... 20 lines stripped ...]
More information about the commits
mailing list