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
ConstructorsConstructorDescriptionJceDefaultTlsCredentialedAgreement(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 StringgetAgreementAlgorithm(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:TlsCredentialsReturn the certificate structure representing our identity.- Specified by:
getCertificatein interfaceTlsCredentials- Returns:
- our certificate structure.
-
generateAgreement
Description copied from interface:TlsCredentialedAgreementCalculate an agreed secret based on our credentials and the public key credentials of our peer.- Specified by:
generateAgreementin 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.
-