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 Certificate
protected TlsCryptoParameters
protected SignatureAndHashAlgorithm
protected 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 SignatureAndHashAlgorithm
Return the algorithm IDs for the signature algorithm and the associated hash it uses.
-
Field Details
-
Constructor Details
-
DefaultTlsCredentialedSigner
public DefaultTlsCredentialedSigner(TlsCryptoParameters cryptoParams, TlsSigner signer, Certificate certificate, SignatureAndHashAlgorithm signatureAndHashAlgorithm)
-
-
Method Details
-
getCertificate
Description copied from interface:TlsCredentials
Return the certificate structure representing our identity.- Specified by:
getCertificate
in interfaceTlsCredentials
- Returns:
- our certificate structure.
-
generateRawSignature
Description copied from interface:TlsCredentialedSigner
Generate a signature against the passed in hash.- Specified by:
generateRawSignature
in 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:TlsCredentialedSigner
Return the algorithm IDs for the signature algorithm and the associated hash it uses.- Specified by:
getSignatureAndHashAlgorithm
in interfaceTlsCredentialedSigner
- Returns:
- the full algorithm details for the signature.
-
getStreamSigner
- Specified by:
getStreamSigner
in interfaceTlsCredentialedSigner
- Throws:
IOException
-
getEffectiveAlgorithm
-