Class JceDefaultTlsCredentialedAgreement
java.lang.Object
org.bouncycastle.tls.crypto.impl.jcajce.JceDefaultTlsCredentialedAgreement
- All Implemented Interfaces:
TlsCredentialedAgreement
,TlsCredentials
Credentialed class generating agreed secrets from a peer's public key for our end of the TLS connection using the JCE.
-
Constructor Summary
ConstructorDescriptionJceDefaultTlsCredentialedAgreement
(JcaTlsCrypto crypto, Certificate certificate, PrivateKey privateKey) -
Method Summary
Modifier and TypeMethodDescriptiongenerateAgreement
(TlsCertificate peerCertificate) Calculate an agreed secret based on our credentials and the public key credentials of our peer.static String
getAgreementAlgorithm
(PrivateKey privateKey) Return the certificate structure representing our identity.
-
Constructor Details
-
JceDefaultTlsCredentialedAgreement
public JceDefaultTlsCredentialedAgreement(JcaTlsCrypto crypto, Certificate certificate, PrivateKey privateKey)
-
-
Method Details
-
getAgreementAlgorithm
-
getCertificate
Description copied from interface:TlsCredentials
Return the certificate structure representing our identity.- Specified by:
getCertificate
in interfaceTlsCredentials
- Returns:
- our certificate structure.
-
generateAgreement
Description copied from interface:TlsCredentialedAgreement
Calculate an agreed secret based on our credentials and the public key credentials of our peer.- Specified by:
generateAgreement
in interfaceTlsCredentialedAgreement
- Parameters:
peerCertificate
- public key certificate of our TLS peer.- Returns:
- the agreed secret.
- Throws:
IOException
- in case of an exception on generation of the secret.
-