public class BcDefaultTlsCredentialedAgreement extends java.lang.Object implements TlsCredentialedAgreement
Modifier and Type | Field and Description |
---|---|
protected TlsCredentialedAgreement |
agreementCredentials |
Constructor and Description |
---|
BcDefaultTlsCredentialedAgreement(BcTlsCrypto crypto,
Certificate certificate,
org.bouncycastle.crypto.params.AsymmetricKeyParameter privateKey) |
Modifier and Type | Method and Description |
---|---|
TlsSecret |
generateAgreement(TlsCertificate peerCertificate)
Calculate an agreed secret based on our credentials and the public key credentials of our peer.
|
Certificate |
getCertificate()
Return the certificate structure representing our identity.
|
protected TlsCredentialedAgreement agreementCredentials
public BcDefaultTlsCredentialedAgreement(BcTlsCrypto crypto, Certificate certificate, org.bouncycastle.crypto.params.AsymmetricKeyParameter privateKey)
public Certificate getCertificate()
TlsCredentials
getCertificate
in interface TlsCredentials
public TlsSecret generateAgreement(TlsCertificate peerCertificate) throws java.io.IOException
TlsCredentialedAgreement
generateAgreement
in interface TlsCredentialedAgreement
peerCertificate
- public key certificate of our TLS peer.java.io.IOException
- in case of an exception on generation of the secret.