Class BcTlsCertificate
- java.lang.Object
-
- org.bouncycastle.tls.crypto.impl.bc.BcTlsRawKeyCertificate
-
- org.bouncycastle.tls.crypto.impl.bc.BcTlsCertificate
-
- All Implemented Interfaces:
TlsCertificate
public class BcTlsCertificate extends BcTlsRawKeyCertificate
Implementation class for a single X.509 certificate based on the BC light-weight API.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.bouncycastle.asn1.x509.Certificate
certificate
-
Fields inherited from class org.bouncycastle.tls.crypto.impl.bc.BcTlsRawKeyCertificate
crypto, keyInfo, pubKeyDH, pubKeyEC, pubKeyEd25519, pubKeyEd448, pubKeyRSA
-
-
Constructor Summary
Constructors Constructor Description BcTlsCertificate(BcTlsCrypto crypto, byte[] encoding)
BcTlsCertificate(BcTlsCrypto crypto, org.bouncycastle.asn1.x509.Certificate certificate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static BcTlsCertificate
convert(BcTlsCrypto crypto, TlsCertificate certificate)
org.bouncycastle.asn1.x509.Certificate
getCertificate()
byte[]
getEncoded()
byte[]
getExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier extensionOID)
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 keyUsageBit)
-
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
-
-
-
-
Constructor Detail
-
BcTlsCertificate
public BcTlsCertificate(BcTlsCrypto crypto, byte[] encoding) throws java.io.IOException
- Throws:
java.io.IOException
-
BcTlsCertificate
public BcTlsCertificate(BcTlsCrypto crypto, org.bouncycastle.asn1.x509.Certificate certificate)
-
-
Method Detail
-
convert
public static BcTlsCertificate convert(BcTlsCrypto crypto, TlsCertificate certificate) throws java.io.IOException
- Throws:
java.io.IOException
-
parseCertificate
public static org.bouncycastle.asn1.x509.Certificate parseCertificate(byte[] encoding) throws java.io.IOException
- Throws:
java.io.IOException
-
getCertificate
public org.bouncycastle.asn1.x509.Certificate getCertificate()
-
getEncoded
public byte[] getEncoded() throws java.io.IOException
- Specified by:
getEncoded
in interfaceTlsCertificate
- Overrides:
getEncoded
in classBcTlsRawKeyCertificate
- Throws:
java.io.IOException
-
getExtension
public byte[] getExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier extensionOID) throws java.io.IOException
- Specified by:
getExtension
in interfaceTlsCertificate
- Overrides:
getExtension
in classBcTlsRawKeyCertificate
- Throws:
java.io.IOException
-
getSerialNumber
public java.math.BigInteger getSerialNumber()
- Specified by:
getSerialNumber
in interfaceTlsCertificate
- Overrides:
getSerialNumber
in classBcTlsRawKeyCertificate
-
getSigAlgOID
public java.lang.String 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 keyUsageBit)
- Overrides:
supportsKeyUsage
in classBcTlsRawKeyCertificate
-
-