public abstract class CryptoBase extends Object implements Crypto
| Modifier and Type | Field and Description |
|---|---|
protected CertificateFactory |
certificateFactory |
static 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 String |
SKI_OID |
| Modifier | Constructor and Description |
|---|---|
protected |
CryptoBase()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected Object |
createBCX509Name(String s) |
byte[] |
getBytesFromCertificates(X509Certificate[] certs)
Get a byte array given an array of X509 certificates.
|
CertificateFactory |
getCertificateFactory()
Get the CertificateFactory instance on this Crypto instance
|
X509Certificate[] |
getCertificatesFromBytes(byte[] data)
Construct an array of X509Certificate's from the byte array.
|
String |
getCryptoProvider()
Get the crypto provider associated with this implementation
|
String |
getDefaultX509Identifier()
Retrieves the identifier name of the default certificate.
|
byte[] |
getSKIBytesFromCert(X509Certificate cert)
Reads the SubjectKeyIdentifier information from the certificate.
|
String |
getTrustProvider()
Get the crypto provider used for truststore operation associated with this implementation.
|
X509Certificate |
loadCertificate(InputStream in)
Load a X509Certificate from the input stream.
|
protected boolean |
matchesName(String name,
Collection<Pattern> patterns) |
protected boolean |
matchesSubjectDnPattern(X509Certificate cert,
Collection<Pattern> subjectDNPatterns) |
void |
setCertificateFactory(CertificateFactory certFactory)
Sets the CertificateFactory instance on this Crypto instance
|
void |
setCryptoProvider(String provider)
Set the crypto provider associated with this implementation
|
void |
setDefaultX509Identifier(String identifier)
Sets the identifier name of the default certificate.
|
void |
setTrustProvider(String provider)
Set the crypto provider used for truststore operations associated with this implementation
|
void |
verifyDirectTrust(X509Certificate[] certs)
Evaluate whether a given public key should be trusted directly (located
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetPrivateKey, getPrivateKey, getX509Certificates, getX509Identifier, verifyTrust, verifyTrustpublic static final String SKI_OID
public static final String NAME_CONSTRAINTS_OID
protected CertificateFactory certificateFactory
public String getCryptoProvider()
getCryptoProvider in interface Cryptopublic void setCryptoProvider(String provider)
setCryptoProvider in interface Cryptoprovider - the crypto provider to setpublic void setTrustProvider(String provider)
setTrustProvider in interface Cryptoprovider - the name of the providerpublic String getTrustProvider()
getTrustProvider in interface Cryptopublic String getDefaultX509Identifier() throws WSSecurityException
getDefaultX509Identifier in interface CryptoWSSecurityExceptionpublic void setDefaultX509Identifier(String identifier)
setDefaultX509Identifier in interface Cryptoidentifier - name of the default X509 certificate.public void setCertificateFactory(CertificateFactory certFactory)
setCertificateFactory in interface CryptocertFactory - the CertificateFactory the CertificateFactory instance to setpublic CertificateFactory getCertificateFactory() throws WSSecurityException
getCertificateFactory in interface CryptoCertificateFactory to construct
X509 certificatesWSSecurityExceptionpublic X509Certificate loadCertificate(InputStream in) throws WSSecurityException
loadCertificate in interface Cryptoin - The InputStream containing the X509CertificateWSSecurityExceptionpublic byte[] getSKIBytesFromCert(X509Certificate cert) throws WSSecurityException
getSKIBytesFromCert in interface Cryptocert - The certificate to read SKIWSSecurityExceptionpublic byte[] getBytesFromCertificates(X509Certificate[] certs) throws WSSecurityException
getBytesFromCertificates in interface Cryptocerts - The certificates to convertWSSecurityExceptionpublic X509Certificate[] getCertificatesFromBytes(byte[] data) throws WSSecurityException
getCertificatesFromBytes in interface Cryptodata - The byte array containing the X509 dataWSSecurityExceptionpublic void verifyDirectTrust(X509Certificate[] certs) throws WSSecurityException
CryptoverifyDirectTrust in interface Cryptocerts - Certificate chain to validateWSSecurityException - if the certificate chain is invalidprotected boolean matchesSubjectDnPattern(X509Certificate cert, Collection<Pattern> subjectDNPatterns)
protected boolean matchesName(String name, Collection<Pattern> patterns)
Copyright © 2017 JBoss by Red Hat. All rights reserved.