[java-opensaml COMMIT] in /trunk: opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/DecryptionParameters.java ope...
noreply at shibboleth.net
noreply at shibboleth.net
Fri Mar 14 16:38:55 EDT 2014
Author: putmanb
Date: Fri Mar 14 16:38:55 2014
New Revision: 3697
URL: http://svn.shibboleth.net/view/java-opensaml?rev=3697&view=rev
Log:
Extract some algorithm whitelist/blacklist storage and processing to base classes.
Implement basic SignatureValidationParametersResolver.
Added:
trunk/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/WhitelistBlacklistParameters.java (with props)
trunk/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/impl/AbstractSecurityParametersResolver.java (with props)
trunk/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/impl/BasicSignatureValidationParametersResolver.java (with props)
Modified:
trunk/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/DecryptionParameters.java
trunk/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/SignatureValidationParameters.java
trunk/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/impl/BasicDecryptionParametersResolver.java
trunk/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/impl/BasicWhitelistBlacklistConfiguration.java
Modified: trunk/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/DecryptionParameters.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/DecryptionParameters.java?rev=3697&r1=3696&r2=3697&view=diff
==============================================================================
--- trunk/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/DecryptionParameters.java (original)
+++ trunk/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/DecryptionParameters.java Fri Mar 14 16:38:55 2014
@@ -17,35 +17,15 @@
package org.opensaml.xmlsec;
-import java.util.Collection;
-import java.util.Collections;
-
-import javax.annotation.Nonnull;
import javax.annotation.Nullable;
-
-import net.shibboleth.utilities.java.support.annotation.constraint.NonnullElements;
-import net.shibboleth.utilities.java.support.annotation.constraint.NotLive;
-import net.shibboleth.utilities.java.support.annotation.constraint.Unmodifiable;
-import net.shibboleth.utilities.java.support.logic.Constraint;
import org.opensaml.xmlsec.encryption.support.EncryptedKeyResolver;
import org.opensaml.xmlsec.keyinfo.KeyInfoCredentialResolver;
-import com.google.common.base.Predicates;
-import com.google.common.collect.Collections2;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.Lists;
-
/**
* The effective parameters to use when decrypting encrypted XML.
*/
-public class DecryptionParameters {
-
- /** Whitelisted algorithm URIs. */
- @Nonnull @NonnullElements private Collection<String> whiteListedAlgorithmURIs;
-
- /** Blacklisted algorithm URIs. */
- @Nonnull @NonnullElements private Collection<String> blackListedAlgorithmURIs;
+public class DecryptionParameters extends WhitelistBlacklistParameters {
/** The EncryptedData's KeyInfo credential resolver. */
@Nullable private KeyInfoCredentialResolver dataKeyInfoCredentialResolver;
@@ -58,46 +38,7 @@
/** Constructor. */
public DecryptionParameters() {
- whiteListedAlgorithmURIs = Collections.emptyList();
- blackListedAlgorithmURIs = Collections.emptyList();
- }
-
- /**
- * Get the list of whitelisted algorithm URI's.
- *
- * @return the list of algorithms
- */
- @Nonnull @NonnullElements @NotLive @Unmodifiable public Collection<String> getWhitelistedAlgorithmURIs() {
- return ImmutableList.copyOf(whiteListedAlgorithmURIs);
- }
-
- /**
- * Set the list of whitelisted algorithm URI's.
- *
- * @param uris the list of algorithms
- */
- public void setWhitelistedAlgorithmURIs(@Nonnull @NonnullElements final Collection<String> uris) {
- Constraint.isNotNull(uris, "Whitelist cannot be null");
- whiteListedAlgorithmURIs = Lists.newArrayList(Collections2.filter(uris, Predicates.notNull()));
- }
-
- /**
- * Get the list of blacklisted algorithm URI's.
- *
- * @return the list of algorithms
- */
- @Nonnull @NonnullElements @NotLive @Unmodifiable public Collection<String> getBlacklistedAlgorithmsURIs() {
- return ImmutableList.copyOf(blackListedAlgorithmURIs);
- }
-
- /**
- * Set the list of blacklisted algorithm URI's.
- *
- * @param uris the list of algorithms
- */
- public void setBlacklistedAlgorithmURIs(@Nonnull @NonnullElements final Collection<String> uris) {
- Constraint.isNotNull(uris, "Blacklist cannot be null");
- blackListedAlgorithmURIs = Lists.newArrayList(Collections2.filter(uris, Predicates.notNull()));
+ super();
}
/**
Modified: trunk/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/SignatureValidationParameters.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/SignatureValidationParameters.java?rev=3697&r1=3696&r2=3697&view=diff
==============================================================================
[... 317 lines stripped ...]
More information about the commits
mailing list