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.Certificatecertificate-
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 BcTlsCertificateconvert(BcTlsCrypto crypto, TlsCertificate certificate)org.bouncycastle.asn1.x509.CertificategetCertificate()byte[]getEncoded()byte[]getExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier extensionOID)java.math.BigIntegergetSerialNumber()java.lang.StringgetSigAlgOID()org.bouncycastle.asn1.ASN1EncodablegetSigAlgParams()static org.bouncycastle.asn1.x509.CertificateparseCertificate(byte[] encoding)protected booleansupportsKeyUsage(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
-
-
-
-
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:
getEncodedin interfaceTlsCertificate- Overrides:
getEncodedin classBcTlsRawKeyCertificate- Throws:
java.io.IOException
-
getExtension
public byte[] getExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier extensionOID) throws java.io.IOException- Specified by:
getExtensionin interfaceTlsCertificate- Overrides:
getExtensionin classBcTlsRawKeyCertificate- Throws:
java.io.IOException
-
getSerialNumber
public java.math.BigInteger getSerialNumber()
- Specified by:
getSerialNumberin interfaceTlsCertificate- Overrides:
getSerialNumberin classBcTlsRawKeyCertificate
-
getSigAlgOID
public java.lang.String getSigAlgOID()
- Specified by:
getSigAlgOIDin interfaceTlsCertificate- Overrides:
getSigAlgOIDin classBcTlsRawKeyCertificate- Returns:
- the OID of this certificate's 'signatureAlgorithm', as a String.
-
getSigAlgParams
public org.bouncycastle.asn1.ASN1Encodable getSigAlgParams()
- Specified by:
getSigAlgParamsin interfaceTlsCertificate- Overrides:
getSigAlgParamsin classBcTlsRawKeyCertificate
-
supportsKeyUsage
protected boolean supportsKeyUsage(int keyUsageBits)
- Overrides:
supportsKeyUsagein classBcTlsRawKeyCertificate
-
-