Package org.bouncycastle.tls
Class PSKTlsClient
- java.lang.Object
-
- org.bouncycastle.tls.AbstractTlsPeer
-
- org.bouncycastle.tls.AbstractTlsClient
-
- org.bouncycastle.tls.PSKTlsClient
-
public class PSKTlsClient extends AbstractTlsClient
-
-
Field Summary
Fields Modifier and Type Field Description protected TlsPSKIdentity
pskIdentity
-
Fields inherited from class org.bouncycastle.tls.AbstractTlsClient
cipherSuites, context, protocolVersions, supportedGroups, supportedSignatureAlgorithms, supportedSignatureAlgorithmsCert
-
-
Constructor Summary
Constructors Constructor Description PSKTlsClient(TlsCrypto crypto, byte[] identity, byte[] psk)
PSKTlsClient(TlsCrypto crypto, TlsPSKIdentity pskIdentity)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TlsAuthentication
getAuthentication()
TlsPSKIdentity
getPSKIdentity()
protected int[]
getSupportedCipherSuites()
protected ProtocolVersion[]
getSupportedVersions()
Get theProtocolVersion
values that are supported by this peer.-
Methods inherited from class org.bouncycastle.tls.AbstractTlsClient
allowUnexpectedServerExtension, checkForUnexpectedServerExtension, getCertificateAuthorities, getCertificateStatusRequest, getCipherSuites, getClientExtensions, getClientSupplementalData, getDHGroupVerifier, getEarlyKeyShareGroups, getMultiCertStatusRequest, getNamedGroupRoles, getProtocolNames, getProtocolVersions, getSessionToResume, getSNIServerNames, getSRPConfigVerifier, getSRPIdentity, getSupportedGroups, getSupportedSignatureAlgorithms, getSupportedSignatureAlgorithmsCert, getTrustedCAIndication, init, isFallback, notifyHandshakeBeginning, notifyNewSessionTicket, notifySelectedCipherSuite, notifyServerVersion, notifySessionID, processServerExtensions, processServerSupplementalData
-
Methods inherited from class org.bouncycastle.tls.AbstractTlsPeer
allowLegacyResumption, cancel, getCrypto, getHandshakeTimeoutMillis, getHeartbeat, getHeartbeatPolicy, getKeyExchangeFactory, getRenegotiationPolicy, notifyAlertRaised, notifyAlertReceived, notifyCloseHandle, notifyHandshakeComplete, notifySecureRenegotiation, requiresExtendedMasterSecret, shouldCheckSigAlgOfPeerCerts, shouldUseExtendedMasterSecret, shouldUseExtendedPadding, shouldUseGMTUnixTime
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.bouncycastle.tls.TlsPeer
allowLegacyResumption, cancel, getCrypto, getHandshakeTimeoutMillis, getHeartbeat, getHeartbeatPolicy, getKeyExchangeFactory, getRenegotiationPolicy, notifyAlertRaised, notifyAlertReceived, notifyCloseHandle, notifyHandshakeComplete, notifySecureRenegotiation, requiresExtendedMasterSecret, shouldCheckSigAlgOfPeerCerts, shouldUseExtendedMasterSecret, shouldUseExtendedPadding, shouldUseGMTUnixTime
-
-
-
-
Field Detail
-
pskIdentity
protected TlsPSKIdentity pskIdentity
-
-
Constructor Detail
-
PSKTlsClient
public PSKTlsClient(TlsCrypto crypto, byte[] identity, byte[] psk)
-
PSKTlsClient
public PSKTlsClient(TlsCrypto crypto, TlsPSKIdentity pskIdentity)
-
-
Method Detail
-
getSupportedCipherSuites
protected int[] getSupportedCipherSuites()
- Specified by:
getSupportedCipherSuites
in classAbstractTlsPeer
-
getSupportedVersions
protected ProtocolVersion[] getSupportedVersions()
Description copied from class:AbstractTlsPeer
Get theProtocolVersion
values that are supported by this peer. WARNING: Mixing DTLS and TLS versions in the returned array is currently NOT supported. Use a separate (sub-)class for each case.- Overrides:
getSupportedVersions
in classAbstractTlsPeer
- Returns:
- an array of supported
ProtocolVersion
values.
-
getPSKIdentity
public TlsPSKIdentity getPSKIdentity()
- Specified by:
getPSKIdentity
in interfaceTlsClient
- Overrides:
getPSKIdentity
in classAbstractTlsClient
-
getAuthentication
public TlsAuthentication getAuthentication() throws java.io.IOException
- Throws:
java.io.IOException
-
-