ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1720192 [4/33] - in /webservices/wss4j/trunk: bindings/src/main/java/org/apache/wss4j/binding/wss10/ bindings/src/main/java/org/apache/wss4j/binding/wss11/ bindings/src/main/java/org/apache/wss4j/binding/wssc13/ bindings/src/main/java/org/...
Date Tue, 15 Dec 2015 16:40:42 GMT
Modified: webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/ConfigurationConstants.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/ConfigurationConstants.java?rev=1720192&r1=1720191&r2=1720192&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/ConfigurationConstants.java (original)
+++ webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/ConfigurationConstants.java Tue Dec 15 16:40:37 2015
@@ -22,16 +22,16 @@ package org.apache.wss4j.common;
  * This class defines Configuration Constants that are shared between the DOM + StAX code. This
  * allows a user to configure both layers in the same way (e.g. via a Map).
  */
-public class ConfigurationConstants {  
+public class ConfigurationConstants {
 
     protected ConfigurationConstants() {
         // complete
     }
-    
+
     //
     // Action configuration tags
     //
-    
+
     /**
      * The action parameter. It is a blank separated list of actions to perform.
      * <p/>
@@ -46,12 +46,12 @@ public class ConfigurationConstants {
      * Perform a UsernameToken action.
      */
     public static final String USERNAME_TOKEN = "UsernameToken";
-    
+
     /**
      * Perform a UsernameTokenSignature action.
      */
     public static final String USERNAME_TOKEN_SIGNATURE = "UsernameTokenSignature";
-    
+
     /**
      * Perform a UsernameToken action with no password.
      */
@@ -61,7 +61,7 @@ public class ConfigurationConstants {
      * Perform an unsigned SAML Token action.
      */
     public static final String SAML_TOKEN_UNSIGNED = "SAMLTokenUnsigned";
-    
+
     /**
      * Perform a signed SAML Token action.
      */
@@ -74,7 +74,7 @@ public class ConfigurationConstants {
     public static final String SIGNATURE = "Signature";
 
     /**
-     * Perform an Encryption action. The encryption specific parameters define how 
+     * Perform an Encryption action. The encryption specific parameters define how
      * to encrypt, which keys to use, and so on.
      */
     public static final String ENCRYPT = "Encrypt";
@@ -83,7 +83,7 @@ public class ConfigurationConstants {
      * Add a timestamp to the security header.
      */
     public static final String TIMESTAMP = "Timestamp";
-    
+
     /**
      * Perform a Signature action with derived keys. The signature specific parameters define how
      * to sign, which keys to use, and so on.
@@ -91,40 +91,40 @@ public class ConfigurationConstants {
     public static final String SIGNATURE_DERIVED = "SignatureDerived";
 
     /**
-     * Perform an Encryption action with derived keys. The encryption specific parameters define how 
+     * Perform an Encryption action with derived keys. The encryption specific parameters define how
      * to encrypt, which keys to use, and so on.
      */
     public static final String ENCRYPT_DERIVED = "EncryptDerived";
-    
+
     /**
      * Perform a Signature action with a kerberos token. The signature specific parameters define how
      * to sign, which keys to use, and so on.
      */
     public static final String SIGNATURE_WITH_KERBEROS_TOKEN = "SignatureWithKerberosToken";
-    
+
     /**
      * Perform a Encryption action with a kerberos token. The signature specific parameters define how
      * to encrypt, which keys to use, and so on.
      */
     public static final String ENCRYPT_WITH_KERBEROS_TOKEN = "EncryptWithKerberosToken";
-    
+
     /**
-     * Add a kerberos token. 
+     * Add a kerberos token.
      */
     public static final String KERBEROS_TOKEN = "KerberosToken";
-    
+
     /**
-     * Add a "Custom" token. This token will be retrieved from a CallbackHandler via 
+     * Add a "Custom" token. This token will be retrieved from a CallbackHandler via
      * WSPasswordCallback.Usage.CUSTOM_TOKEN and written out as is in the security header.
      */
     public static final String CUSTOM_TOKEN = "CustomToken";
-    
+
     //
     // User properties
     //
 
     /**
-     * The actor or role name of the <code>wsse:Security</code> header. If this parameter 
+     * The actor or role name of the <code>wsse:Security</code> header. If this parameter
      * is omitted, the actor name is not set.
      * <p/>
      * The value of the actor or role has to match the receiver's setting
@@ -154,9 +154,9 @@ public class ConfigurationConstants {
      * </ul>
      */
     public static final String USER = "user";
-    
+
     /**
-     * The user's name for encryption. The encryption functions use the public key of 
+     * The user's name for encryption. The encryption functions use the public key of
      * this user's certificate to encrypt the generated symmetric key.
      * <p/>
      * If this parameter is not set, then the encryption
@@ -172,9 +172,9 @@ public class ConfigurationConstants {
      * </pre>
      */
     public static final String ENCRYPTION_USER = "encryptionUser";
-    
+
     /**
-     * The user's name for signature. This name is used as the alias name in the keystore 
+     * The user's name for signature. This name is used as the alias name in the keystore
      * to get user's certificate and private key to perform signing.
      * <p/>
      * If this parameter is not set, then the signature
@@ -196,19 +196,19 @@ public class ConfigurationConstants {
      * a large extent.
      */
     public static final String USE_REQ_SIG_CERT = "useReqSigCert";
-    
+
     //
     // Callback class and property file properties
     //
 
     /**
-     * This tag refers to the CallbackHandler implementation class used to obtain passwords. 
-     * The value of this tag must be the class name of a 
+     * This tag refers to the CallbackHandler implementation class used to obtain passwords.
+     * The value of this tag must be the class name of a
      * {@link javax.security.auth.callback.CallbackHandler} instance.
      * </p>
      * The callback function
      * {@link javax.security.auth.callback.CallbackHandler#handle(
-     * javax.security.auth.callback.Callback[])} gets an array of 
+     * javax.security.auth.callback.Callback[])} gets an array of
      * {@link org.apache.wss4j.common.ext.WSPasswordCallback} objects. Only the first entry of the
      * array is used. This object contains the username/keyname as identifier. The callback
      * handler must set the password or key associated with this identifier before it returns.
@@ -219,24 +219,24 @@ public class ConfigurationConstants {
      * </pre>
      */
     public static final String PW_CALLBACK_CLASS = "passwordCallbackClass";
-    
+
     /**
      * This tag refers to the CallbackHandler implementation object used to obtain
      * passwords. The value of this tag must be a
      * {@link javax.security.auth.callback.CallbackHandler} instance.
      * </p>
-     * Refer to {@link #PW_CALLBACK_CLASS} for further information about password callback 
+     * Refer to {@link #PW_CALLBACK_CLASS} for further information about password callback
      * handling.
      */
     public static final String PW_CALLBACK_REF = "passwordCallbackRef";
-    
+
     /**
      * This tag refers to the SAML CallbackHandler implementation class used to construct
-     * SAML Assertions. The value of this tag must be the class name of a 
+     * SAML Assertions. The value of this tag must be the class name of a
      * {@link javax.security.auth.callback.CallbackHandler} instance.
      */
     public static final String SAML_CALLBACK_CLASS = "samlCallbackClass";
-    
+
     /**
      * This tag refers to the SAML CallbackHandler implementation object used to construct
      * SAML Assertions. The value of this tag must be a
@@ -245,7 +245,7 @@ public class ConfigurationConstants {
     public static final String SAML_CALLBACK_REF = "samlCallbackRef";
 
     /**
-     * The path of the crypto property file to use for Signature creation. The classloader 
+     * The path of the crypto property file to use for Signature creation. The classloader
      * loads this file. Therefore it must be accessible via the classpath.
      * <p/>
      * To locate the implementation of the
@@ -260,7 +260,7 @@ public class ConfigurationConstants {
      * </pre>
      * The other contents of the property file depend on the implementation
      * of the {@link org.apache.wss4j.common.crypto.Crypto Crypto}
-     * interface. Please see the WSS4J website for more information on the Merlin property 
+     * interface. Please see the WSS4J website for more information on the Merlin property
      * tags and values.
      * </p>
      * The application may set this parameter using the following method:
@@ -271,38 +271,38 @@ public class ConfigurationConstants {
     public static final String SIG_PROP_FILE = "signaturePropFile";
 
     /**
-     * The key that holds a reference to the object holding complete information about 
+     * The key that holds a reference to the object holding complete information about
      * the signature Crypto implementation. This object can either be a Crypto instance or a
-     * <code>java.util.Properties</code> file, which should contain all information that 
+     * <code>java.util.Properties</code> file, which should contain all information that
      * would contain in an equivalent properties file which includes the Crypto implementation
      * class name.
-     * 
+     *
      * Refer to documentation of {@link #SIG_PROP_FILE}.
      */
     public static final String SIG_PROP_REF_ID = "signaturePropRefId";
-    
+
     /**
-     * The path of the crypto property file to use for Signature verification. The 
+     * The path of the crypto property file to use for Signature verification. The
      * classloader loads this file. Therefore it must be accessible via the classpath.
      * <p/>
      * Refer to documentation of {@link #SIG_PROP_FILE}.
      */
     public static final String SIG_VER_PROP_FILE = "signatureVerificationPropFile";
-    
+
     /**
-     * The key that holds a reference to the object holding complete information about 
+     * The key that holds a reference to the object holding complete information about
      * the signature verification Crypto implementation. This object can either be a Crypto
-     * instance or a <code>java.util.Properties</code> file, which should contain all 
-     * information that would contain in an equivalent properties file which includes the 
+     * instance or a <code>java.util.Properties</code> file, which should contain all
+     * information that would contain in an equivalent properties file which includes the
      * Crypto implementation class name.
-     * 
+     *
      * Refer to documentation of {@link #SIG_VER_PROP_FILE}.
      */
     public static final String SIG_VER_PROP_REF_ID = "signatureVerificationPropRefId";
-    
+
     /**
-     * The path of the crypto property file to use for Decryption. The classloader loads this 
-     * file. Therefore it must be accessible via the classpath. Refer to documentation of 
+     * The path of the crypto property file to use for Decryption. The classloader loads this
+     * file. Therefore it must be accessible via the classpath. Refer to documentation of
      * {@link #SIG_PROP_FILE} for more information about the contents of the Properties file.
      * <p/>
      * The application may set this parameter using the following method:
@@ -311,21 +311,21 @@ public class ConfigurationConstants {
      * </pre>
      */
     public static final String DEC_PROP_FILE = "decryptionPropFile";
-    
+
     /**
-     * The key that holds a reference to the object holding complete information about 
+     * The key that holds a reference to the object holding complete information about
      * the decryption Crypto implementation. This object can either be a Crypto instance or a
-     * <code>java.util.Properties</code> file, which should contain all information that 
+     * <code>java.util.Properties</code> file, which should contain all information that
      * would contain in an equivalent properties file which includes the Crypto implementation
      * class name.
-     * 
+     *
      * Refer to documentation of {@link #DEC_PROP_FILE}.
      */
     public static final String DEC_PROP_REF_ID = "decryptionPropRefId";
-    
+
     /**
-     * The path of the crypto property file to use for Encryption. The classloader loads this 
-     * file. Therefore it must be accessible via the classpath. Refer to documentation of 
+     * The path of the crypto property file to use for Encryption. The classloader loads this
+     * file. Therefore it must be accessible via the classpath. Refer to documentation of
      * {@link #SIG_PROP_FILE} for more information about the contents of the Properties file.
      * <p/>
      * The application may set this parameter using the following method:
@@ -334,29 +334,29 @@ public class ConfigurationConstants {
      * </pre>
      */
     public static final String ENC_PROP_FILE = "encryptionPropFile";
-    
+
     /**
-     * The key that holds a reference to the object holding complete information about 
+     * The key that holds a reference to the object holding complete information about
      * the encryption Crypto implementation. This object can either be a Crypto instance or a
-     * <code>java.util.Properties</code> file, which should contain all information that 
+     * <code>java.util.Properties</code> file, which should contain all information that
      * would contain in an equivalent properties file which includes the Crypto implementation
      * class name.
-     * 
+     *
      * Refer to documentation of {@link #ENC_PROP_FILE}.
      */
     public static final String ENC_PROP_REF_ID = "encryptionPropRefId";
-    
+
     //
     // Boolean configuration tags, e.g. the value should be "true" or "false".
     //
-    
+
     /**
      * Whether to enable signatureConfirmation or not. The default value is "false".
      */
     public static final String ENABLE_SIGNATURE_CONFIRMATION = "enableSignatureConfirmation";
-    
+
     /**
-     * Whether to set the mustUnderstand flag on an outbound message or not. The default 
+     * Whether to set the mustUnderstand flag on an outbound message or not. The default
      * setting is "true".
      * <p/>
      * The application may set this parameter using the following method:
@@ -365,7 +365,7 @@ public class ConfigurationConstants {
      * </pre>
      */
     public static final String MUST_UNDERSTAND = "mustUnderstand";
-    
+
     /**
      * Whether to ensure compliance with the Basic Security Profile (BSP) 1.1 or not. The
      * default value is "true".
@@ -376,89 +376,89 @@ public class ConfigurationConstants {
      * </pre>
      */
     public static final String IS_BSP_COMPLIANT = "isBSPCompliant";
-    
+
     /**
      * Whether to add an InclusiveNamespaces PrefixList as a CanonicalizationMethod
      * child when generating Signatures using WSConstants.C14N_EXCL_OMIT_COMMENTS.
      * The default is true.
      */
     public static final String ADD_INCLUSIVE_PREFIXES = "addInclusivePrefixes";
-    
+
     /**
      * Whether to add a Nonce Element to a UsernameToken. This only applies when the
      * password type is of type "text". A Nonce is automatically added for the "digest"
      * case. The default is false.
      */
     public static final String ADD_USERNAMETOKEN_NONCE = "addUsernameTokenNonce";
-    
+
     /**
      * Whether to add a Created Element to a UsernameToken. This only applies when the
      * password type is of type "text". A Created is automatically added for the "digest"
      * case. The default is false.
      */
     public static final String ADD_USERNAMETOKEN_CREATED = "addUsernameTokenCreated";
-    
+
     /**
      * This variable controls whether types other than PasswordDigest or PasswordText
      * are allowed when processing UsernameTokens. The default value is "false".
      */
     public static final String HANDLE_CUSTOM_PASSWORD_TYPES = "handleCustomPasswordTypes";
-    
+
     /**
-     * This variable controls whether a UsernameToken with no password element is allowed. 
-     * The default value is "false". Set it to "true" to allow deriving keys from UsernameTokens 
+     * This variable controls whether a UsernameToken with no password element is allowed.
+     * The default value is "false". Set it to "true" to allow deriving keys from UsernameTokens
      * or to support UsernameTokens for purposes other than authentication.
      */
     public static final String ALLOW_USERNAMETOKEN_NOPASSWORD = "allowUsernameTokenNoPassword";
-    
+
     /**
      * This variable controls whether (wsse) namespace qualified password types are
      * accepted when processing UsernameTokens. The default value is "false".
      */
-    public static final String ALLOW_NAMESPACE_QUALIFIED_PASSWORD_TYPES 
+    public static final String ALLOW_NAMESPACE_QUALIFIED_PASSWORD_TYPES
         = "allowNamespaceQualifiedPasswordTypes";
-    
+
     /**
      * This variable controls whether to enable Certificate Revocation List (CRL) checking
      * or not when verifying trust in a certificate. The default value is "false".
      */
     public static final String ENABLE_REVOCATION = "enableRevocation";
-    
+
     /**
      * This parameter sets whether to use a single certificate or a whole certificate
      * chain when constructing a BinarySecurityToken used for direct reference in
      * signature. The default is "true", meaning that only a single certificate is used.
      */
     public static final String USE_SINGLE_CERTIFICATE = "useSingleCertificate";
-    
+
     /**
      * This parameter sets whether to use the Username Token derived key for a MAC
      * or not. The default is "true".
      */
     public static final String USE_DERIVED_KEY_FOR_MAC = "useDerivedKeyForMAC";
-    
+
     /**
      * Set whether Timestamps have precision in milliseconds. This applies to the
      * creation of Timestamps only. The default value is "true".
      */
     public static final String TIMESTAMP_PRECISION = "precisionInMilliseconds";
-    
+
     /**
      * Set the value of this parameter to true to enable strict timestamp
      * handling. The default value is "true".
-     * 
+     *
      * Strict Timestamp handling: throw an exception if a Timestamp contains
      * an <code>Expires</code> element and the semantics of the request are
      * expired, i.e. the current time at the receiver is past the expires time.
      */
     public static final String TIMESTAMP_STRICT = "timestampStrict";
-    
+
     /**
      * Set the value of this parameter to true to require that a Timestamp must have
      * an "Expires" Element. The default is "false".
      */
     public static final String REQUIRE_TIMESTAMP_EXPIRES = "requireTimestampExpires";
-    
+
     /**
      * Defines whether to encrypt the symmetric encryption key or not. If true
      * (the default), the symmetric key used for encryption is encrypted in turn,
@@ -471,7 +471,7 @@ public class ConfigurationConstants {
      * </pre>
      */
     public static final String ENC_SYM_ENC_KEY = "encryptSymmetricEncryptionKey";
-    
+
     /**
      * Whether the engine needs to enforce EncryptedData elements are
      * in a signed subtree of the document. This can be used to prevent
@@ -479,7 +479,7 @@ public class ConfigurationConstants {
      * protection is selected.
      */
     public static final String REQUIRE_SIGNED_ENCRYPTED_DATA_ELEMENTS = "requireSignedEncryptedDataElements";
-    
+
     /**
      * Whether to allow the RSA v1.5 Key Transport Algorithm or not. Use of this algorithm
      * is discouraged, and so the default is "false".
@@ -490,48 +490,48 @@ public class ConfigurationConstants {
      * Whether to validate the SubjectConfirmation requirements of a received SAML Token
      * (sender-vouches or holder-of-key). The default is true.
      */
-    public static final String VALIDATE_SAML_SUBJECT_CONFIRMATION = 
+    public static final String VALIDATE_SAML_SUBJECT_CONFIRMATION =
         "validateSamlSubjectConfirmation";
-    
+
     /**
      * Whether to include the Signature Token in the security header as well or not. This is only
      * applicable to the IssuerSerial, Thumbprint and SKI Key Identifier cases. The default is false.
      */
     public static final String INCLUDE_SIGNATURE_TOKEN = "includeSignatureToken";
-    
+
     /**
-     * Whether to include the Encryption token (BinarySecurityToken) in the security header as well 
-     * or not. This is only applicable to the IssuerSerial, Thumbprint and SKI Key Identifier cases. 
+     * Whether to include the Encryption token (BinarySecurityToken) in the security header as well
+     * or not. This is only applicable to the IssuerSerial, Thumbprint and SKI Key Identifier cases.
      * The default is false.
      */
     public static final String INCLUDE_ENCRYPTION_TOKEN = "includeEncryptionToken";
-    
+
     /**
      * Whether to cache UsernameToken nonces. The default value is "true".
      */
     public static final String ENABLE_NONCE_CACHE = "enableNonceCache";
-    
+
     /**
-     * Whether to cache Timestamp Created Strings (these are only cached in conjunction with a message 
+     * Whether to cache Timestamp Created Strings (these are only cached in conjunction with a message
      * Signature). The default value is "true".
      */
     public static final String ENABLE_TIMESTAMP_CACHE = "enableTimestampCache";
-    
+
     /**
      * Whether to cache SAML2 Token Identifiers, if the token contains a "OneTimeUse" Condition.
      * The default value is "true".
      */
     public static final String ENABLE_SAML_ONE_TIME_USE_CACHE = "enableSamlOneTimeUseCache";
-    
+
     /**
-     * Whether to use the "http://docs.oasis-open.org/ws-sx/ws-secureconversation/200512" 
+     * Whether to use the "http://docs.oasis-open.org/ws-sx/ws-secureconversation/200512"
      * namespace for SecureConversation + Derived Keys. If set to "false", it will use the
      * namespace "http://schemas.xmlsoap.org/ws/2005/02/sc".
-     * 
+     *
      * The default is true.
      */
     public static final String USE_2005_12_NAMESPACE = "use200512Namespace";
-    
+
     /**
      * Whether to get a secret key from a CallbackHandler or not for encryption only. The default is
      * false. If set to true WSS4J attempts to get the secret key from the CallbackHandler instead of
@@ -539,48 +539,48 @@ public class ConfigurationConstants {
      * if required.
      */
     public static final String GET_SECRET_KEY_FROM_CALLBACK_HANDLER = "getSecretKeyFromCallbackHandler";
-    
+
     /**
      * Whether to store bytes (CipherData or BinarySecurityToken) in an attachment. The default is false,
      * meaning that bytes are BASE-64 encoded and "inlined" in the message. Setting this to true is more
-     * efficient, as it means that the BASE-64 encoding step can be skipped. For this to work, a 
+     * efficient, as it means that the BASE-64 encoding step can be skipped. For this to work, a
      * CallbackHandler must be set on RequestData that can handle attachments.
      */
     public static final String STORE_BYTES_IN_ATTACHMENT = "storeBytesInAttachment";
-    
+
     /**
      * Whether to expand xop:Include Elements encountered when verifying a Signature. The default is true,
      * meaning that the relevant attachment bytes are BASE-64 encoded and inserted into the Element. This
      * ensures that the actual bytes are signed, and not just the reference.
      */
     public static final String EXPAND_XOP_INCLUDE_FOR_SIGNATURE = "expandXOPIncludeForSignature";
-    
+
     //
     // (Non-boolean) Configuration parameters for the actions/processors
     //
-    
+
     /**
      * Specific parameter for UsernameTokens to define the encoding of the password. It can
      * be used on either the outbound or inbound side. The valid values are:
-     * 
+     *
      * - PasswordDigest
      * - PasswordText
      * - PasswordNone
-     * 
+     *
      * On the Outbound side, the default value is PW_DIGEST. There is no default value on
      * the inbound side. If a value is specified on the inbound side, the password type of
      * the received UsernameToken must match the specified type, or an exception will be
      * thrown.
      */
     public static final String PASSWORD_TYPE = "passwordType";
-    
+
     /**
      * Defines which key identifier type to use for signature. The WS-Security specifications
      * recommends to use the identifier type <code>IssuerSerial</code>.
-     * 
+     *
      * For signature <code>IssuerSerial</code>, <code>DirectReference</code>,
      * <code>X509KeyIdentifier</code>, <code>Thumbprint</code>, <code>SKIKeyIdentifier</code>
-     * and <code>KeyValue</code> are valid only. 
+     * and <code>KeyValue</code> are valid only.
      * <p/>
      * The default is <code>IssuerSerial</code>.
      * <p/>
@@ -592,28 +592,28 @@ public class ConfigurationConstants {
     public static final String SIG_KEY_ID = "signatureKeyIdentifier";
 
     /**
-     * Defines which signature algorithm to use. The default is set by the data in the 
+     * Defines which signature algorithm to use. The default is set by the data in the
      * certificate, i.e. one of the following:
-     * 
+     *
      * "http://www.w3.org/2000/09/xmldsig#rsa-sha1"
      * "http://www.w3.org/2000/09/xmldsig#dsa-sha1"
-     * 
+     *
      * <p/>
      * The application may set this parameter using the following method:
      * <pre>
      * call.setProperty(
-     *     ConfigurationConstants.SIG_ALGO, 
+     *     ConfigurationConstants.SIG_ALGO,
      *     "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"
      * );
      * </pre>
      */
     public static final String SIG_ALGO = "signatureAlgorithm";
-    
+
     /**
      * Defines which signature digest algorithm to use. The default is:
-     * 
+     *
      * "http://www.w3.org/2000/09/xmldsig#sha1"
-     * 
+     *
      * <p/>
      * The application may set this parameter using the following method:
      * <pre>
@@ -623,7 +623,7 @@ public class ConfigurationConstants {
      * </pre>
      */
     public static final String SIG_DIGEST_ALGO = "signatureDigestAlgorithm";
-    
+
     /**
      * Defines which signature c14n (canonicalization) algorithm to use. The default is:
      * "http://www.w3.org/2001/10/xml-exc-c14n#"
@@ -651,11 +651,11 @@ public class ConfigurationConstants {
      * (<code>{}</code>).
      */
     public static final String SIGNATURE_PARTS = "signatureParts";
-    
+
     /**
      * Parameter to define which parts of the request shall be signed, if they
      * exist in the request. If they do not, then no error is thrown. This contrasts
-     * with the SIGNATURE_PARTS Identifier, which specifies elements that must be 
+     * with the SIGNATURE_PARTS Identifier, which specifies elements that must be
      * signed in the request.
      * <p/>
      * Refer to {@link #ENCRYPTION_PARTS} for a detailed description of
@@ -663,17 +663,17 @@ public class ConfigurationConstants {
      * <p/>
      */
     public static final String OPTIONAL_SIGNATURE_PARTS = "optionalSignatureParts";
-    
+
     /**
      * This parameter sets the number of iterations to use when deriving a key
-     * from a Username Token. The default is 1000. 
+     * from a Username Token. The default is 1000.
      */
     public static final String DERIVED_KEY_ITERATIONS = "derivedKeyIterations";
 
     /**
      * Defines which key identifier type to use for encryption. The WS-Security specifications
-     * recommends to use the identifier type <code>IssuerSerial</code>. For encryption 
-     * <code>IssuerSerial</code>, <code>DirectReference</code>, <code>X509KeyIdentifier</code>, 
+     * recommends to use the identifier type <code>IssuerSerial</code>. For encryption
+     * <code>IssuerSerial</code>, <code>DirectReference</code>, <code>X509KeyIdentifier</code>,
      * <code>Thumbprint</code>, <code>SKIKeyIdentifier</code>, <code>EncryptedKeySHA1</code>
      * and <code>EmbeddedKeyName</code> are valid only.
      * <p/>
@@ -689,17 +689,17 @@ public class ConfigurationConstants {
     /**
      * Defines which symmetric encryption algorithm to use. WSS4J supports the
      * following algorithms:
-     * 
+     *
      * "http://www.w3.org/2001/04/xmlenc#tripledes-cbc";
      * "http://www.w3.org/2001/04/xmlenc#aes128-cbc";
      * "http://www.w3.org/2001/04/xmlenc#aes256-cbc";
      * "http://www.w3.org/2001/04/xmlenc#aes192-cbc";
-     * 
-     * Except for AES 192 all of these algorithms are required by the XML Encryption 
+     *
+     * Except for AES 192 all of these algorithms are required by the XML Encryption
      * specification. The default algorithm is:
-     * 
+     *
      * "http://www.w3.org/2001/04/xmlenc#aes128-cbc"
-     * 
+     *
      * <p/>
      * The application may set this parameter using the following method:
      * <pre>
@@ -711,9 +711,9 @@ public class ConfigurationConstants {
     /**
      * Defines which algorithm to use to encrypt the generated symmetric key.
      * The default algorithm is:
-     * 
+     *
      * "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"
-     * 
+     *
      * <p/>
      * The application may set this parameter using the following method:
      * <pre>
@@ -721,7 +721,7 @@ public class ConfigurationConstants {
      * </pre>
      */
     public static final String ENC_KEY_TRANSPORT = "encryptionKeyTransportAlgorithm";
-    
+
     /**
      * Parameter to define which parts of the request shall be encrypted.
      * <p/>
@@ -767,11 +767,11 @@ public class ConfigurationConstants {
      * <code>Content</code> mode by default.
      */
     public static final String ENCRYPTION_PARTS = "encryptionParts";
-    
+
     /**
      * Parameter to define which parts of the request shall be encrypted, if they
      * exist in the request. If they do not, then no error is thrown. This contrasts
-     * with the ENCRYPTION_PARTS Identifier, which specifies elements that must be 
+     * with the ENCRYPTION_PARTS Identifier, which specifies elements that must be
      * encrypted in the request.
      * <p/>
      * Refer to {@link #ENCRYPTION_PARTS} for a detailed description of
@@ -779,9 +779,9 @@ public class ConfigurationConstants {
      * <p/>
      */
     public static final String OPTIONAL_ENCRYPTION_PARTS = "optionalEncryptionParts";
-    
+
     /**
-     * Defines which encryption digest algorithm to use with the RSA OAEP Key Transport 
+     * Defines which encryption digest algorithm to use with the RSA OAEP Key Transport
      * algorithm for encryption. The default is SHA-1.
      * <p/>
      * The application may set this parameter using the following method:
@@ -808,7 +808,7 @@ public class ConfigurationConstants {
 
     /**
      * Time-To-Live is the time difference between creation and expiry time in
-     * seconds of the UsernameToken Created value. After this time the SOAP request 
+     * seconds of the UsernameToken Created value. After this time the SOAP request
      * is invalid (at least the security data shall be treated this way).
      * <p/>
      * If this parameter is not defined, contains a value less or equal
@@ -816,23 +816,23 @@ public class ConfigurationConstants {
      * 300 seconds (5 minutes).
      */
     public static final String TTL_USERNAMETOKEN = "utTimeToLive";
-    
+
     /**
      * This configuration tag specifies the time in seconds in the future within which
      * the Created time of an incoming UsernameToken is valid. The default value is "60",
      * to avoid problems where clocks are slightly askew. To reject all future-created
-     * UsernameTokens, set this value to "0". 
+     * UsernameTokens, set this value to "0".
      */
     public static final String TTL_FUTURE_USERNAMETOKEN = "utFutureTimeToLive";
-    
+
     /**
      * This configuration tag is a comma separated String of regular expressions which
      * will be applied to the subject DN of the certificate used for signature
-     * validation, after trust verification of the certificate chain associated with the 
+     * validation, after trust verification of the certificate chain associated with the
      * certificate.
      */
     public static final String SIG_SUBJECT_CERT_CONSTRAINTS = "sigSubjectCertConstraints";
-    
+
     /**
      * Time-To-Live is the time difference between creation and expiry time in
      * seconds in the WSS Timestamp. After this time the SOAP request is
@@ -843,81 +843,81 @@ public class ConfigurationConstants {
      * 300 seconds (5 minutes).
      */
     public static final String TTL_TIMESTAMP = "timeToLive";
-    
+
     /**
      * This configuration tag specifies the time in seconds in the future within which
      * the Created time of an incoming Timestamp is valid. The default value is "60",
      * to avoid problems where clocks are slightly askew. To reject all future-created
-     * Timestamps, set this value to "0". 
+     * Timestamps, set this value to "0".
      */
     public static final String TTL_FUTURE_TIMESTAMP = "futureTimeToLive";
-    
+
     /**
-     * This tag refers to a Map of QName, Object (Validator) instances to be used to 
+     * This tag refers to a Map of QName, Object (Validator) instances to be used to
      * validate tokens identified by their QName. For the DOM layer, the Object should
      * be a org.apache.wss4j.dom.validate.Validator instance. For the StAX layer, it
      * should be a org.apache.wss4j.stax.validate.Validator instance.
      */
     public static final String VALIDATOR_MAP = "validatorMap";
-    
+
     /**
      * This holds a reference to a ReplayCache instance used to cache UsernameToken nonces. The
      * default instance that is used is the EHCacheReplayCache.
      */
     public static final String NONCE_CACHE_INSTANCE = "nonceCacheInstance";
-    
+
     /**
      * This holds a reference to a ReplayCache instance used to cache Timestamp Created Strings. The
      * default instance that is used is the EHCacheReplayCache.
      */
     public static final String TIMESTAMP_CACHE_INSTANCE = "timestampCacheInstance";
-    
+
     /**
-     * This holds a reference to a ReplayCache instance used to cache SAML2 Token Identifier 
-     * Strings (if the token contains a OneTimeUse Condition). The default instance that is 
+     * This holds a reference to a ReplayCache instance used to cache SAML2 Token Identifier
+     * Strings (if the token contains a OneTimeUse Condition). The default instance that is
      * used is the EHCacheReplayCache.
      */
     public static final String SAML_ONE_TIME_USE_CACHE_INSTANCE = "samlOneTimeUseCacheInstance";
-    
+
     /**
-     * This holds a reference to a PasswordEncryptor instance, which is used to encrypt or 
+     * This holds a reference to a PasswordEncryptor instance, which is used to encrypt or
      * decrypt passwords in the Merlin Crypto implementation (or any custom Crypto implementations).
-     * 
-     * By default, WSS4J uses the JasyptPasswordEncryptor, which must be instantiated with a 
+     *
+     * By default, WSS4J uses the JasyptPasswordEncryptor, which must be instantiated with a
      * master password to use to decrypt keystore passwords in the Merlin Crypto properties file.
      * This master password is obtained via the CallbackHandler defined via PW_CALLBACK_CLASS
      * or PW_CALLBACK_REF.
-     * 
+     *
      * The encrypted passwords must be stored in the format "ENC(encoded encrypted password)".
      */
     public static final String PASSWORD_ENCRYPTOR_INSTANCE = "passwordEncryptorInstance";
-    
+
     /**
      * This controls the deriving token from which DerivedKeyTokens derive keys from.
      * Valid values are:
      *  - DirectReference: A reference to a BinarySecurityToken
      *  - EncryptedKey: A reference to an EncryptedKey
-     *  - SecurityContextToken: A reference to a SecurityContextToken 
+     *  - SecurityContextToken: A reference to a SecurityContextToken
      */
     public static final String DERIVED_TOKEN_REFERENCE = "derivedTokenReference";
-    
+
     /**
      * This controls the key identifier of Derived Tokens, i.e. how they reference the deriving key.
      */
     public static final String DERIVED_TOKEN_KEY_ID = "derivedTokenKeyIdentifier";
-    
+
     /**
      * The length to use (in bytes) when deriving a key for Signature. If this is not specified,
      * it defaults to a value based on the signature algorithm.
      */
     public static final String DERIVED_SIGNATURE_KEY_LENGTH = "derivedSignatureKeyLength";
-    
+
     /**
      * The length to use (in bytes) when deriving a key for Encryption. If this is not specified,
      * it defaults to a value based on the encryption algorithm.
      */
     public static final String DERIVED_ENCRYPTION_KEY_LENGTH = "derivedEncryptionKeyLength";
-    
-    
+
+
 }
 

Modified: webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/EncryptionActionToken.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/EncryptionActionToken.java?rev=1720192&r1=1720191&r2=1720192&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/EncryptionActionToken.java (original)
+++ webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/EncryptionActionToken.java Tue Dec 15 16:40:37 2015
@@ -22,14 +22,14 @@ package org.apache.wss4j.common;
 /**
  * This class encapsulates configuration for Encryption Actions.
  */
-public class EncryptionActionToken extends SignatureEncryptionActionToken {  
+public class EncryptionActionToken extends SignatureEncryptionActionToken {
 
     private boolean encSymmetricEncryptionKey = true;
     private String mgfAlgorithm;
     private String symmetricAlgorithm;
     private String keyTransportAlgorithm;
     private boolean getSymmetricKeyFromCallbackHandler;
-    
+
     public boolean isEncSymmetricEncryptionKey() {
         return encSymmetricEncryptionKey;
     }
@@ -60,6 +60,6 @@ public class EncryptionActionToken exten
     public void setGetSymmetricKeyFromCallbackHandler(boolean getSymmetricKeyFromCallbackHandler) {
         this.getSymmetricKeyFromCallbackHandler = getSymmetricKeyFromCallbackHandler;
     }
- 
+
 }
 

Modified: webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/NamePasswordCallbackHandler.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/NamePasswordCallbackHandler.java?rev=1720192&r1=1720191&r2=1720192&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/NamePasswordCallbackHandler.java (original)
+++ webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/NamePasswordCallbackHandler.java Tue Dec 15 16:40:37 2015
@@ -27,56 +27,56 @@ import javax.security.auth.callback.Name
 import javax.security.auth.callback.PasswordCallback;
 import javax.security.auth.callback.UnsupportedCallbackException;
 
-public class NamePasswordCallbackHandler implements CallbackHandler {  
+public class NamePasswordCallbackHandler implements CallbackHandler {
 
-    private static final org.slf4j.Logger LOG = 
+    private static final org.slf4j.Logger LOG =
         org.slf4j.LoggerFactory.getLogger(NamePasswordCallbackHandler.class);
-    
+
     private static final String PASSWORD_CALLBACK_NAME = "setObject";
-    private static final Class<?>[] PASSWORD_CALLBACK_TYPES = 
+    private static final Class<?>[] PASSWORD_CALLBACK_TYPES =
         new Class<?>[]{Object.class, char[].class, String.class};
-    
-    private String username;  
-    private String password;  
-    
+
+    private String username;
+    private String password;
+
     private String passwordCallbackName;
-    
-    public NamePasswordCallbackHandler(String username, String password) {  
-        this(username, password, null);  
-    }  
-     
-    public NamePasswordCallbackHandler(String username, String password, String passwordCallbackName) {  
-        this.username = username;  
+
+    public NamePasswordCallbackHandler(String username, String password) {
+        this(username, password, null);
+    }
+
+    public NamePasswordCallbackHandler(String username, String password, String passwordCallbackName) {
+        this.username = username;
         this.password = password;
         this.passwordCallbackName = passwordCallbackName;
-    }  
+    }
 
-    public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {  
-        for (int i = 0; i < callbacks.length; i++) {  
+    public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
+        for (int i = 0; i < callbacks.length; i++) {
             Callback callback = callbacks[i];
             if (handleCallback(callback)) {
                 continue;
-            } else if (callback instanceof NameCallback) {  
-                ((NameCallback) callback).setName(username);  
-            } else if (callback instanceof PasswordCallback) {  
-                PasswordCallback pwCallback = (PasswordCallback) callback;  
+            } else if (callback instanceof NameCallback) {
+                ((NameCallback) callback).setName(username);
+            } else if (callback instanceof PasswordCallback) {
+                PasswordCallback pwCallback = (PasswordCallback) callback;
                 pwCallback.setPassword(password.toCharArray());
             } else if (!invokePasswordCallback(callback)) {
                 LOG.error("Unsupported callback type " + callbacks[i].getClass().getName());
-                throw new UnsupportedCallbackException(callbacks[i], "Unsupported callback type " + callbacks[i].getClass().getName());  
-            }  
-        }  
-    }      
-    
+                throw new UnsupportedCallbackException(callbacks[i], "Unsupported callback type " + callbacks[i].getClass().getName());
+            }
+        }
+    }
+
     protected boolean handleCallback(Callback callback) {
         return false;
     }
-    
+
     /*
-     * This method is called from the handle(Callback[]) method when the specified callback 
-     * did not match any of the known callback classes. It looks for the callback method 
+     * This method is called from the handle(Callback[]) method when the specified callback
+     * did not match any of the known callback classes. It looks for the callback method
      * having the specified method name with one of the supported parameter types.
-     * If found, it invokes the callback method on the object and returns true. 
+     * If found, it invokes the callback method on the object and returns true.
      * If not, it returns false.
      */
     private boolean invokePasswordCallback(Callback callback) {
@@ -94,6 +94,6 @@ public class NamePasswordCallbackHandler
         }
         return false;
     }
- 
+
 }
 

Modified: webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/SecurityActionToken.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/SecurityActionToken.java?rev=1720192&r1=1720191&r2=1720192&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/SecurityActionToken.java (original)
+++ webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/SecurityActionToken.java Tue Dec 15 16:40:37 2015
@@ -28,17 +28,17 @@ import org.apache.wss4j.common.ext.WSSec
  * This interface encapsulates configuration for Actions. This allows a user to use specific keys
  * for different actions, rather than to use the generic keys etc. configured on the request.
  */
-public interface SecurityActionToken {  
+public interface SecurityActionToken {
 
     String getUser();
-    
+
     byte[] getKey();
-    
+
     X509Certificate getCertificate();
-    
+
     Crypto getCrypto() throws WSSecurityException;
-    
+
     String getCryptoProperties();
-    
+
 }
 

Modified: webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/SignatureActionToken.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/SignatureActionToken.java?rev=1720192&r1=1720191&r2=1720192&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/SignatureActionToken.java (original)
+++ webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/SignatureActionToken.java Tue Dec 15 16:40:37 2015
@@ -22,12 +22,12 @@ package org.apache.wss4j.common;
 /**
  * This class encapsulates configuration for Signature Actions.
  */
-public class SignatureActionToken extends SignatureEncryptionActionToken {  
+public class SignatureActionToken extends SignatureEncryptionActionToken {
 
     private String c14nAlgorithm;
     private boolean useSingleCert = true;
     private String signatureAlgorithm;
-    
+
     public String getC14nAlgorithm() {
         return c14nAlgorithm;
     }
@@ -46,6 +46,6 @@ public class SignatureActionToken extend
     public void setSignatureAlgorithm(String signatureAlgorithm) {
         this.signatureAlgorithm = signatureAlgorithm;
     }
- 
+
 }
 

Modified: webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/SignatureEncryptionActionToken.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/SignatureEncryptionActionToken.java?rev=1720192&r1=1720191&r2=1720192&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/SignatureEncryptionActionToken.java (original)
+++ webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/SignatureEncryptionActionToken.java Tue Dec 15 16:40:37 2015
@@ -33,8 +33,8 @@ import org.w3c.dom.Element;
  * This abstract class encapsulates configuration for Signature + Encryption Actions.
  */
 public abstract class SignatureEncryptionActionToken implements SecurityActionToken {
-    
-    private static final org.slf4j.Logger LOG = 
+
+    private static final org.slf4j.Logger LOG =
         org.slf4j.LoggerFactory.getLogger(SignatureEncryptionActionToken.class);
 
     private X509Certificate certificate;
@@ -55,7 +55,7 @@ public abstract class SignatureEncryptio
     private int derivedKeyLength;
     private int derivedKeyIdentifier;
     private boolean includeToken;
-    
+
     public X509Certificate getCertificate() {
         return certificate;
     }
@@ -80,7 +80,7 @@ public abstract class SignatureEncryptio
     public void setUser(String user) {
         this.user = user;
     }
-    
+
     public synchronized Crypto getCrypto() throws WSSecurityException {
         if (crypto != null) {
             return crypto;
@@ -94,12 +94,12 @@ public abstract class SignatureEncryptio
                 LOG.debug(ex.getMessage(), ex);
             }
             Properties properties = CryptoFactory.getProperties(cryptoProperties, classLoader);
-            crypto = 
+            crypto =
                 CryptoFactory.getInstance(properties, classLoader, null);
         }
         return crypto;
     }
-    
+
     public synchronized void setCrypto(Crypto crypto) {
         this.crypto = crypto;
     }
@@ -137,11 +137,11 @@ public abstract class SignatureEncryptio
     public synchronized void setCryptoProperties(String cryptoProperties) {
         this.cryptoProperties = cryptoProperties;
     }
-    
+
     public synchronized String getCryptoProperties() {
         return cryptoProperties;
     }
-    
+
     public String getTokenType() {
         return tokenType;
     }

Modified: webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/WSEncryptionPart.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/WSEncryptionPart.java?rev=1720192&r1=1720191&r2=1720192&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/WSEncryptionPart.java (original)
+++ webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/WSEncryptionPart.java Tue Dec 15 16:40:37 2015
@@ -31,27 +31,27 @@ public class WSEncryptionPart {
     private String id;
     private Element element;
     private boolean required = true;
-    
+
     /**
      * An xpath expression pointing to the data element
      * that may be specified in case the encryption part is of type
      * <code>org.apache.wss4j.dom.WSConstants.PART_TYPE_ELEMENT</code>
      */
     private String xpath;
-    
+
     /**
      * Constructor to initialize part structure with element, namespace, and modifier.
-     * 
+     *
      * This constructor initializes the parts structure to lookup for a
      * fully qualified name of an element to encrypt or sign. The modifier
      * controls how encryption encrypts the element, signature processing does
      * not use the modifier information.
-     * 
+     *
      * <p/>
-     * 
+     *
      * Regarding the modifier ("Content" or "Element") refer to the W3C
-     * XML Encryption specification. 
-     * 
+     * XML Encryption specification.
+     *
      * @param nm Element's name
      * @param nmspace Element's namespace
      * @param encMod The encryption modifier
@@ -62,33 +62,33 @@ public class WSEncryptionPart {
         encModifier = encMod;
         id = null;
     }
-    
+
     /**
      * Constructor to initialize part structure with element id.
-     * 
+     *
      * This constructor initializes the parts structure to lookup for a
-     * an element with the given Id to encrypt or sign. 
-     * 
+     * an element with the given Id to encrypt or sign.
+     *
      * @param id The Id to of the element to process
      */
     public WSEncryptionPart(String id) {
         this.id = id;
         name = namespace = encModifier = null;
     }
-    
+
     /**
      * Constructor to initialize part structure with element id and modifier.
-     * 
+     *
      * This constructor initializes the parts structure to lookup for a
      * an element with the given Id to encrypt or sign. The modifier
      * controls how encryption encrypts the element, signature processing does
      * not use the modifier information.
-     * 
+     *
      * <p/>
-     * 
+     *
      * Regarding the modifier ("Content" or "Element") refer to the W3C
-     * XML Encryption specification. 
-     * 
+     * XML Encryption specification.
+     *
      * @param id The Id to of the element to process
      * @param encMod The encryption modifier
      */
@@ -97,7 +97,7 @@ public class WSEncryptionPart {
         encModifier = encMod;
         name = namespace = null;
     }
-    
+
     /**
      * @return the local name of the element to encrypt.
      */
@@ -118,7 +118,7 @@ public class WSEncryptionPart {
     public String getEncModifier() {
         return encModifier;
     }
-    
+
     /**
      * Set the encryption modifier
      */
@@ -132,7 +132,7 @@ public class WSEncryptionPart {
     public String getId() {
         return id;
     }
-    
+
     /**
      * Set the id
      * @param id
@@ -140,11 +140,11 @@ public class WSEncryptionPart {
     public void setId(String id) {
         this.id = id;
     }
-    
+
     public void setEncId(String id) {
         encId = id;
     }
-    
+
     public String getEncId() {
         return encId;
     }
@@ -162,7 +162,7 @@ public class WSEncryptionPart {
     public void setXpath(String xpath) {
         this.xpath = xpath;
     }
-    
+
     /**
      * Set the DOM Element corresponding to this EncryptionPart
      * @param element the DOM Element corresponding to this EncryptionPart
@@ -170,7 +170,7 @@ public class WSEncryptionPart {
     public void setElement(Element element) {
         this.element = element;
     }
-    
+
     /**
      * Get the DOM Element corresponding to this EncryptionPart
      * @return the DOM Element corresponding to this EncryptionPart
@@ -186,5 +186,5 @@ public class WSEncryptionPart {
     public void setRequired(boolean required) {
         this.required = required;
     }
-    
+
 }

Modified: webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/WSS4JConstants.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/WSS4JConstants.java?rev=1720192&r1=1720191&r2=1720192&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/WSS4JConstants.java (original)
+++ webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/WSS4JConstants.java Tue Dec 15 16:40:37 2015
@@ -20,48 +20,48 @@ package org.apache.wss4j.common;
 
 /**
  */
-public class WSS4JConstants {  
+public class WSS4JConstants {
 
     protected WSS4JConstants() {
         // complete
     }
-    
+
     //
     // Namespaces
     //
-    public static final String WSSE_NS = 
+    public static final String WSSE_NS =
         "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
-    public static final String WSSE11_NS = 
+    public static final String WSSE11_NS =
         "http://docs.oasis-open.org/wss/oasis-wss-wssecurity-secext-1.1.xsd";
-    public static final String WSU_NS = 
+    public static final String WSU_NS =
         "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
-    
-    public static final String SOAPMESSAGE_NS = 
+
+    public static final String SOAPMESSAGE_NS =
         "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0";
-    public static final String SOAPMESSAGE_NS11 = 
+    public static final String SOAPMESSAGE_NS11 =
         "http://docs.oasis-open.org/wss/oasis-wss-soap-message-security-1.1";
-    public static final String USERNAMETOKEN_NS = 
+    public static final String USERNAMETOKEN_NS =
         "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0";
-    public static final String X509TOKEN_NS = 
+    public static final String X509TOKEN_NS =
         "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0";
-    public static final String SAMLTOKEN_NS = 
+    public static final String SAMLTOKEN_NS =
         "http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.0";
-    public static final String SAMLTOKEN_NS11 = 
+    public static final String SAMLTOKEN_NS11 =
         "http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1";
     public static final String KERBEROS_NS11 =
-        "http://docs.oasis-open.org/wss/oasis-wss-kerberos-token-profile-1.1"; 
+        "http://docs.oasis-open.org/wss/oasis-wss-kerberos-token-profile-1.1";
 
     public static final String SIG_NS = "http://www.w3.org/2000/09/xmldsig#";
     public static final String ENC_NS = "http://www.w3.org/2001/04/xmlenc#";
     public static final String ENC11_NS = "http://www.w3.org/2009/xmlenc11#";
     public static final String XMLNS_NS = "http://www.w3.org/2000/xmlns/";
     public static final String XML_NS = "http://www.w3.org/XML/1998/namespace";
-    
+
     public static final String SAML_NS = "urn:oasis:names:tc:SAML:1.0:assertion";
     public static final String SAMLP_NS = "urn:oasis:names:tc:SAML:1.0:protocol";
     public static final String SAML2_NS = "urn:oasis:names:tc:SAML:2.0:assertion";
     public static final String SAMLP2_NS = "urn:oasis:names:tc:SAML:2.0:protocol";
-    
+
     public static final String URI_SOAP11_ENV =
         "http://schemas.xmlsoap.org/soap/envelope/";
     public static final String URI_SOAP12_ENV =
@@ -74,23 +74,23 @@ public class WSS4JConstants {
         "http://www.w3.org/2003/05/soap-envelope/role/none";
     public static final String URI_SOAP12_ULTIMATE_ROLE =
         "http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver";
-    
-    public static final String C14N_OMIT_COMMENTS = 
+
+    public static final String C14N_OMIT_COMMENTS =
         "http://www.w3.org/TR/2001/REC-xml-c14n-20010315";
-    public static final String C14N_WITH_COMMENTS = 
+    public static final String C14N_WITH_COMMENTS =
         "http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments";
-    public static final String C14N_EXCL_OMIT_COMMENTS = 
+    public static final String C14N_EXCL_OMIT_COMMENTS =
         "http://www.w3.org/2001/10/xml-exc-c14n#";
-    public static final String C14N_EXCL_WITH_COMMENTS = 
+    public static final String C14N_EXCL_WITH_COMMENTS =
         "http://www.w3.org/2001/10/xml-exc-c14n#WithComments";
-    
-    public static final String NS_XMLDSIG_FILTER2 = 
+
+    public static final String NS_XMLDSIG_FILTER2 =
         "http://www.w3.org/2002/06/xmldsig-filter2";
-    public static final String NS_XMLDSIG_ENVELOPED_SIGNATURE = 
+    public static final String NS_XMLDSIG_ENVELOPED_SIGNATURE =
         SIG_NS + "enveloped-signature";
-    public static final String SWA_ATTACHMENT_CONTENT_SIG_TRANS = 
+    public static final String SWA_ATTACHMENT_CONTENT_SIG_TRANS =
         "http://docs.oasis-open.org/wss/oasis-wss-SwAProfile-1.1#Attachment-Content-Signature-Transform";
-    public static final String SWA_ATTACHMENT_COMPLETE_SIG_TRANS = 
+    public static final String SWA_ATTACHMENT_COMPLETE_SIG_TRANS =
         "http://docs.oasis-open.org/wss/oasis-wss-SwAProfile-1.1#Attachment-Complete-Signature-Transform";
     public static final String SWA_ATTACHMENT_CIPHERTEXT_TRANS =
         "http://docs.oasis-open.org/wss/oasis-wss-SwAProfile-1.1#Attachment-Ciphertext-Transform";
@@ -99,34 +99,34 @@ public class WSS4JConstants {
     public static final String SWA_ATTACHMENT_ENCRYPTED_DATA_TYPE_COMPLETE =
         "http://docs.oasis-open.org/wss/oasis-wss-SwAProfile-1.1#Attachment-Complete";
     public static final String XOP_NS = "http://www.w3.org/2004/08/xop/include";
-    
-    public static final String KEYTRANSPORT_RSA15 = 
+
+    public static final String KEYTRANSPORT_RSA15 =
         "http://www.w3.org/2001/04/xmlenc#rsa-1_5";
-    public static final String KEYTRANSPORT_RSAOEP = 
+    public static final String KEYTRANSPORT_RSAOEP =
         "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p";
     public static final String KEYTRANSPORT_RSAOEP_XENC11 =
         "http://www.w3.org/2009/xmlenc11#rsa-oaep";
-    public static final String TRIPLE_DES = 
+    public static final String TRIPLE_DES =
         "http://www.w3.org/2001/04/xmlenc#tripledes-cbc";
-    public static final String AES_128 = 
+    public static final String AES_128 =
         "http://www.w3.org/2001/04/xmlenc#aes128-cbc";
-    public static final String AES_256 = 
+    public static final String AES_256 =
         "http://www.w3.org/2001/04/xmlenc#aes256-cbc";
-    public static final String AES_192 = 
+    public static final String AES_192 =
         "http://www.w3.org/2001/04/xmlenc#aes192-cbc";
-    public static final String AES_128_GCM = 
+    public static final String AES_128_GCM =
         "http://www.w3.org/2009/xmlenc11#aes128-gcm";
-    public static final String AES_192_GCM = 
+    public static final String AES_192_GCM =
         "http://www.w3.org/2009/xmlenc11#aes192-gcm";
-    public static final String AES_256_GCM = 
+    public static final String AES_256_GCM =
         "http://www.w3.org/2009/xmlenc11#aes256-gcm";
-    public static final String DSA = 
+    public static final String DSA =
         "http://www.w3.org/2000/09/xmldsig#dsa-sha1";
-    public static final String RSA = 
+    public static final String RSA =
         "http://www.w3.org/2000/09/xmldsig#rsa-sha1";
-    public static final String RSA_SHA1 = 
+    public static final String RSA_SHA1 =
         "http://www.w3.org/2000/09/xmldsig#rsa-sha1";
-    public static final String SHA1 = 
+    public static final String SHA1 =
         "http://www.w3.org/2000/09/xmldsig#sha1";
     public static final String SHA256 =
         "http://www.w3.org/2001/04/xmlenc#sha256";
@@ -134,15 +134,15 @@ public class WSS4JConstants {
         "http://www.w3.org/2001/04/xmldsig-more#sha384";
     public static final String SHA512 =
             "http://www.w3.org/2001/04/xmlenc#sha512";
-    public static final String HMAC_SHA1 = 
+    public static final String HMAC_SHA1 =
         "http://www.w3.org/2000/09/xmldsig#hmac-sha1";
-    public static final String HMAC_SHA256 = 
+    public static final String HMAC_SHA256 =
         "http://www.w3.org/2001/04/xmldsig-more#hmac-sha256";
-    public static final String HMAC_SHA384 = 
+    public static final String HMAC_SHA384 =
         "http://www.w3.org/2001/04/xmldsig-more#hmac-sha384";
-    public static final String HMAC_SHA512 = 
+    public static final String HMAC_SHA512 =
         "http://www.w3.org/2001/04/xmldsig-more#hmac-sha512";
-    public static final String HMAC_MD5 = 
+    public static final String HMAC_MD5 =
         "http://www.w3.org/2001/04/xmldsig-more#hmac-md5";
 
     public static final String MGF_SHA1 = "http://www.w3.org/2009/xmlenc11#mgf1sha1";
@@ -160,10 +160,10 @@ public class WSS4JConstants {
      * WS-Trust 1.4 namespace
      */
     public static final String WST_NS_08_02 = "http://docs.oasis-open.org/ws-sx/ws-trust/200802";
-    
+
     public static final String WSC_SCT = "http://schemas.xmlsoap.org/ws/2005/02/sc/sct";
-    
-    public static final String WSC_SCT_05_12 = 
+
+    public static final String WSC_SCT_05_12 =
         "http://docs.oasis-open.org/ws-sx/ws-secureconversation/200512/sct";
 
     //
@@ -190,7 +190,7 @@ public class WSS4JConstants {
     public static final String NONCE_LN = "Nonce";
     public static final String CREATED_LN = "Created";
     public static final String EXPIRES_LN = "Expires";
-    public static final String SIGNATURE_CONFIRMATION_LN = "SignatureConfirmation"; 
+    public static final String SIGNATURE_CONFIRMATION_LN = "SignatureConfirmation";
     public static final String SALT_LN = "Salt";
     public static final String ITERATION_LN = "Iteration";
     public static final String ASSERTION_LN = "Assertion";
@@ -207,7 +207,7 @@ public class WSS4JConstants {
     public static final String KEYINFO_LN = "KeyInfo";
     public static final String KEYVALUE_LN = "KeyValue";
     public static final String TOKEN_TYPE = "TokenType";
-    
+
     public static final String ELEM_ENVELOPE = "Envelope";
     public static final String ELEM_HEADER = "Header";
     public static final String ELEM_BODY = "Body";
@@ -215,7 +215,7 @@ public class WSS4JConstants {
     public static final String ATTR_ACTOR = "actor";
     public static final String ATTR_ROLE = "role";
     public static final String NULL_NS = "Null";
-    
+
     //
     // Prefixes
     //
@@ -227,20 +227,20 @@ public class WSS4JConstants {
     public static final String ENC_PREFIX = "xenc";
     public static final String ENC11_PREFIX = "xenc11";
     public static final String C14N_EXCL_OMIT_COMMENTS_PREFIX = "ec";
-    
+
     //
     // Kerberos ValueTypes
     //
     public static final String WSS_KRB_V5_AP_REQ = KERBEROS_NS11 + "#Kerberosv5_AP_REQ";
     public static final String WSS_GSS_KRB_V5_AP_REQ = KERBEROS_NS11 + "#GSS_Kerberosv5_AP_REQ";
     public static final String WSS_KRB_V5_AP_REQ1510 = KERBEROS_NS11 + "#Kerberosv5_AP_REQ1510";
-    public static final String WSS_GSS_KRB_V5_AP_REQ1510 = 
+    public static final String WSS_GSS_KRB_V5_AP_REQ1510 =
         KERBEROS_NS11 + "#GSS_Kerberosv5_AP_REQ1510";
     public static final String WSS_KRB_V5_AP_REQ4120 = KERBEROS_NS11 + "#Kerberosv5_AP_REQ4120";
-    public static final String WSS_GSS_KRB_V5_AP_REQ4120 = 
+    public static final String WSS_GSS_KRB_V5_AP_REQ4120 =
         KERBEROS_NS11 + "#GSS_Kerberosv5_AP_REQ4120";
     public static final String WSS_KRB_KI_VALUE_TYPE = KERBEROS_NS11 + "#Kerberosv5APREQSHA1";
-    
+
     //
     // Misc
     //
@@ -251,7 +251,7 @@ public class WSS4JConstants {
     public static final String WSS_ENC_KEY_VALUE_TYPE = SOAPMESSAGE_NS11 + "#" + ENC_KEY_VALUE_TYPE;
     public static final String PASSWORD_DIGEST = USERNAMETOKEN_NS + "#PasswordDigest";
     public static final String PASSWORD_TEXT = USERNAMETOKEN_NS + "#PasswordText";
-    public static final String WSS_USERNAME_TOKEN_VALUE_TYPE = 
+    public static final String WSS_USERNAME_TOKEN_VALUE_TYPE =
         USERNAMETOKEN_NS + "#" + USERNAME_TOKEN_LN;
     public static final String BASE64_ENCODING = SOAPMESSAGE_NS + "#Base64Binary";
 

Modified: webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/bsp/BSPEnforcer.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/bsp/BSPEnforcer.java?rev=1720192&r1=1720191&r2=1720192&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/bsp/BSPEnforcer.java (original)
+++ webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/bsp/BSPEnforcer.java Tue Dec 15 16:40:37 2015
@@ -28,30 +28,30 @@ import org.apache.wss4j.common.ext.WSSec
  * An class that enforces Basic Security Profile Rules
  */
 public class BSPEnforcer {
-    
+
     private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(BSPEnforcer.class);
-    
+
     private List<BSPRule> ignoredBSPRules = Collections.emptyList();
-    
+
     private boolean disableBSPRules;
-    
+
     public BSPEnforcer() {
         // Complete
     }
-    
+
     public BSPEnforcer(List<BSPRule> bspRules) {
         ignoredBSPRules = new ArrayList<>(bspRules);
     }
-    
+
     public BSPEnforcer(boolean disableBSPRules) {
         this.disableBSPRules = disableBSPRules;
     }
-    
+
     public void handleBSPRule(BSPRule bspRule) throws WSSecurityException {
         if (disableBSPRules) {
             return;
         }
-        
+
         if (!ignoredBSPRules.contains(bspRule)) {
             throw new WSSecurityException(WSSecurityException.ErrorCode.INVALID_SECURITY, "empty",
                                           new Object[] {"BSP:" + bspRule.name() + ": " + bspRule.getMsg()}
@@ -64,9 +64,9 @@ public class BSPEnforcer {
     public void setIgnoredBSPRules(List<BSPRule> bspRules) {
         ignoredBSPRules = new ArrayList<>(bspRules);
     }
-    
+
     public void setDisableBSPRules(boolean disableBSPRules) {
         this.disableBSPRules = disableBSPRules;
     }
-    
+
 }

Modified: webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/cache/EHCacheManagerHolder.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/cache/EHCacheManagerHolder.java?rev=1720192&r1=1720191&r2=1720192&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/cache/EHCacheManagerHolder.java (original)
+++ webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/cache/EHCacheManagerHolder.java Tue Dec 15 16:40:37 2015
@@ -38,9 +38,9 @@ import org.apache.wss4j.common.util.Load
  * We need to reference count the EHCacheManager things
  */
 public final class EHCacheManagerHolder {
-    private static final org.slf4j.Logger LOG = 
+    private static final org.slf4j.Logger LOG =
         org.slf4j.LoggerFactory.getLogger(EHCacheManagerHolder.class);
-    private static final ConcurrentHashMap<String, AtomicInteger> COUNTS 
+    private static final ConcurrentHashMap<String, AtomicInteger> COUNTS
         = new ConcurrentHashMap<String, AtomicInteger>(8, 0.75f, 2);
 
     private static Method cacheManagerCreateMethodNoArg;
@@ -65,12 +65,12 @@ public final class EHCacheManagerHolder
             }
         }
     }
-    
+
     private EHCacheManagerHolder() {
         //utility
     }
-    
-    
+
+
     public static CacheConfiguration getCacheConfiguration(String key,
                                                            CacheManager cacheManager) {
         CacheConfiguration cc = cacheManager.getConfiguration().getCacheConfigurations().get(key);
@@ -89,7 +89,7 @@ public final class EHCacheManagerHolder
         cc.setName(key);
         return cc;
     }
-    
+
     public static CacheManager getCacheManager(String confName, URL configFileURL) {
         CacheManager cacheManager = null;
         if (configFileURL == null) {
@@ -114,7 +114,7 @@ public final class EHCacheManagerHolder
         // }
         return cacheManager;
     }
-    
+
     private static CacheManager findDefaultCacheManager(String confName) {
 
         String defaultConfigFile = "/wss4j-ehcache.xml";
@@ -130,7 +130,7 @@ public final class EHCacheManagerHolder
         }
         return findDefaultCacheManager(confName, configFileURL);
     }
-    
+
     private static CacheManager findDefaultCacheManager(String confName, URL configFileURL) {
         try {
             Configuration conf = ConfigurationFactory.parseConfiguration(configFileURL);
@@ -180,5 +180,5 @@ public final class EHCacheManagerHolder
         } catch (Exception e) {
             throw new CacheException(e);
         }
-    }    
+    }
 }

Modified: webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/cache/EHCacheReplayCache.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/cache/EHCacheReplayCache.java?rev=1720192&r1=1720191&r2=1720192&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/cache/EHCacheReplayCache.java (original)
+++ webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/cache/EHCacheReplayCache.java Tue Dec 15 16:40:37 2015
@@ -34,20 +34,20 @@ import net.sf.ehcache.config.CacheConfig
  * max TTL is 12 hours.
  */
 public class EHCacheReplayCache implements ReplayCache {
-    
+
     public static final long DEFAULT_TTL = 3600L;
     public static final long MAX_TTL = DEFAULT_TTL * 12L;
     protected Ehcache cache;
     protected CacheManager cacheManager;
     private long ttl = DEFAULT_TTL;
-    
+
     public EHCacheReplayCache(String key, URL configFileURL) {
         this(key, EHCacheManagerHolder.getCacheManager("", configFileURL));
     }
-    
+
     public EHCacheReplayCache(String key, CacheManager cacheManager) {
         this.cacheManager = cacheManager;
-        
+
         CacheConfiguration cc = EHCacheManagerHolder.getCacheConfiguration(key, cacheManager);
 
         Cache newCache = new RefCountCache(cc);
@@ -86,7 +86,7 @@ public class EHCacheReplayCache implemen
     public void setTTL(long newTtl) {
         ttl = newTtl;
     }
-    
+
     /**
      * Get the (default) TTL value in seconds
      * @return the (default) TTL value in seconds
@@ -94,7 +94,7 @@ public class EHCacheReplayCache implemen
     public long getTTL() {
         return ttl;
     }
-    
+
     /**
      * Add the given identifier to the cache. It will be cached for a default amount of time.
      * @param identifier The identifier to be added
@@ -102,7 +102,7 @@ public class EHCacheReplayCache implemen
     public void add(String identifier) {
         add(identifier, ttl);
     }
-    
+
     /**
      * Add the given identifier to the cache to be cached for the given time
      * @param identifier The identifier to be added
@@ -112,7 +112,7 @@ public class EHCacheReplayCache implemen
         if (identifier == null || "".equals(identifier)) {
             return;
         }
-        
+
         int parsedTTL = (int)timeToLive;
         if (timeToLive != (long)parsedTTL || parsedTTL < 0 || parsedTTL > MAX_TTL) {
             // Default to configured value
@@ -122,12 +122,12 @@ public class EHCacheReplayCache implemen
                 parsedTTL = 3600;
             }
         }
-        
+
         Element cacheElement = new Element(identifier, identifier, parsedTTL, parsedTTL);
         cacheElement.resetAccessStatistics();
         cache.put(cacheElement);
     }
-    
+
     /**
      * Return true if the given identifier is contained in the cache
      * @param identifier The identifier to check
@@ -157,7 +157,7 @@ public class EHCacheReplayCache implemen
                         && ((RefCountCache)cache).decrementAndGet() == 0) {
                         cacheManager.removeCache(cache.getName());
                     }
-                }                
+                }
             }
 
             EHCacheManagerHolder.releaseCacheManger(cacheManager);
@@ -174,5 +174,5 @@ public class EHCacheReplayCache implemen
     public void postShutdown() {
         close();
     }
-    
+
 }

Modified: webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/cache/EHCacheReplayCacheFactory.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/cache/EHCacheReplayCacheFactory.java?rev=1720192&r1=1720191&r2=1720192&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/cache/EHCacheReplayCacheFactory.java (original)
+++ webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/cache/EHCacheReplayCacheFactory.java Tue Dec 15 16:40:37 2015
@@ -25,10 +25,10 @@ import java.net.URL;
  * A factory to return an EHCacheReplayCache instance.
  */
 public class EHCacheReplayCacheFactory extends ReplayCacheFactory {
-    
+
     public ReplayCache newReplayCache(String key, Object configuration) {
         URL configFileURL = getConfigFileURL(configuration);
         return new EHCacheReplayCache(key, configFileURL);
     }
-    
+
 }

Modified: webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/cache/MemoryReplayCache.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/cache/MemoryReplayCache.java?rev=1720192&r1=1720191&r2=1720192&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/cache/MemoryReplayCache.java (original)
+++ webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/cache/MemoryReplayCache.java Tue Dec 15 16:40:37 2015
@@ -36,12 +36,12 @@ import java.util.TreeMap;
  * and the max TTL is 60 minutes.
  */
 public class MemoryReplayCache implements ReplayCache {
-    
+
     public static final long DEFAULT_TTL = 60L * 5L;
     public static final long MAX_TTL = DEFAULT_TTL * 12L;
     private final SortedMap<Date, List<String>> cache = new TreeMap<>();
     private final Set<String> ids = Collections.synchronizedSet(new HashSet<String>());
-    
+
     /**
      * Add the given identifier to the cache. It will be cached for a default amount of time.
      * @param identifier The identifier to be added
@@ -49,7 +49,7 @@ public class MemoryReplayCache implement
     public void add(String identifier) {
         add(identifier, DEFAULT_TTL);
     }
-    
+
     /**
      * Add the given identifier to the cache to be cached for the given time
      * @param identifier The identifier to be added
@@ -59,16 +59,16 @@ public class MemoryReplayCache implement
         if (identifier == null || "".equals(identifier)) {
             return;
         }
-        
+
         long ttl = timeToLive;
         if (ttl < 0 || ttl > MAX_TTL) {
             ttl = DEFAULT_TTL;
         }
-        
+
         Date expires = new Date();
         long currentTime = expires.getTime();
         expires.setTime(currentTime + ttl * 1000L);
-        
+
         synchronized (cache) {
             List<String> list = cache.get(expires);
             if (list == null) {
@@ -79,20 +79,20 @@ public class MemoryReplayCache implement
         }
         ids.add(identifier);
     }
-    
+
     /**
      * Return true if the given identifier is contained in the cache
      * @param identifier The identifier to check
      */
     public boolean contains(String identifier) {
         processTokenExpiry();
-        
+
         if (identifier != null && !"".equals(identifier)) {
             return ids.contains(identifier);
         }
         return false;
     }
-    
+
     protected void processTokenExpiry() {
         Date current = new Date();
         synchronized (cache) {

Modified: webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/cache/MemoryReplayCacheFactory.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/cache/MemoryReplayCacheFactory.java?rev=1720192&r1=1720191&r2=1720192&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/cache/MemoryReplayCacheFactory.java (original)
+++ webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/cache/MemoryReplayCacheFactory.java Tue Dec 15 16:40:37 2015
@@ -24,9 +24,9 @@ package org.apache.wss4j.common.cache;
  * A factory to return a MemoryReplayCache instance.
  */
 public class MemoryReplayCacheFactory extends ReplayCacheFactory {
-    
+
     public ReplayCache newReplayCache(String key, Object configuration) {
         return new MemoryReplayCache();
     }
-    
+
 }

Modified: webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/cache/ReplayCache.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/cache/ReplayCache.java?rev=1720192&r1=1720191&r2=1720192&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/cache/ReplayCache.java (original)
+++ webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/cache/ReplayCache.java Tue Dec 15 16:40:37 2015
@@ -26,24 +26,24 @@ import java.io.Closeable;
  * is a UsernameToken nonce.
  */
 public interface ReplayCache extends Closeable {
-    
+
     /**
      * Add the given identifier to the cache. It will be cached for a default amount of time.
      * @param identifier The identifier to be added
      */
     void add(String identifier);
-    
+
     /**
      * Add the given identifier to the cache to be cached for the given time
      * @param identifier The identifier to be added
      * @param timeToLive The length of time to cache the Identifier in seconds
      */
     void add(String identifier, long timeToLive);
-    
+
     /**
      * Return true if the given identifier is contained in the cache
      * @param identifier The identifier to check
      */
     boolean contains(String identifier);
-    
+
 }

Modified: webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/cache/ReplayCacheFactory.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/cache/ReplayCacheFactory.java?rev=1720192&r1=1720191&r2=1720192&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/cache/ReplayCacheFactory.java (original)
+++ webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/cache/ReplayCacheFactory.java Tue Dec 15 16:40:37 2015
@@ -29,11 +29,11 @@ import org.apache.wss4j.common.util.Load
  * if EH-Cache is available. Otherwise it returns a MemoryReplayCacheFactory.
  */
 public abstract class ReplayCacheFactory {
-    
-    private static final org.slf4j.Logger LOG = 
+
+    private static final org.slf4j.Logger LOG =
         org.slf4j.LoggerFactory.getLogger(ReplayCacheFactory.class);
     private static boolean ehCacheInstalled;
-    
+
     static {
         try {
             Class<?> cacheManagerClass = Class.forName("net.sf.ehcache.CacheManager");
@@ -45,21 +45,21 @@ public abstract class ReplayCacheFactory
             LOG.debug(e.getMessage());
         }
     }
-    
+
     public static synchronized boolean isEhCacheInstalled() {
         return ehCacheInstalled;
     }
-    
+
     public static ReplayCacheFactory newInstance() {
         if (isEhCacheInstalled()) {
             return new EHCacheReplayCacheFactory();
         }
-        
+
         return new MemoryReplayCacheFactory();
     }
-    
+
     public abstract ReplayCache newReplayCache(String key, Object configuration);
-    
+
     protected URL getConfigFileURL(Object o) {
         if (o instanceof String) {
             try {
@@ -73,9 +73,9 @@ public abstract class ReplayCacheFactory
                 LOG.debug(e.getMessage());
             }
         } else if (o instanceof URL) {
-            return (URL)o;        
+            return (URL)o;
         }
         return null;
     }
-    
+
 }

Modified: webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/crypto/AlgorithmSuiteValidator.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/crypto/AlgorithmSuiteValidator.java?rev=1720192&r1=1720191&r2=1720192&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/crypto/AlgorithmSuiteValidator.java (original)
+++ webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/crypto/AlgorithmSuiteValidator.java Tue Dec 15 16:40:37 2015
@@ -35,18 +35,18 @@ import org.apache.wss4j.common.ext.WSSec
  * Validate signature/encryption/etc. algorithms against an AlgorithmSuite policy.
  */
 public class AlgorithmSuiteValidator {
-    
-    private static final org.slf4j.Logger LOG = 
+
+    private static final org.slf4j.Logger LOG =
         org.slf4j.LoggerFactory.getLogger(AlgorithmSuiteValidator.class);
-    
+
     private final AlgorithmSuite algorithmSuite;
-    
+
     public AlgorithmSuiteValidator(
         AlgorithmSuite algorithmSuite
     ) {
         this.algorithmSuite = algorithmSuite;
     }
-    
+
     /**
      * Check the Signature Method
      */
@@ -62,7 +62,7 @@ public class AlgorithmSuiteValidator {
             throw new WSSecurityException(WSSecurityException.ErrorCode.INVALID_SECURITY);
         }
     }
-    
+
     /**
      * Check the C14n Algorithm
      */
@@ -77,7 +77,7 @@ public class AlgorithmSuiteValidator {
             throw new WSSecurityException(WSSecurityException.ErrorCode.INVALID_SECURITY);
         }
     }
-    
+
     /**
      * Check the Signature Algorithms
      */
@@ -85,15 +85,15 @@ public class AlgorithmSuiteValidator {
         XMLSignature xmlSignature
     ) throws WSSecurityException {
         // Signature Algorithm
-        String signatureMethod = 
+        String signatureMethod =
             xmlSignature.getSignedInfo().getSignatureMethod().getAlgorithm();
         checkSignatureMethod(signatureMethod);
-            
+
         // C14n Algorithm
-        String c14nMethod = 
+        String c14nMethod =
             xmlSignature.getSignedInfo().getCanonicalizationMethod().getAlgorithm();
         checkC14nAlgorithm(c14nMethod);
-        
+
         for (Object refObject : xmlSignature.getSignedInfo().getReferences()) {
             Reference reference = (Reference)refObject;
             // Digest Algorithm
@@ -106,14 +106,14 @@ public class AlgorithmSuiteValidator {
                 );
                 throw new WSSecurityException(WSSecurityException.ErrorCode.INVALID_SECURITY);
             }
-            
+
             // Transform Algorithms
             for (int i = 0; i < reference.getTransforms().size(); i++) {
                 Transform transform = (Transform)reference.getTransforms().get(i);
                 String algorithm = transform.getAlgorithm();
-                Set<String> allowedTransformAlgorithms = 
+                Set<String> allowedTransformAlgorithms =
                         algorithmSuite.getTransformAlgorithms();
-                if (!allowedTransformAlgorithms.isEmpty() 
+                if (!allowedTransformAlgorithms.isEmpty()
                         && !allowedTransformAlgorithms.contains(algorithm)) {
                     LOG.debug(
                         "Transform method " + algorithm + " does not match required value"
@@ -123,7 +123,7 @@ public class AlgorithmSuiteValidator {
             }
         }
     }
-    
+
     public void checkEncryptionKeyWrapAlgorithm(
         String keyWrapAlgorithm
     ) throws WSSecurityException {
@@ -136,7 +136,7 @@ public class AlgorithmSuiteValidator {
             throw new WSSecurityException(WSSecurityException.ErrorCode.INVALID_SECURITY);
         }
     }
-    
+
     public void checkSymmetricEncryptionAlgorithm(
         String symmetricAlgorithm
     ) throws WSSecurityException {
@@ -149,7 +149,7 @@ public class AlgorithmSuiteValidator {
             throw new WSSecurityException(WSSecurityException.ErrorCode.INVALID_SECURITY);
         }
     }
-    
+
     /**
      * Check the asymmetric key length
      */
@@ -159,7 +159,7 @@ public class AlgorithmSuiteValidator {
         if (x509Certificates == null) {
             return;
         }
-        
+
         for (X509Certificate cert : x509Certificates) {
             checkAsymmetricKeyLength(cert.getPublicKey());
         }
@@ -174,10 +174,10 @@ public class AlgorithmSuiteValidator {
         if (x509Certificate == null) {
             return;
         }
-        
+
         checkAsymmetricKeyLength(x509Certificate.getPublicKey());
     }
-    
+
     /**
      * Check the asymmetric key length
      */
@@ -212,7 +212,7 @@ public class AlgorithmSuiteValidator {
             throw new WSSecurityException(WSSecurityException.ErrorCode.INVALID_SECURITY);
         }
     }
-    
+
     /**
      * Check the symmetric key length
      */
@@ -227,7 +227,7 @@ public class AlgorithmSuiteValidator {
             throw new WSSecurityException(WSSecurityException.ErrorCode.INVALID_SECURITY);
         }
     }
-    
+
     /**
      * Check Signature Derived Key length (in bytes)
      */
@@ -242,7 +242,7 @@ public class AlgorithmSuiteValidator {
             );
         }
     }
-    
+
     /**
      * Check Encryption Derived Key length (in bytes)
      */
@@ -257,7 +257,7 @@ public class AlgorithmSuiteValidator {
             );
         }
     }
-    
+
     /**
      * Check Derived Key algorithm
      */
@@ -273,5 +273,5 @@ public class AlgorithmSuiteValidator {
             throw new WSSecurityException(WSSecurityException.ErrorCode.INVALID_SECURITY);
         }
     }
-        
+
 }




Mime
View raw message