Class Merlin
java.lang.Object
org.apache.ws.security.components.crypto.AbstractCrypto
org.apache.ws.security.components.crypto.Merlin
- All Implemented Interfaces:
Crypto
JDK1.4 based implementation of Crypto (uses keystore).
- Author:
- Davanum Srinivas (dims@yahoo.com).
-
Field Summary
Fields inherited from class AbstractCrypto
certFact, keystore, properties -
Constructor Summary
ConstructorsConstructorDescriptionMerlin(Properties properties) Constructor.Merlin(Properties properties, ClassLoader loader) -
Method Summary
Modifier and TypeMethodDescriptionbyte[]getCertificateData(boolean reverse, X509Certificate[] certs) get a byte array given an array of X509 certificates.getX509Certificates(byte[] data, boolean reverse) Construct an array of X509Certificate's from the byte array.booleanvalidateCertPath(X509Certificate[] certs) Overridden because there's a bug in the base class where they don't use the provider variant for the certificate validator.Methods inherited from class AbstractCrypto
getAliasesForDN, getAliasForX509Cert, getAliasForX509Cert, getAliasForX509Cert, getAliasForX509Cert, getAliasForX509CertThumb, getCertificateFactory, getCertificates, getDefaultX509Alias, getKeyStore, getPrivateKey, getSKIBytesFromCert, load, loadCertificate, setKeyStore
-
Constructor Details
-
Merlin
Constructor.- Parameters:
properties-- Throws:
CredentialExceptionIOException
-
Merlin
- Throws:
CredentialExceptionIOException
-
-
Method Details
-
getX509Certificates
public X509Certificate[] getX509Certificates(byte[] data, boolean reverse) throws WSSecurityException Construct an array of X509Certificate's from the byte array.- Parameters:
data- Thebytearray containg the X509 datareverse- If set the first certificate in input data will the last in the array- Returns:
- An array of X509 certificates, ordered according to the reverse flag
- Throws:
WSSecurityException
-
getCertificateData
public byte[] getCertificateData(boolean reverse, X509Certificate[] certs) throws WSSecurityException get a byte array given an array of X509 certificates.- Parameters:
reverse- If set the first certificate in the array data will the last in the byte arraycerts- The certificates to convert- Returns:
- The byte array for the certficates ordered according to the reverse flag
- Throws:
WSSecurityException
-
validateCertPath
Overridden because there's a bug in the base class where they don't use the provider variant for the certificate validator.- Parameters:
certs- Certificate chain to validate- Returns:
- true if the certificate chain is valid, false otherwise
- Throws:
WSSecurityException
-