public interface Crypto
| Modifier and Type | Method and Description |
|---|---|
String[] |
getAliasesForDN(String subjectDN)
Lookup X509 Certificates in the keystore according to a given DN of the subject of the certificate
|
String |
getAliasForX509Cert(byte[] skiBytes)
Lookup a X509 Certificate in the keystore according to a given
SubjectKeyIdentifier.
|
String |
getAliasForX509Cert(Certificate cert)
Return a X509 Certificate alias in the keystore according to a given Certificate
|
String |
getAliasForX509Cert(String issuer)
Lookup a X509 Certificate in the keystore according to a given
the issuer of a Certificate.
|
String |
getAliasForX509Cert(String issuer,
BigInteger serialNumber)
Search a X509 Certificate in the keystore according to a given serial number and
the issuer of a Certificate.
|
String |
getAliasForX509CertThumb(byte[] thumb)
Lookup a X509 Certificate in the keystore according to a given
Thumbprint.
|
byte[] |
getCertificateData(boolean reverse,
X509Certificate[] certs)
get a byte array given an array of X509 certificates.
|
CertificateFactory |
getCertificateFactory()
Gets the CertificateFactory instantiated by the underlying implementation
|
X509Certificate[] |
getCertificates(String alias)
get the list of certificates for a given alias.
|
String |
getDefaultX509Alias()
Retrieves the alias name of the default certificate which has been
specified as a property.
|
KeyStore |
getKeyStore()
Gets the Keystore that was loaded by the underlying implementation
|
PrivateKey |
getPrivateKey(String alias,
String password)
Gets the private key identified by
alias> and |
byte[] |
getSKIBytesFromCert(X509Certificate cert)
Reads the SubjectKeyIdentifier information from the certificate.
|
X509Certificate[] |
getX509Certificates(byte[] data,
boolean reverse)
Construct an array of X509Certificate's from the byte array.
|
X509Certificate |
loadCertificate(InputStream in)
load a X509Certificate from the input stream.
|
boolean |
validateCertPath(X509Certificate[] certs)
Uses the CertPath API to validate a given certificate chain
|
X509Certificate loadCertificate(InputStream in) throws WSSecurityException
in - The InputStream array containing the X509 dataWSSecurityExceptionX509Certificate[] getX509Certificates(byte[] data, boolean reverse) throws WSSecurityException
data - The byte array containing the X509 datareverse - If set the first certificate in input data will
the last in the arrayWSSecurityExceptionbyte[] getCertificateData(boolean reverse,
X509Certificate[] certs)
throws WSSecurityException
reverse - If set the first certificate in the array data will
the last in the byte arraycerts - The certificates to convertWSSecurityExceptionPrivateKey getPrivateKey(String alias, String password) throws Exception
alias> and password.
alias - The alias (KeyStore) of the key ownerpassword - The password needed to access the private keyExceptionX509Certificate[] getCertificates(String alias) throws WSSecurityException
alias - Lookup certificate chain for this aliasWSSecurityExceptionString getAliasForX509Cert(Certificate cert) throws WSSecurityException
cert - The certificate to lookupWSSecurityExceptionString getAliasForX509Cert(String issuer) throws WSSecurityException
issuer - The issuer's name for the certificateWSSecurityExceptionString getAliasForX509Cert(String issuer, BigInteger serialNumber) throws WSSecurityException
issuer - The issuer's name for the certificateserialNumber - The serial number of the certificate from the named issuerWSSecurityExceptionString getAliasForX509Cert(byte[] skiBytes) throws WSSecurityException
skiBytes - The SKI info bytesWSSecurityExceptionString getDefaultX509Alias()
byte[] getSKIBytesFromCert(X509Certificate cert) throws WSSecurityException
cert - The certificate to read SKIWSSecurityExceptionString getAliasForX509CertThumb(byte[] thumb) throws WSSecurityException
thumb - The SHA1 thumbprint info bytesWSSecurityException - if problems during keystore handling or wrong certificateKeyStore getKeyStore()
CertificateFactory getCertificateFactory() throws WSSecurityException
WSSecurityExceptionboolean validateCertPath(X509Certificate[] certs) throws WSSecurityException
certs - Certificate chain to validateWSSecurityExceptionString[] getAliasesForDN(String subjectDN) throws WSSecurityException
subjectDN - The DN of subject to look for in the keystoreWSSecurityExceptionCopyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.