Package org.apache.wss4j.common.crypto
Class AlgorithmSuiteValidator
java.lang.Object
org.apache.wss4j.common.crypto.AlgorithmSuiteValidator
Validate signature/encryption/etc. algorithms against an AlgorithmSuite policy.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckAsymmetricKeyLength(X509Certificate x509Certificate) Check the asymmetric key lengthvoidcheckAsymmetricKeyLength(X509Certificate[] x509Certificates) Check the asymmetric key lengthvoidcheckAsymmetricKeyLength(PublicKey publicKey) Check the asymmetric key lengthvoidcheckC14nAlgorithm(String c14nAlgorithm) Check the C14n AlgorithmvoidcheckDerivedKeyAlgorithm(String algorithm) Check Derived Key algorithmvoidcheckEncryptionDerivedKeyLength(int derivedKeyLength) Check the Encryption Derived Key length.voidcheckEncryptionKeyWrapAlgorithm(String keyWrapAlgorithm) voidcheckKeyAgreementMethodAlgorithm(String keyAgreementMethodAlgorithm) voidcheckKeyDerivationFunction(String keyDerivationFunction) Method to check the Key Derivation algorithm is on the approved list of the AlgorithmSuite configuration.voidcheckSignatureAlgorithms(XMLSignature xmlSignature) Check the Signature AlgorithmsvoidcheckSignatureDerivedKeyLength(int derivedKeyLength) Check the Signature Derived Key length.voidcheckSignatureMethod(String signatureMethod) Check the Signature MethodvoidcheckSymmetricEncryptionAlgorithm(String symmetricAlgorithm) voidcheckSymmetricKeyLength(int secretKeyLength) Check the symmetric key length
-
Constructor Details
-
AlgorithmSuiteValidator
-
-
Method Details
-
checkSignatureMethod
Check the Signature Method- Throws:
WSSecurityException
-
checkC14nAlgorithm
Check the C14n Algorithm- Throws:
WSSecurityException
-
checkSignatureAlgorithms
Check the Signature Algorithms- Throws:
WSSecurityException
-
checkEncryptionKeyWrapAlgorithm
- Throws:
WSSecurityException
-
checkKeyAgreementMethodAlgorithm
public void checkKeyAgreementMethodAlgorithm(String keyAgreementMethodAlgorithm) throws WSSecurityException - Throws:
WSSecurityException
-
checkKeyDerivationFunction
Method to check the Key Derivation algorithm is on the approved list of the AlgorithmSuite configuration.- Parameters:
keyDerivationFunction- the key derivation function to be validated- Throws:
WSSecurityException- if the approved list is not empty and the key derivation function is not on the list
-
checkSymmetricEncryptionAlgorithm
- Throws:
WSSecurityException
-
checkAsymmetricKeyLength
Check the asymmetric key length- Throws:
WSSecurityException
-
checkAsymmetricKeyLength
Check the asymmetric key length- Throws:
WSSecurityException
-
checkAsymmetricKeyLength
Check the asymmetric key length- Throws:
WSSecurityException
-
checkSymmetricKeyLength
Check the symmetric key length- Throws:
WSSecurityException
-
checkSignatureDerivedKeyLength
Check the Signature Derived Key length. The supplied key length is denominated in bytes (the denomination of the wsc:Length element of a DerivedKeyToken), whereas the AlgorithmSuite requirement is denominated in bits.- Throws:
WSSecurityException
-
checkEncryptionDerivedKeyLength
Check the Encryption Derived Key length. The supplied key length is denominated in bytes (the denomination of the wsc:Length element of a DerivedKeyToken), whereas the AlgorithmSuite requirement is denominated in bits.- Throws:
WSSecurityException
-
checkDerivedKeyAlgorithm
Check Derived Key algorithm- Throws:
WSSecurityException
-