public class JceDefaultTlsCredentialedDecryptor extends java.lang.Object implements TlsCredentialedDecryptor
Modifier and Type | Field and Description |
---|---|
protected Certificate |
certificate |
protected JcaTlsCrypto |
crypto |
protected java.security.PrivateKey |
privateKey |
Constructor and Description |
---|
JceDefaultTlsCredentialedDecryptor(JcaTlsCrypto crypto,
Certificate certificate,
java.security.PrivateKey privateKey) |
Modifier and Type | Method and Description |
---|---|
TlsSecret |
decrypt(TlsCryptoParameters cryptoParams,
byte[] ciphertext)
Decrypt the passed in cipher text using the parameters available.
|
Certificate |
getCertificate()
Return the certificate structure representing our identity.
|
protected TlsSecret |
safeDecryptPreMasterSecret(TlsCryptoParameters cryptoParams,
java.security.PrivateKey rsaServerPrivateKey,
byte[] encryptedPreMasterSecret) |
protected JcaTlsCrypto crypto
protected Certificate certificate
protected java.security.PrivateKey privateKey
public JceDefaultTlsCredentialedDecryptor(JcaTlsCrypto crypto, Certificate certificate, java.security.PrivateKey privateKey)
public Certificate getCertificate()
TlsCredentials
getCertificate
in interface TlsCredentials
public TlsSecret decrypt(TlsCryptoParameters cryptoParams, byte[] ciphertext) throws java.io.IOException
TlsCredentialedDecryptor
decrypt
in interface TlsCredentialedDecryptor
cryptoParams
- the parameters to use for the decryption.ciphertext
- the cipher text containing the secret.java.io.IOException
- on a parsing or decryption error.protected TlsSecret safeDecryptPreMasterSecret(TlsCryptoParameters cryptoParams, java.security.PrivateKey rsaServerPrivateKey, byte[] encryptedPreMasterSecret)