Top Description Fields Constructors Methods
org.bouncycastle.tls.crypto.impl.bc

public Class BcTlsRawKeyCertificate

extends Object
implements TlsCertificate
Class Inheritance
All Implemented Interfaces
org.bouncycastle.tls.crypto.TlsCertificate
Known Direct Subclasses
org.bouncycastle.tls.crypto.impl.bc.BcTlsCertificate
Imports
java.io.IOException, java.math.BigInteger, org.bouncycastle.asn1.ASN1Encodable, .ASN1Encoding, .ASN1ObjectIdentifier, org.bouncycastle.asn1.x509.AlgorithmIdentifier, .KeyUsage, .SubjectPublicKeyInfo, org.bouncycastle.crypto.Digest, .Signer, org.bouncycastle.crypto.engines.RSAEngine, org.bouncycastle.crypto.params.AsymmetricKeyParameter, .DHPublicKeyParameters, .DSAPublicKeyParameters, .ECPublicKeyParameters, .Ed25519PublicKeyParameters, .Ed448PublicKeyParameters, .RSAKeyParameters, org.bouncycastle.crypto.signers.DSADigestSigner, .ECDSASigner, .Ed25519Signer, .Ed448Signer, .PSSSigner, .RSADigestSigner, org.bouncycastle.crypto.util.PublicKeyFactory, org.bouncycastle.tls.AlertDescription, .HashAlgorithm, .SignatureAlgorithm, .SignatureScheme, .TlsFatalAlert, .TlsUtils, org.bouncycastle.tls.crypto.Tls13Verifier, .TlsCertificate, .TlsCertificateRole, .TlsCryptoUtils, .TlsEncryptor, .TlsVerifier, org.bouncycastle.tls.crypto.impl.LegacyTls13Verifier, .RSAUtil

Implementation class for a single X.509 certificate based on the BC light-weight API.

Field Summary

Modifier and TypeField and Description
protected final BcTlsCrypto
protected final SubjectPublicKeyInfo
protected DHPublicKeyParameters
protected ECPublicKeyParameters
protected Ed25519PublicKeyParameters
protected Ed448PublicKeyParameters
protected RSAKeyParameters

Constructor Summary

AccessConstructor and Description
public
BcTlsRawKeyCertificate(BcTlsCrypto crypto, byte[] keyInfo)

public

Method Summary

Modifier and TypeMethod and Description
public TlsCertificate
public TlsEncryptor
createEncryptor(int tlsCertificateRole)

Implements org.bouncycastle.tls.crypto.TlsCertificate.createEncryptor.

Return an encryptor based on the public key in this certificate.

public TlsVerifier
public Tls13Verifier
public byte[]
public byte[]
public short
public DHPublicKeyParameters
public DSAPublicKeyParameters
public ECPublicKeyParameters
public Ed25519PublicKeyParameters
public Ed448PublicKeyParameters
public RSAKeyParameters
protected AsymmetricKeyParameter
public BigInteger
public String
public ASN1Encodable
public SubjectPublicKeyInfo
protected boolean
supportsKeyUsage(int keyUsageBit)

protected boolean
protected boolean
supportsRSA_PSS_PSS(short signatureAlgorithm)

protected boolean
public boolean
protected boolean
supportsSignatureAlgorithm(short signatureAlgorithm, int keyUsage)

public boolean
public void
validateKeyUsage(int keyUsageBit)

protected void
protected void
validateRSA_PSS_PSS(short signatureAlgorithm)

protected void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

cryptoback to summary
protected final BcTlsCrypto crypto
keyInfoback to summary
protected final SubjectPublicKeyInfo keyInfo
pubKeyDHback to summary
protected DHPublicKeyParameters pubKeyDH
pubKeyECback to summary
protected ECPublicKeyParameters pubKeyEC
pubKeyEd25519back to summary
protected Ed25519PublicKeyParameters pubKeyEd25519
pubKeyEd448back to summary
protected Ed448PublicKeyParameters pubKeyEd448
pubKeyRSAback to summary
protected RSAKeyParameters pubKeyRSA

Constructor Detail

BcTlsRawKeyCertificateback to summary
public BcTlsRawKeyCertificate(BcTlsCrypto crypto, byte[] keyInfo)
BcTlsRawKeyCertificateback to summary
public BcTlsRawKeyCertificate(BcTlsCrypto crypto, SubjectPublicKeyInfo keyInfo)

Method Detail

checkUsageInRoleback to summary
public TlsCertificate checkUsageInRole(int tlsCertificateRole) throws IOException

Implements org.bouncycastle.tls.crypto.TlsCertificate.checkUsageInRole.

Parameters
tlsCertificateRole:int

Doc from org.bouncycastle.tls.crypto.TlsCertificate.checkUsageInRole.

TlsCertificateRole

createEncryptorback to summary
public TlsEncryptor createEncryptor(int tlsCertificateRole) throws IOException

Implements org.bouncycastle.tls.crypto.TlsCertificate.createEncryptor.

Doc from org.bouncycastle.tls.crypto.TlsCertificate.createEncryptor.

Return an encryptor based on the public key in this certificate.

Parameters
tlsCertificateRole:int

TlsCertificateRole

Returns:TlsEncryptor

a TlsEncryptor based on this certificate's public key.

createVerifierback to summary
public TlsVerifier createVerifier(short signatureAlgorithm) throws IOException

Implements org.bouncycastle.tls.crypto.TlsCertificate.createVerifier.

Parameters
signatureAlgorithm:short

Doc from org.bouncycastle.tls.crypto.TlsCertificate.createVerifier.

SignatureAlgorithm

createVerifierback to summary
public Tls13Verifier createVerifier(int signatureScheme) throws IOException

Implements org.bouncycastle.tls.crypto.TlsCertificate.createVerifier.

Parameters
signatureScheme:int

Doc from org.bouncycastle.tls.crypto.TlsCertificate.createVerifier.

SignatureScheme

getEncodedback to summary
public byte[] getEncoded() throws IOException

Implements org.bouncycastle.tls.crypto.TlsCertificate.getEncoded.

getExtensionback to summary
public byte[] getExtension(ASN1ObjectIdentifier extensionOID) throws IOException

Implements org.bouncycastle.tls.crypto.TlsCertificate.getExtension.

getLegacySignatureAlgorithmback to summary
public short getLegacySignatureAlgorithm() throws IOException

Implements org.bouncycastle.tls.crypto.TlsCertificate.getLegacySignatureAlgorithm.

Returns:short

Doc from org.bouncycastle.tls.crypto.TlsCertificate.getLegacySignatureAlgorithm.

SignatureAlgorithm

getPubKeyDHback to summary
public DHPublicKeyParameters getPubKeyDH() throws IOException
getPubKeyDSSback to summary
public DSAPublicKeyParameters getPubKeyDSS() throws IOException
getPubKeyECback to summary
public ECPublicKeyParameters getPubKeyEC() throws IOException
getPubKeyEd25519back to summary
public Ed25519PublicKeyParameters getPubKeyEd25519() throws IOException
getPubKeyEd448back to summary
public Ed448PublicKeyParameters getPubKeyEd448() throws IOException
getPubKeyRSAback to summary
public RSAKeyParameters getPubKeyRSA() throws IOException
getPublicKeyback to summary
protected AsymmetricKeyParameter getPublicKey() throws IOException
getSerialNumberback to summary
public BigInteger getSerialNumber()

Implements org.bouncycastle.tls.crypto.TlsCertificate.getSerialNumber.

getSigAlgOIDback to summary
public String getSigAlgOID()

Implements org.bouncycastle.tls.crypto.TlsCertificate.getSigAlgOID.

Returns:String

Doc from org.bouncycastle.tls.crypto.TlsCertificate.getSigAlgOID.

the OID of this certificate's 'signatureAlgorithm', as a String.

getSigAlgParamsback to summary
public ASN1Encodable getSigAlgParams()

Implements org.bouncycastle.tls.crypto.TlsCertificate.getSigAlgParams.

getSubjectPublicKeyInfoback to summary
public SubjectPublicKeyInfo getSubjectPublicKeyInfo()
supportsKeyUsageback to summary
protected boolean supportsKeyUsage(int keyUsageBit)
supportsRSA_PKCS1back to summary
protected boolean supportsRSA_PKCS1()
supportsRSA_PSS_PSSback to summary
protected boolean supportsRSA_PSS_PSS(short signatureAlgorithm)
supportsRSA_PSS_RSAEback to summary
protected boolean supportsRSA_PSS_RSAE()
supportsSignatureAlgorithmback to summary
public boolean supportsSignatureAlgorithm(short signatureAlgorithm) throws IOException

Implements org.bouncycastle.tls.crypto.TlsCertificate.supportsSignatureAlgorithm.

Parameters
signatureAlgorithm:short

Doc from org.bouncycastle.tls.crypto.TlsCertificate.supportsSignatureAlgorithm.

SignatureAlgorithm

Returns:boolean

Doc from org.bouncycastle.tls.crypto.TlsCertificate.supportsSignatureAlgorithm.

true if (and only if) this certificate can be used to verify the given signature algorithm.

supportsSignatureAlgorithmback to summary
protected boolean supportsSignatureAlgorithm(short signatureAlgorithm, int keyUsage) throws IOException
supportsSignatureAlgorithmCAback to summary
public boolean supportsSignatureAlgorithmCA(short signatureAlgorithm) throws IOException

Implements org.bouncycastle.tls.crypto.TlsCertificate.supportsSignatureAlgorithmCA.

validateKeyUsageback to summary
public void validateKeyUsage(int keyUsageBit) throws IOException
validateRSA_PKCS1back to summary
protected void validateRSA_PKCS1() throws IOException
validateRSA_PSS_PSSback to summary
protected void validateRSA_PSS_PSS(short signatureAlgorithm) throws IOException
validateRSA_PSS_RSAEback to summary
protected void validateRSA_PSS_RSAE() throws IOException