public class JcaTlsCertificate extends java.lang.Object implements TlsCertificate
| Modifier and Type | Field and Description |
|---|---|
protected java.security.cert.X509Certificate |
certificate |
protected JcaTlsCrypto |
crypto |
protected static int |
KU_CERT_SIGN |
protected static int |
KU_CRL_SIGN |
protected static int |
KU_DATA_ENCIPHERMENT |
protected static int |
KU_DECIPHER_ONLY |
protected static int |
KU_DIGITAL_SIGNATURE |
protected static int |
KU_ENCIPHER_ONLY |
protected static int |
KU_KEY_AGREEMENT |
protected static int |
KU_KEY_ENCIPHERMENT |
protected static int |
KU_NON_REPUDIATION |
protected javax.crypto.interfaces.DHPublicKey |
pubKeyDH |
protected java.security.interfaces.ECPublicKey |
pubKeyEC |
protected java.security.interfaces.RSAPublicKey |
pubKeyRSA |
| Constructor and Description |
|---|
JcaTlsCertificate(JcaTlsCrypto crypto,
byte[] encoding) |
JcaTlsCertificate(JcaTlsCrypto crypto,
java.security.cert.X509Certificate certificate) |
| Modifier and Type | Method and Description |
|---|---|
static JcaTlsCertificate |
convert(JcaTlsCrypto crypto,
TlsCertificate certificate) |
TlsVerifier |
createVerifier(short signatureAlgorithm) |
byte[] |
getEncoded() |
byte[] |
getExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier extensionOID) |
short |
getLegacySignatureAlgorithm() |
protected java.security.PublicKey |
getPublicKey() |
java.math.BigInteger |
getSerialNumber() |
java.lang.String |
getSigAlgOID() |
protected org.bouncycastle.asn1.x509.SubjectPublicKeyInfo |
getSubjectPublicKeyInfo() |
java.security.cert.X509Certificate |
getX509Certificate() |
static java.security.cert.X509Certificate |
parseCertificate(org.bouncycastle.jcajce.util.JcaJceHelper helper,
byte[] encoding) |
protected boolean |
supportsKeyUsageBit(int keyUsageBit) |
protected boolean |
supportsRSA_PKCS1() |
protected boolean |
supportsRSA_PSS_PSS(short signatureAlgorithm) |
protected boolean |
supportsRSA_PSS_RSAE() |
boolean |
supportsSignatureAlgorithm(short signatureAlgorithm) |
TlsCertificate |
useInRole(int connectionEnd,
int keyExchangeAlgorithm) |
protected void |
validateKeyUsageBit(int keyUsageBit) |
protected void |
validateRSA_PKCS1() |
protected void |
validateRSA_PSS_PSS(short signatureAlgorithm) |
protected void |
validateRSA_PSS_RSAE() |
protected static final int KU_DIGITAL_SIGNATURE
protected static final int KU_NON_REPUDIATION
protected static final int KU_KEY_ENCIPHERMENT
protected static final int KU_DATA_ENCIPHERMENT
protected static final int KU_KEY_AGREEMENT
protected static final int KU_CERT_SIGN
protected static final int KU_CRL_SIGN
protected static final int KU_ENCIPHER_ONLY
protected static final int KU_DECIPHER_ONLY
protected final JcaTlsCrypto crypto
protected final java.security.cert.X509Certificate certificate
protected javax.crypto.interfaces.DHPublicKey pubKeyDH
protected java.security.interfaces.ECPublicKey pubKeyEC
protected java.security.interfaces.RSAPublicKey pubKeyRSA
public JcaTlsCertificate(JcaTlsCrypto crypto, byte[] encoding) throws java.io.IOException
java.io.IOExceptionpublic JcaTlsCertificate(JcaTlsCrypto crypto, java.security.cert.X509Certificate certificate)
public static JcaTlsCertificate convert(JcaTlsCrypto crypto, TlsCertificate certificate) throws java.io.IOException
java.io.IOExceptionpublic static java.security.cert.X509Certificate parseCertificate(org.bouncycastle.jcajce.util.JcaJceHelper helper,
byte[] encoding)
throws java.io.IOException
java.io.IOExceptionpublic TlsVerifier createVerifier(short signatureAlgorithm) throws java.io.IOException
createVerifier in interface TlsCertificatesignatureAlgorithm - SignatureAlgorithmjava.io.IOExceptionpublic byte[] getEncoded()
throws java.io.IOException
getEncoded in interface TlsCertificatejava.io.IOExceptionpublic byte[] getExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier extensionOID)
throws java.io.IOException
getExtension in interface TlsCertificatejava.io.IOExceptionpublic java.math.BigInteger getSerialNumber()
getSerialNumber in interface TlsCertificatepublic java.lang.String getSigAlgOID()
getSigAlgOID in interface TlsCertificatepublic short getLegacySignatureAlgorithm()
throws java.io.IOException
getLegacySignatureAlgorithm in interface TlsCertificateSignatureAlgorithmjava.io.IOExceptionpublic boolean supportsSignatureAlgorithm(short signatureAlgorithm)
throws java.io.IOException
supportsSignatureAlgorithm in interface TlsCertificatesignatureAlgorithm - SignatureAlgorithmjava.io.IOExceptionpublic TlsCertificate useInRole(int connectionEnd, int keyExchangeAlgorithm) throws java.io.IOException
useInRole in interface TlsCertificateconnectionEnd - ConnectionEndkeyExchangeAlgorithm - KeyExchangeAlgorithmjava.io.IOExceptionprotected java.security.PublicKey getPublicKey()
throws java.io.IOException
java.io.IOExceptionprotected org.bouncycastle.asn1.x509.SubjectPublicKeyInfo getSubjectPublicKeyInfo()
throws java.io.IOException
java.io.IOExceptionpublic java.security.cert.X509Certificate getX509Certificate()
protected boolean supportsKeyUsageBit(int keyUsageBit)
protected boolean supportsRSA_PKCS1()
throws java.io.IOException
java.io.IOExceptionprotected boolean supportsRSA_PSS_PSS(short signatureAlgorithm)
throws java.io.IOException
java.io.IOExceptionprotected boolean supportsRSA_PSS_RSAE()
throws java.io.IOException
java.io.IOExceptionprotected void validateKeyUsageBit(int keyUsageBit)
throws java.io.IOException
java.io.IOExceptionprotected void validateRSA_PKCS1()
throws java.io.IOException
java.io.IOExceptionprotected void validateRSA_PSS_PSS(short signatureAlgorithm)
throws java.io.IOException
java.io.IOExceptionprotected void validateRSA_PSS_RSAE()
throws java.io.IOException
java.io.IOException