Package org.bouncycastle.tls.crypto
Interface TlsCertificate
-
- All Known Implementing Classes:
BcTlsCertificate,JcaTlsCertificate
public interface TlsCertificateInterface providing the functional representation of a single X.509 certificate.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TlsCertificatecheckUsageInRole(int tlsCertificateRole)TlsEncryptorcreateEncryptor(int tlsCertificateRole)Return an encryptor based on the public key in this certificate.TlsVerifiercreateVerifier(int signatureScheme)TlsVerifiercreateVerifier(short signatureAlgorithm)byte[]getEncoded()byte[]getExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier extensionOID)shortgetLegacySignatureAlgorithm()java.math.BigIntegergetSerialNumber()java.lang.StringgetSigAlgOID()org.bouncycastle.asn1.ASN1EncodablegetSigAlgParams()booleansupportsSignatureAlgorithm(short signatureAlgorithm)booleansupportsSignatureAlgorithmCA(short signatureAlgorithm)
-
-
-
Method Detail
-
createEncryptor
TlsEncryptor createEncryptor(int tlsCertificateRole) throws java.io.IOException
Return an encryptor based on the public key in this certificate.- Parameters:
tlsCertificateRole-TlsCertificateRole- Returns:
- a TlsEncryptor based on this certificate's public key.
- Throws:
java.io.IOException
-
createVerifier
TlsVerifier createVerifier(short signatureAlgorithm) throws java.io.IOException
- Parameters:
signatureAlgorithm-SignatureAlgorithm- Throws:
java.io.IOException
-
createVerifier
TlsVerifier createVerifier(int signatureScheme) throws java.io.IOException
- Parameters:
signatureScheme-SignatureScheme- Throws:
java.io.IOException
-
getEncoded
byte[] getEncoded() throws java.io.IOException- Throws:
java.io.IOException
-
getExtension
byte[] getExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier extensionOID) throws java.io.IOException- Throws:
java.io.IOException
-
getSerialNumber
java.math.BigInteger getSerialNumber()
-
getSigAlgOID
java.lang.String getSigAlgOID()
- Returns:
- the OID of this certificate's 'signatureAlgorithm', as a String.
-
getSigAlgParams
org.bouncycastle.asn1.ASN1Encodable getSigAlgParams() throws java.io.IOException- Throws:
java.io.IOException
-
getLegacySignatureAlgorithm
short getLegacySignatureAlgorithm() throws java.io.IOException- Returns:
SignatureAlgorithm- Throws:
java.io.IOException
-
supportsSignatureAlgorithm
boolean supportsSignatureAlgorithm(short signatureAlgorithm) throws java.io.IOException- Parameters:
signatureAlgorithm-SignatureAlgorithm- Returns:
- true if (and only if) this certificate can be used to verify the given signature algorithm.
- Throws:
java.io.IOException
-
supportsSignatureAlgorithmCA
boolean supportsSignatureAlgorithmCA(short signatureAlgorithm) throws java.io.IOException- Throws:
java.io.IOException
-
checkUsageInRole
TlsCertificate checkUsageInRole(int tlsCertificateRole) throws java.io.IOException
- Parameters:
tlsCertificateRole-TlsCertificateRole- Throws:
java.io.IOException
-
-