Class BcDefaultTlsCredentialedAgreement
java.lang.Object
org.bouncycastle.tls.crypto.impl.bc.BcDefaultTlsCredentialedAgreement
- 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 BC light-weight API.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBcDefaultTlsCredentialedAgreement
(BcTlsCrypto crypto, Certificate certificate, org.bouncycastle.crypto.params.AsymmetricKeyParameter privateKey) -
Method Summary
Modifier and TypeMethodDescriptiongenerateAgreement
(TlsCertificate peerCertificate) Calculate an agreed secret based on our credentials and the public key credentials of our peer.Return the certificate structure representing our identity.
-
Field Details
-
agreementCredentials
-
-
Constructor Details
-
BcDefaultTlsCredentialedAgreement
public BcDefaultTlsCredentialedAgreement(BcTlsCrypto crypto, Certificate certificate, org.bouncycastle.crypto.params.AsymmetricKeyParameter 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.
-
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.
-