|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Crypto.
Method Summary | |
java.lang.String[] |
getAliasesForDN(java.lang.String subjectDN)
Lookup X509 Certificates in the keystore according to a given DN of the subject of the certificate |
java.lang.String |
getAliasForX509Cert(byte[] skiBytes)
Lookup a X509 Certificate in the keystore according to a given SubjectKeyIdentifier. |
java.lang.String |
getAliasForX509Cert(java.security.cert.Certificate cert)
Return a X509 Certificate alias in the keystore according to a given Certificate |
java.lang.String |
getAliasForX509Cert(java.lang.String issuer)
Lookup a X509 Certificate in the keystore according to a given the issuer of a Certficate. |
java.lang.String |
getAliasForX509Cert(java.lang.String issuer,
java.math.BigInteger serialNumber)
Search a X509 Certificate in the keystore according to a given serial number and the issuer of a Certficate. |
java.lang.String |
getAliasForX509CertThumb(byte[] thumb)
Lookup a X509 Certificate in the keystore according to a given Thumbprint. |
byte[] |
getCertificateData(boolean reverse,
java.security.cert.X509Certificate[] certs)
get a byte array given an array of X509 certificates. |
java.security.cert.CertificateFactory |
getCertificateFactory()
Gets the CertificateFactory instantiated by the underlying implementation |
java.security.cert.X509Certificate[] |
getCertificates(java.lang.String alias)
get the list of certificates for a given alias. |
java.lang.String |
getDefaultX509Alias()
Retrieves the alias name of the default certificate which has been specified as a property. |
java.security.KeyStore |
getKeyStore()
Gets the Keystore that was loaded by the underlying implementation |
java.security.PrivateKey |
getPrivateKey(java.lang.String alias,
java.lang.String password)
Gets the private key identified by alias> and |
byte[] |
getSKIBytesFromCert(java.security.cert.X509Certificate cert)
Reads the SubjectKeyIdentifier information from the certificate. |
java.security.cert.X509Certificate[] |
getX509Certificates(byte[] data,
boolean reverse)
Construct an array of X509Certificate's from the byte array. |
java.security.cert.X509Certificate |
loadCertificate(java.io.InputStream in)
load a X509Certificate from the input stream. |
boolean |
validateCertPath(java.security.cert.X509Certificate[] certs)
Uses the CertPath API to validate a given certificate chain |
Method Detail |
public java.security.cert.X509Certificate loadCertificate(java.io.InputStream in) throws WSSecurityException
in
- The InputStream
array containg the X509 data
WSSecurityException
public java.security.cert.X509Certificate[] getX509Certificates(byte[] data, boolean reverse) throws WSSecurityException
data
- The byte
array containg the X509 datareverse
- If set the first certificate in input data will
the last in the array
WSSecurityException
public byte[] getCertificateData(boolean reverse, java.security.cert.X509Certificate[] certs) throws WSSecurityException
reverse
- If set the first certificate in the array data will
the last in the byte arraycerts
- The certificates to convert
WSSecurityException
public java.security.PrivateKey getPrivateKey(java.lang.String alias, java.lang.String password) throws java.lang.Exception
alias> and password
.
- Parameters:
alias
- The alias (KeyStore
) of the key ownerpassword
- The password needed to access the private key
- Returns:
- The private key
- Throws:
java.lang.Exception
public java.security.cert.X509Certificate[] getCertificates(java.lang.String alias) throws WSSecurityException
alias
- Lookup certificate chain for this alias
WSSecurityException
public java.lang.String getAliasForX509Cert(java.security.cert.Certificate cert) throws WSSecurityException
cert
- The certificate to lookup
WSSecurityException
public java.lang.String getAliasForX509Cert(java.lang.String issuer) throws WSSecurityException
issuer
- The issuer's name for the certificate
WSSecurityException
public java.lang.String getAliasForX509Cert(java.lang.String issuer, java.math.BigInteger serialNumber) throws WSSecurityException
issuer
- The issuer's name for the certificateserialNumber
- The serial number of the certificate from the named issuer
WSSecurityException
public java.lang.String getAliasForX509Cert(byte[] skiBytes) throws WSSecurityException
skiBytes
- The SKI info bytes
WSSecurityException
public java.lang.String getDefaultX509Alias()
public byte[] getSKIBytesFromCert(java.security.cert.X509Certificate cert) throws WSSecurityException
cert
- The certificate to read SKI
WSSecurityException
public java.lang.String getAliasForX509CertThumb(byte[] thumb) throws WSSecurityException
thumb
- The SHA1 thumbprint info bytes
WSSecurityException
- if problems during keystore handling or wrong certificatepublic java.security.KeyStore getKeyStore()
public java.security.cert.CertificateFactory getCertificateFactory() throws WSSecurityException
WSSecurityException
public boolean validateCertPath(java.security.cert.X509Certificate[] certs) throws WSSecurityException
certs
- Certificate chain to validate
WSSecurityException
public java.lang.String[] getAliasesForDN(java.lang.String subjectDN) throws WSSecurityException
subjectDN
- The DN of subject to look for in the keystore
WSSecurityException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |