|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.ws.security.components.crypto.CryptoBase
public abstract class CryptoBase
This Abstract Base Class implements the accessor and keystore-independent methods and functionality of the Crypto interface.
| Field Summary | |
|---|---|
protected java.util.Map<java.lang.String,java.security.cert.CertificateFactory> |
certFactMap
|
protected java.lang.String |
cryptoProvider
|
protected java.lang.String |
defaultAlias
|
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. |
static java.lang.String |
SKI_OID
|
| Constructor Summary | |
|---|---|
protected |
CryptoBase()
Constructor |
| Method Summary | |
|---|---|
protected java.lang.Object |
createBCX509Name(java.lang.String s)
|
byte[] |
getBytesFromCertificates(java.security.cert.X509Certificate[] certs)
Get a byte array given an array of X509 certificates. |
java.security.cert.CertificateFactory |
getCertificateFactory()
Get the CertificateFactory instance on this Crypto instance |
java.security.cert.X509Certificate[] |
getCertificatesFromBytes(byte[] data)
Construct an array of X509Certificate's from the byte array. |
java.lang.String |
getCryptoProvider()
Get the crypto provider associated with this implementation |
java.lang.String |
getDefaultX509Identifier()
Retrieves the identifier name of the default certificate. |
byte[] |
getSKIBytesFromCert(java.security.cert.X509Certificate cert)
Reads the SubjectKeyIdentifier information from the certificate. |
java.security.cert.X509Certificate |
loadCertificate(java.io.InputStream in)
Load a X509Certificate from the input stream. |
void |
setCertificateFactory(java.lang.String provider,
java.security.cert.CertificateFactory certFactory)
Sets the CertificateFactory instance on this Crypto instance |
void |
setCryptoProvider(java.lang.String provider)
Set the crypto provider associated with this implementation |
void |
setDefaultX509Identifier(java.lang.String identifier)
Sets the identifier name of the default certificate. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.ws.security.components.crypto.Crypto |
|---|
getPrivateKey, getPrivateKey, getX509Certificates, getX509Identifier, verifyTrust, verifyTrust, verifyTrust |
| Field Detail |
|---|
public static final java.lang.String SKI_OID
public static final java.lang.String NAME_CONSTRAINTS_OID
protected java.util.Map<java.lang.String,java.security.cert.CertificateFactory> certFactMap
protected java.lang.String defaultAlias
protected java.lang.String cryptoProvider
| Constructor Detail |
|---|
protected CryptoBase()
| Method Detail |
|---|
public java.lang.String getCryptoProvider()
getCryptoProvider in interface Cryptopublic void setCryptoProvider(java.lang.String provider)
setCryptoProvider in interface Cryptoprovider - the crypto provider to set
public java.lang.String getDefaultX509Identifier()
throws WSSecurityException
getDefaultX509Identifier in interface CryptoWSSecurityExceptionpublic void setDefaultX509Identifier(java.lang.String identifier)
setDefaultX509Identifier in interface Cryptoidentifier - name of the default X509 certificate.
public void setCertificateFactory(java.lang.String provider,
java.security.cert.CertificateFactory certFactory)
setCertificateFactory in interface Cryptoprovider - the CertificateFactory provider namecertFactory - the CertificateFactory the CertificateFactory instance to set
public java.security.cert.CertificateFactory getCertificateFactory()
throws WSSecurityException
getCertificateFactory in interface CryptoCertificateFactory to construct
X509 certificates
WSSecurityException
public java.security.cert.X509Certificate loadCertificate(java.io.InputStream in)
throws WSSecurityException
loadCertificate in interface Cryptoin - The InputStream containing the X509Certificate
WSSecurityException
public byte[] getSKIBytesFromCert(java.security.cert.X509Certificate cert)
throws WSSecurityException
getSKIBytesFromCert in interface Cryptocert - The certificate to read SKI
WSSecurityException
public byte[] getBytesFromCertificates(java.security.cert.X509Certificate[] certs)
throws WSSecurityException
getBytesFromCertificates in interface Cryptocerts - The certificates to convert
WSSecurityException
public java.security.cert.X509Certificate[] getCertificatesFromBytes(byte[] data)
throws WSSecurityException
getCertificatesFromBytes in interface Cryptodata - The byte array containing the X509 data
WSSecurityExceptionprotected java.lang.Object createBCX509Name(java.lang.String s)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||