Top Description Fields Constructors Methods
org.bouncycastle.tls.crypto.impl.jcajce

public Class JceDefaultTlsCredentialedAgreement

extends Object
implements TlsCredentialedAgreement
Class Inheritance
All Implemented Interfaces
org.bouncycastle.tls.TlsCredentialedAgreement, org.bouncycastle.tls.TlsCredentials
Imports
java.io.IOException, java.security.GeneralSecurityException, .PrivateKey, .PublicKey, javax.crypto.interfaces.DHPrivateKey, org.bouncycastle.tls.Certificate, .TlsCredentialedAgreement, org.bouncycastle.tls.crypto.TlsCertificate, .TlsCryptoException, .TlsSecret

Credentialed class generating agreed secrets from a peer's public key for our end of the TLS connection using the JCE.

Field Summary

Modifier and TypeField and Description
private final String
private final Certificate
private final JcaTlsCrypto
private final PrivateKey

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public TlsSecret
generateAgreement(TlsCertificate
public key certificate of our TLS peer.
peerCertificate
)

Implements org.bouncycastle.tls.TlsCredentialedAgreement.generateAgreement.

Calculate an agreed secret based on our credentials and the public key credentials of our peer.
public static String
public Certificate
getCertificate()

Implements org.bouncycastle.tls.TlsCredentials.getCertificate.

Return the certificate structure representing our identity.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

agreementAlgorithmback to summary
private final String agreementAlgorithm
certificateback to summary
private final Certificate certificate
cryptoback to summary
private final JcaTlsCrypto crypto
privateKeyback to summary
private final PrivateKey privateKey

Constructor Detail

JceDefaultTlsCredentialedAgreementback to summary
public JceDefaultTlsCredentialedAgreement(JcaTlsCrypto crypto, Certificate certificate, PrivateKey privateKey)

Method Detail

generateAgreementback to summary
public TlsSecret generateAgreement(TlsCertificate peerCertificate) throws IOException

Implements org.bouncycastle.tls.TlsCredentialedAgreement.generateAgreement.

Doc from org.bouncycastle.tls.TlsCredentialedAgreement.generateAgreement.

Calculate an agreed secret based on our credentials and the public key credentials of our peer.

Parameters
peerCertificate:TlsCertificate

public key certificate of our TLS peer.

Returns:TlsSecret

the agreed secret.

Exceptions
IOException:
in case of an exception on generation of the secret.
getAgreementAlgorithmback to summary
public static String getAgreementAlgorithm(PrivateKey privateKey)
getCertificateback to summary
public Certificate getCertificate()

Implements org.bouncycastle.tls.TlsCredentials.getCertificate.

Doc from org.bouncycastle.tls.TlsCredentials.getCertificate.

Return the certificate structure representing our identity.

Returns:Certificate

our certificate structure.