Class JcaTlsCertificate
java.lang.Object
org.bouncycastle.tls.crypto.impl.jcajce.JcaTlsRawKeyCertificate
org.bouncycastle.tls.crypto.impl.jcajce.JcaTlsCertificate
- All Implemented Interfaces:
TlsCertificate
Implementation class for a single X.509 certificate based on the JCA. An X.509 certificate is a
SubjectPublicKeyInfo plus X.509 metadata, so this extends the raw public key
JcaTlsRawKeyCertificate, sharing all of the signature/verifier handling and overriding only
the public-key source and the X.509-specific accessors.-
Field Summary
FieldsFields inherited from class JcaTlsRawKeyCertificate
crypto, keyInfo, KU_CRL_SIGN, KU_DATA_ENCIPHERMENT, KU_DECIPHER_ONLY, KU_DIGITAL_SIGNATURE, KU_ENCIPHER_ONLY, KU_KEY_AGREEMENT, KU_KEY_CERT_SIGN, KU_KEY_ENCIPHERMENT, KU_NON_REPUDIATION, pubKeyDH, pubKeyEC, pubKeyRSA -
Constructor Summary
ConstructorsConstructorDescriptionJcaTlsCertificate(JcaTlsCrypto crypto, byte[] encoding) JcaTlsCertificate(JcaTlsCrypto crypto, X509Certificate certificate) -
Method Summary
Modifier and TypeMethodDescriptionstatic JcaTlsCertificateconvert(JcaTlsCrypto crypto, TlsCertificate certificate) byte[]byte[]getExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier extensionOID) protected PublicKeyorg.bouncycastle.asn1.ASN1Encodableprotected org.bouncycastle.asn1.x509.SubjectPublicKeyInfostatic X509CertificateparseCertificate(org.bouncycastle.jcajce.util.JcaJceHelper helper, byte[] encoding) protected booleansupportsKeyUsageBit(int keyUsageBit) Methods inherited from class JcaTlsRawKeyCertificate
checkUsageInRole, createEncryptor, createVerifier, createVerifier, getLegacySignatureAlgorithm, implSupportsSignatureAlgorithm, supportsMLDSA, supportsRSA_PKCS1, supportsRSA_PSS_PSS, supportsRSA_PSS_RSAE, supportsSignatureAlgorithm, supportsSignatureAlgorithmCA, supportsSLHDSA, validateKeyUsageBit, validateMLDSA, validateRSA_PKCS1, validateRSA_PSS_PSS, validateRSA_PSS_RSAE, validateSLHDSA
-
Field Details
-
certificate
-
-
Constructor Details
-
JcaTlsCertificate
- Throws:
IOException
-
JcaTlsCertificate
-
-
Method Details
-
convert
public static JcaTlsCertificate convert(JcaTlsCrypto crypto, TlsCertificate certificate) throws IOException - Throws:
IOException
-
parseCertificate
public static X509Certificate parseCertificate(org.bouncycastle.jcajce.util.JcaJceHelper helper, byte[] encoding) throws IOException - Throws:
IOException
-
getEncoded
- Specified by:
getEncodedin interfaceTlsCertificate- Overrides:
getEncodedin classJcaTlsRawKeyCertificate- Throws:
IOException
-
getExtension
public byte[] getExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier extensionOID) throws IOException - Specified by:
getExtensionin interfaceTlsCertificate- Overrides:
getExtensionin classJcaTlsRawKeyCertificate- Throws:
IOException
-
getSerialNumber
- Specified by:
getSerialNumberin interfaceTlsCertificate- Overrides:
getSerialNumberin classJcaTlsRawKeyCertificate
-
getSigAlgOID
- Specified by:
getSigAlgOIDin interfaceTlsCertificate- Overrides:
getSigAlgOIDin classJcaTlsRawKeyCertificate- Returns:
- the OID of this certificate's 'signatureAlgorithm', as a String.
-
getSigAlgParams
- Specified by:
getSigAlgParamsin interfaceTlsCertificate- Overrides:
getSigAlgParamsin classJcaTlsRawKeyCertificate- Throws:
IOException
-
getX509Certificate
-
getPublicKey
- Overrides:
getPublicKeyin classJcaTlsRawKeyCertificate- Throws:
IOException
-
getSubjectPublicKeyInfo
protected org.bouncycastle.asn1.x509.SubjectPublicKeyInfo getSubjectPublicKeyInfo() throws IOException- Overrides:
getSubjectPublicKeyInfoin classJcaTlsRawKeyCertificate- Throws:
IOException
-
supportsKeyUsageBit
protected boolean supportsKeyUsageBit(int keyUsageBit) - Overrides:
supportsKeyUsageBitin classJcaTlsRawKeyCertificate
-