Class JceDefaultTlsCredentialedDecryptor
java.lang.Object
org.bouncycastle.tls.crypto.impl.jcajce.JceDefaultTlsCredentialedDecryptor
- All Implemented Interfaces:
TlsCredentialedDecryptor
,TlsCredentials
Credentialed class decrypting RSA encrypted secrets sent from a peer for our end of the TLS connection using the JCE.
-
Field Summary
Modifier and TypeFieldDescriptionprotected Certificate
protected JcaTlsCrypto
protected PrivateKey
-
Constructor Summary
ConstructorDescriptionJceDefaultTlsCredentialedDecryptor
(JcaTlsCrypto crypto, Certificate certificate, PrivateKey privateKey) -
Method Summary
Modifier and TypeMethodDescriptiondecrypt
(TlsCryptoParameters cryptoParams, byte[] ciphertext) Decrypt the passed in cipher text using the parameters available.Return the certificate structure representing our identity.protected TlsSecret
safeDecryptPreMasterSecret
(TlsCryptoParameters cryptoParams, PrivateKey rsaServerPrivateKey, byte[] encryptedPreMasterSecret)
-
Field Details
-
crypto
-
certificate
-
privateKey
-
-
Constructor Details
-
JceDefaultTlsCredentialedDecryptor
public JceDefaultTlsCredentialedDecryptor(JcaTlsCrypto crypto, Certificate certificate, PrivateKey privateKey)
-
-
Method Details
-
getCertificate
Description copied from interface:TlsCredentials
Return the certificate structure representing our identity.- Specified by:
getCertificate
in interfaceTlsCredentials
- Returns:
- our certificate structure.
-
decrypt
Description copied from interface:TlsCredentialedDecryptor
Decrypt the passed in cipher text using the parameters available.- Specified by:
decrypt
in interfaceTlsCredentialedDecryptor
- Parameters:
cryptoParams
- the parameters to use for the decryption.ciphertext
- the cipher text containing the secret.- Returns:
- a TLS secret.
- Throws:
IOException
- on a parsing or decryption error.
-
safeDecryptPreMasterSecret
protected TlsSecret safeDecryptPreMasterSecret(TlsCryptoParameters cryptoParams, PrivateKey rsaServerPrivateKey, byte[] encryptedPreMasterSecret)
-