Package org.bouncycastle.tls
Class DefaultTlsCredentialedSigner
java.lang.Object
org.bouncycastle.tls.DefaultTlsCredentialedSigner
- All Implemented Interfaces:
TlsCredentialedSigner,TlsCredentials
- Direct Known Subclasses:
BcDefaultTlsCredentialedSigner,JcaDefaultTlsCredentialedSigner
Container class for generating signatures that carries the signature type, parameters, public key certificate and public key's associated signer object.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Certificateprotected TlsCryptoParametersprotected SignatureAndHashAlgorithmprotected TlsSigner -
Constructor Summary
ConstructorsConstructorDescriptionDefaultTlsCredentialedSigner(TlsCryptoParameters cryptoParams, TlsSigner signer, Certificate certificate, SignatureAndHashAlgorithm signatureAndHashAlgorithm) -
Method Summary
Modifier and TypeMethodDescriptionbyte[]generateRawSignature(byte[] hash) Generate a signature against the passed in hash.Return the certificate structure representing our identity.protected SignatureAndHashAlgorithmReturn the algorithm IDs for the signature algorithm and the associated hash it uses.
-
Field Details
-
cryptoParams
-
certificate
-
signatureAndHashAlgorithm
-
signer
-
-
Constructor Details
-
DefaultTlsCredentialedSigner
public DefaultTlsCredentialedSigner(TlsCryptoParameters cryptoParams, TlsSigner signer, Certificate certificate, SignatureAndHashAlgorithm signatureAndHashAlgorithm)
-
-
Method Details
-
getCertificate
Description copied from interface:TlsCredentialsReturn the certificate structure representing our identity.- Specified by:
getCertificatein interfaceTlsCredentials- Returns:
- our certificate structure.
-
generateRawSignature
Description copied from interface:TlsCredentialedSignerGenerate a signature against the passed in hash.- Specified by:
generateRawSignaturein interfaceTlsCredentialedSigner- Parameters:
hash- a message digest calculated across the message the signature is to apply to.- Returns:
- an encoded signature.
- Throws:
IOException- if the hash cannot be processed, or there is an issue with the private credentials.
-
getSignatureAndHashAlgorithm
Description copied from interface:TlsCredentialedSignerReturn the algorithm IDs for the signature algorithm and the associated hash it uses.- Specified by:
getSignatureAndHashAlgorithmin interfaceTlsCredentialedSigner- Returns:
- the full algorithm details for the signature.
-
getStreamSigner
- Specified by:
getStreamSignerin interfaceTlsCredentialedSigner- Throws:
IOException
-
getEffectiveAlgorithm
-