org.apache.ws.security.components.crypto
Class Merlin
java.lang.Object
org.apache.ws.security.components.crypto.CryptoBase
org.apache.ws.security.components.crypto.AbstractCrypto
org.apache.ws.security.components.crypto.Merlin
- All Implemented Interfaces:
- Crypto
- public class Merlin
- extends AbstractCrypto
JDK1.4 based implementation of Crypto (uses keystore).
- Author:
- Davanum Srinivas ([email protected]).
Field Summary |
static java.lang.String |
NAME_CONSTRAINTS_OID
OID For the NameConstraints Extension to X.509
http://java.sun.com/j2se/1.4.2/docs/api/
http://www.ietf.org/rfc/rfc3280.txt (s. |
Constructor Summary |
Merlin(java.util.Properties properties)
Constructor. |
Merlin(java.util.Properties properties,
java.lang.ClassLoader loader)
|
Method Summary |
byte[] |
getCertificateData(boolean reverse,
java.security.cert.X509Certificate[] certs)
get a byte array given an array of X509 certificates. |
java.security.cert.X509Certificate[] |
getX509Certificates(byte[] data,
boolean reverse)
Construct an array of X509Certificate's from the byte array. |
boolean |
validateCertPath(java.security.cert.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 org.apache.ws.security.components.crypto.CryptoBase |
getAliasesForDN, getAliasForX509Cert, getAliasForX509Cert, getAliasForX509Cert, getAliasForX509Cert, getAliasForX509CertThumb, getCertificateFactory, getCertificates, getKeyStore, getPrivateKey, getSKIBytesFromCert, loadCertificate, setKeyStore, splitAndTrim |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NAME_CONSTRAINTS_OID
public static final java.lang.String NAME_CONSTRAINTS_OID
- OID For the NameConstraints Extension to X.509
http://java.sun.com/j2se/1.4.2/docs/api/
http://www.ietf.org/rfc/rfc3280.txt (s. 4.2.1.11)
- See Also:
- Constant Field Values
Merlin
public Merlin(java.util.Properties properties)
throws CredentialException,
java.io.IOException
- Constructor.
- Parameters:
properties
-
- Throws:
CredentialException
java.io.IOException
Merlin
public Merlin(java.util.Properties properties,
java.lang.ClassLoader loader)
throws CredentialException,
java.io.IOException
getX509Certificates
public java.security.cert.X509Certificate[] getX509Certificates(byte[] data,
boolean reverse)
throws WSSecurityException
- Construct an array of X509Certificate's from the byte array.
- Specified by:
getX509Certificates
in interface Crypto
- Overrides:
getX509Certificates
in class CryptoBase
- Parameters:
data
- The byte
array containing 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,
java.security.cert.X509Certificate[] certs)
throws WSSecurityException
- get a byte array given an array of X509 certificates.
- Specified by:
getCertificateData
in interface Crypto
- Overrides:
getCertificateData
in class CryptoBase
- 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 certificates ordered according to the
reverse flag
- Throws:
WSSecurityException
validateCertPath
public boolean validateCertPath(java.security.cert.X509Certificate[] certs)
throws WSSecurityException
- Description copied from class:
CryptoBase
- Overridden because there's a bug in the base class where they don't use
the provider variant for the certificate validator.
- Specified by:
validateCertPath
in interface Crypto
- Overrides:
validateCertPath
in class CryptoBase
- Parameters:
certs
- Certificate chain to validate
- Returns:
- true if the certificate chain is valid, false otherwise
- Throws:
WSSecurityException
Copyright © 2004-2009 The Apache Software Foundation. All Rights Reserved.