public class BcTlsCertificate extends java.lang.Object implements TlsCertificate
| Modifier and Type | Field and Description |
|---|---|
protected org.bouncycastle.asn1.x509.Certificate |
certificate |
protected BcTlsCrypto |
crypto |
protected org.bouncycastle.crypto.params.DHPublicKeyParameters |
pubKeyDH |
protected org.bouncycastle.crypto.params.ECPublicKeyParameters |
pubKeyEC |
protected org.bouncycastle.crypto.params.Ed25519PublicKeyParameters |
pubKeyEd25519 |
protected org.bouncycastle.crypto.params.Ed448PublicKeyParameters |
pubKeyEd448 |
protected org.bouncycastle.crypto.params.RSAKeyParameters |
pubKeyRSA |
| Constructor and Description |
|---|
BcTlsCertificate(BcTlsCrypto crypto,
byte[] encoding) |
BcTlsCertificate(BcTlsCrypto crypto,
org.bouncycastle.asn1.x509.Certificate certificate) |
| Modifier and Type | Method and Description |
|---|---|
TlsCertificate |
checkUsageInRole(int tlsCertificateRole) |
static BcTlsCertificate |
convert(BcTlsCrypto crypto,
TlsCertificate certificate) |
TlsEncryptor |
createEncryptor(int tlsCertificateRole)
Return an encryptor based on the public key in this certificate.
|
TlsVerifier |
createVerifier(int signatureScheme) |
TlsVerifier |
createVerifier(short signatureAlgorithm) |
byte[] |
getEncoded() |
byte[] |
getExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier extensionOID) |
short |
getLegacySignatureAlgorithm() |
org.bouncycastle.crypto.params.DHPublicKeyParameters |
getPubKeyDH() |
org.bouncycastle.crypto.params.DSAPublicKeyParameters |
getPubKeyDSS() |
org.bouncycastle.crypto.params.ECPublicKeyParameters |
getPubKeyEC() |
org.bouncycastle.crypto.params.Ed25519PublicKeyParameters |
getPubKeyEd25519() |
org.bouncycastle.crypto.params.Ed448PublicKeyParameters |
getPubKeyEd448() |
org.bouncycastle.crypto.params.RSAKeyParameters |
getPubKeyRSA() |
protected org.bouncycastle.crypto.params.AsymmetricKeyParameter |
getPublicKey() |
java.math.BigInteger |
getSerialNumber() |
java.lang.String |
getSigAlgOID() |
org.bouncycastle.asn1.ASN1Encodable |
getSigAlgParams() |
static org.bouncycastle.asn1.x509.Certificate |
parseCertificate(byte[] encoding) |
protected boolean |
supportsKeyUsage(int keyUsageBits) |
protected boolean |
supportsRSA_PKCS1() |
protected boolean |
supportsRSA_PSS_PSS(short signatureAlgorithm) |
protected boolean |
supportsRSA_PSS_RSAE() |
boolean |
supportsSignatureAlgorithm(short signatureAlgorithm) |
protected boolean |
supportsSignatureAlgorithm(short signatureAlgorithm,
int keyUsage) |
boolean |
supportsSignatureAlgorithmCA(short signatureAlgorithm) |
void |
validateKeyUsage(int keyUsageBits) |
protected void |
validateRSA_PKCS1() |
protected void |
validateRSA_PSS_PSS(short signatureAlgorithm) |
protected void |
validateRSA_PSS_RSAE() |
protected final BcTlsCrypto crypto
protected final org.bouncycastle.asn1.x509.Certificate certificate
protected org.bouncycastle.crypto.params.DHPublicKeyParameters pubKeyDH
protected org.bouncycastle.crypto.params.ECPublicKeyParameters pubKeyEC
protected org.bouncycastle.crypto.params.Ed25519PublicKeyParameters pubKeyEd25519
protected org.bouncycastle.crypto.params.Ed448PublicKeyParameters pubKeyEd448
protected org.bouncycastle.crypto.params.RSAKeyParameters pubKeyRSA
public BcTlsCertificate(BcTlsCrypto crypto, byte[] encoding) throws java.io.IOException
java.io.IOExceptionpublic BcTlsCertificate(BcTlsCrypto crypto, org.bouncycastle.asn1.x509.Certificate certificate)
public static BcTlsCertificate convert(BcTlsCrypto crypto, TlsCertificate certificate) throws java.io.IOException
java.io.IOExceptionpublic static org.bouncycastle.asn1.x509.Certificate parseCertificate(byte[] encoding)
throws java.io.IOException
java.io.IOExceptionpublic TlsEncryptor createEncryptor(int tlsCertificateRole) throws java.io.IOException
TlsCertificatecreateEncryptor in interface TlsCertificatetlsCertificateRole - TlsCertificateRolejava.io.IOExceptionpublic TlsVerifier createVerifier(short signatureAlgorithm) throws java.io.IOException
createVerifier in interface TlsCertificatesignatureAlgorithm - SignatureAlgorithmjava.io.IOExceptionpublic TlsVerifier createVerifier(int signatureScheme) throws java.io.IOException
createVerifier in interface TlsCertificatesignatureScheme - SignatureSchemejava.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 org.bouncycastle.asn1.ASN1Encodable getSigAlgParams()
getSigAlgParams in interface TlsCertificatepublic short getLegacySignatureAlgorithm()
throws java.io.IOException
getLegacySignatureAlgorithm in interface TlsCertificateSignatureAlgorithmjava.io.IOExceptionpublic org.bouncycastle.crypto.params.DHPublicKeyParameters getPubKeyDH()
throws java.io.IOException
java.io.IOExceptionpublic org.bouncycastle.crypto.params.DSAPublicKeyParameters getPubKeyDSS()
throws java.io.IOException
java.io.IOExceptionpublic org.bouncycastle.crypto.params.ECPublicKeyParameters getPubKeyEC()
throws java.io.IOException
java.io.IOExceptionpublic org.bouncycastle.crypto.params.Ed25519PublicKeyParameters getPubKeyEd25519()
throws java.io.IOException
java.io.IOExceptionpublic org.bouncycastle.crypto.params.Ed448PublicKeyParameters getPubKeyEd448()
throws java.io.IOException
java.io.IOExceptionpublic org.bouncycastle.crypto.params.RSAKeyParameters getPubKeyRSA()
throws java.io.IOException
java.io.IOExceptionpublic boolean supportsSignatureAlgorithm(short signatureAlgorithm)
throws java.io.IOException
supportsSignatureAlgorithm in interface TlsCertificatesignatureAlgorithm - SignatureAlgorithmjava.io.IOExceptionpublic boolean supportsSignatureAlgorithmCA(short signatureAlgorithm)
throws java.io.IOException
supportsSignatureAlgorithmCA in interface TlsCertificatejava.io.IOExceptionpublic TlsCertificate checkUsageInRole(int tlsCertificateRole) throws java.io.IOException
checkUsageInRole in interface TlsCertificatetlsCertificateRole - TlsCertificateRolejava.io.IOExceptionprotected org.bouncycastle.crypto.params.AsymmetricKeyParameter getPublicKey()
throws java.io.IOException
java.io.IOExceptionprotected boolean supportsKeyUsage(int keyUsageBits)
protected boolean supportsRSA_PKCS1()
protected boolean supportsRSA_PSS_PSS(short signatureAlgorithm)
protected boolean supportsRSA_PSS_RSAE()
protected boolean supportsSignatureAlgorithm(short signatureAlgorithm,
int keyUsage)
throws java.io.IOException
java.io.IOExceptionpublic void validateKeyUsage(int keyUsageBits)
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