Package org.bouncycastle.tls
Class TlsPSKKeyExchange
java.lang.Object
org.bouncycastle.tls.AbstractTlsKeyExchange
org.bouncycastle.tls.TlsPSKKeyExchange
- All Implemented Interfaces:
TlsKeyExchange
(D)TLS PSK key exchange (RFC 4279).
-
Field Summary
Modifier and TypeFieldDescriptionprotected TlsAgreement
protected TlsDHConfig
protected TlsDHGroupVerifier
protected TlsECConfig
protected TlsSecret
protected byte[]
protected byte[]
protected TlsPSKIdentity
protected TlsPSKIdentityManager
protected TlsCredentialedDecryptor
protected TlsEncryptor
Fields inherited from class org.bouncycastle.tls.AbstractTlsKeyExchange
context, keyExchange
-
Constructor Summary
ConstructorDescriptionTlsPSKKeyExchange
(int keyExchange, TlsPSKIdentityManager pskIdentityManager, TlsDHConfig dhConfig, TlsECConfig ecConfig) TlsPSKKeyExchange
(int keyExchange, TlsPSKIdentity pskIdentity, TlsDHGroupVerifier dhGroupVerifier) -
Method Summary
Modifier and TypeMethodDescriptionvoid
protected void
generateEphemeralDH
(OutputStream output) protected void
generateEphemeralECDH
(OutputStream output) protected byte[]
generateOtherSecret
(int pskLength) byte[]
void
processClientCredentials
(TlsCredentials clientCredentials) void
protected void
processEphemeralDH
(byte[] y) protected void
processEphemeralECDH
(byte[] point) void
processServerCertificate
(Certificate serverCertificate) void
processServerCredentials
(TlsCredentials serverCredentials) void
boolean
void
Methods inherited from class org.bouncycastle.tls.AbstractTlsKeyExchange
getClientCertificateTypes, init, processClientCertificate, requiresCertificateVerify, skipClientCredentials, skipServerKeyExchange
-
Field Details
-
pskIdentity
-
pskIdentityManager
-
dhGroupVerifier
-
psk_identity_hint
protected byte[] psk_identity_hint -
psk
protected byte[] psk -
dhConfig
-
ecConfig
-
agreement
-
serverCredentials
-
serverEncryptor
-
preMasterSecret
-
-
Constructor Details
-
TlsPSKKeyExchange
public TlsPSKKeyExchange(int keyExchange, TlsPSKIdentity pskIdentity, TlsDHGroupVerifier dhGroupVerifier) -
TlsPSKKeyExchange
public TlsPSKKeyExchange(int keyExchange, TlsPSKIdentityManager pskIdentityManager, TlsDHConfig dhConfig, TlsECConfig ecConfig)
-
-
Method Details
-
skipServerCredentials
- Throws:
IOException
-
processServerCredentials
- Throws:
IOException
-
processServerCertificate
- Specified by:
processServerCertificate
in interfaceTlsKeyExchange
- Overrides:
processServerCertificate
in classAbstractTlsKeyExchange
- Throws:
IOException
-
generateServerKeyExchange
- Specified by:
generateServerKeyExchange
in interfaceTlsKeyExchange
- Overrides:
generateServerKeyExchange
in classAbstractTlsKeyExchange
- Throws:
IOException
-
requiresServerKeyExchange
public boolean requiresServerKeyExchange()- Specified by:
requiresServerKeyExchange
in interfaceTlsKeyExchange
- Overrides:
requiresServerKeyExchange
in classAbstractTlsKeyExchange
-
processServerKeyExchange
- Specified by:
processServerKeyExchange
in interfaceTlsKeyExchange
- Overrides:
processServerKeyExchange
in classAbstractTlsKeyExchange
- Throws:
IOException
-
processClientCredentials
- Throws:
IOException
-
generateClientKeyExchange
- Throws:
IOException
-
processClientKeyExchange
- Specified by:
processClientKeyExchange
in interfaceTlsKeyExchange
- Overrides:
processClientKeyExchange
in classAbstractTlsKeyExchange
- Throws:
IOException
-
generatePreMasterSecret
- Throws:
IOException
-
generateEphemeralDH
- Throws:
IOException
-
generateEphemeralECDH
- Throws:
IOException
-
generateOtherSecret
- Throws:
IOException
-
processEphemeralDH
- Throws:
IOException
-
processEphemeralECDH
- Throws:
IOException
-