Class BcTlsCertificate
java.lang.Object
org.bouncycastle.tls.crypto.impl.bc.BcTlsRawKeyCertificate
org.bouncycastle.tls.crypto.impl.bc.BcTlsCertificate
- All Implemented Interfaces:
TlsCertificate
Implementation class for a single X.509 certificate based on the BC light-weight API.
-
Field Summary
Modifier and TypeFieldDescriptionprotected final org.bouncycastle.asn1.x509.Certificate
Fields inherited from class org.bouncycastle.tls.crypto.impl.bc.BcTlsRawKeyCertificate
crypto, keyInfo, pubKeyDH, pubKeyEC, pubKeyEd25519, pubKeyEd448, pubKeyRSA
-
Constructor Summary
ConstructorDescriptionBcTlsCertificate
(BcTlsCrypto crypto, byte[] encoding) BcTlsCertificate
(BcTlsCrypto crypto, org.bouncycastle.asn1.x509.Certificate certificate) -
Method Summary
Modifier and TypeMethodDescriptionstatic BcTlsCertificate
convert
(BcTlsCrypto crypto, TlsCertificate certificate) org.bouncycastle.asn1.x509.Certificate
byte[]
byte[]
getExtension
(org.bouncycastle.asn1.ASN1ObjectIdentifier extensionOID) org.bouncycastle.asn1.ASN1Encodable
static org.bouncycastle.asn1.x509.Certificate
parseCertificate
(byte[] encoding) protected boolean
supportsKeyUsage
(int keyUsageBits) Methods inherited from class org.bouncycastle.tls.crypto.impl.bc.BcTlsRawKeyCertificate
checkUsageInRole, createEncryptor, createVerifier, createVerifier, getLegacySignatureAlgorithm, getPubKeyDH, getPubKeyDSS, getPubKeyEC, getPubKeyEd25519, getPubKeyEd448, getPubKeyRSA, getPublicKey, getSubjectPublicKeyInfo, supportsRSA_PKCS1, supportsRSA_PSS_PSS, supportsRSA_PSS_RSAE, supportsSignatureAlgorithm, supportsSignatureAlgorithm, supportsSignatureAlgorithmCA, validateKeyUsage, validateRSA_PKCS1, validateRSA_PSS_PSS, validateRSA_PSS_RSAE
-
Field Details
-
certificate
protected final org.bouncycastle.asn1.x509.Certificate certificate
-
-
Constructor Details
-
BcTlsCertificate
- Throws:
IOException
-
BcTlsCertificate
-
-
Method Details
-
convert
public static BcTlsCertificate convert(BcTlsCrypto crypto, TlsCertificate certificate) throws IOException - Throws:
IOException
-
parseCertificate
public static org.bouncycastle.asn1.x509.Certificate parseCertificate(byte[] encoding) throws IOException - Throws:
IOException
-
getCertificate
public org.bouncycastle.asn1.x509.Certificate getCertificate() -
getEncoded
- Specified by:
getEncoded
in interfaceTlsCertificate
- Overrides:
getEncoded
in classBcTlsRawKeyCertificate
- Throws:
IOException
-
getExtension
public byte[] getExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier extensionOID) throws IOException - Specified by:
getExtension
in interfaceTlsCertificate
- Overrides:
getExtension
in classBcTlsRawKeyCertificate
- Throws:
IOException
-
getSerialNumber
- Specified by:
getSerialNumber
in interfaceTlsCertificate
- Overrides:
getSerialNumber
in classBcTlsRawKeyCertificate
-
getSigAlgOID
- Specified by:
getSigAlgOID
in interfaceTlsCertificate
- Overrides:
getSigAlgOID
in classBcTlsRawKeyCertificate
- Returns:
- the OID of this certificate's 'signatureAlgorithm', as a String.
-
getSigAlgParams
public org.bouncycastle.asn1.ASN1Encodable getSigAlgParams()- Specified by:
getSigAlgParams
in interfaceTlsCertificate
- Overrides:
getSigAlgParams
in classBcTlsRawKeyCertificate
-
supportsKeyUsage
protected boolean supportsKeyUsage(int keyUsageBits) - Overrides:
supportsKeyUsage
in classBcTlsRawKeyCertificate
-