public class DefaultTlsCredentialedSigner extends java.lang.Object implements TlsCredentialedSigner
Modifier and Type | Field and Description |
---|---|
protected Certificate |
certificate |
protected TlsCryptoParameters |
cryptoParams |
protected SignatureAndHashAlgorithm |
signatureAndHashAlgorithm |
protected TlsSigner |
signer |
Constructor and Description |
---|
DefaultTlsCredentialedSigner(TlsCryptoParameters cryptoParams,
TlsSigner signer,
Certificate certificate,
SignatureAndHashAlgorithm signatureAndHashAlgorithm) |
Modifier and Type | Method and Description |
---|---|
byte[] |
generateRawSignature(byte[] hash)
Generate a signature against the passed in hash.
|
Certificate |
getCertificate()
Return the certificate structure representing our identity.
|
protected SignatureAndHashAlgorithm |
getEffectiveAlgorithm() |
SignatureAndHashAlgorithm |
getSignatureAndHashAlgorithm()
Return the algorithm IDs for the signature algorithm and the associated hash it uses.
|
TlsStreamSigner |
getStreamSigner() |
protected TlsCryptoParameters cryptoParams
protected Certificate certificate
protected SignatureAndHashAlgorithm signatureAndHashAlgorithm
protected TlsSigner signer
public DefaultTlsCredentialedSigner(TlsCryptoParameters cryptoParams, TlsSigner signer, Certificate certificate, SignatureAndHashAlgorithm signatureAndHashAlgorithm)
public Certificate getCertificate()
TlsCredentials
getCertificate
in interface TlsCredentials
public byte[] generateRawSignature(byte[] hash) throws java.io.IOException
TlsCredentialedSigner
generateRawSignature
in interface TlsCredentialedSigner
hash
- a message digest calculated across the message the signature is to apply to.java.io.IOException
- if the hash cannot be processed, or there is an issue with the private credentials.public SignatureAndHashAlgorithm getSignatureAndHashAlgorithm()
TlsCredentialedSigner
getSignatureAndHashAlgorithm
in interface TlsCredentialedSigner
public TlsStreamSigner getStreamSigner() throws java.io.IOException
getStreamSigner
in interface TlsCredentialedSigner
java.io.IOException
protected SignatureAndHashAlgorithm getEffectiveAlgorithm()