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 TlsPSKIdentitypskIdentity-
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 TlsAuthenticationgetAuthentication()TlsPSKIdentitygetPSKIdentity()protected int[]getSupportedCipherSuites()protected ProtocolVersion[]getSupportedVersions()Get theProtocolVersionvalues that are supported by this peer.-
Methods inherited from class org.bouncycastle.tls.AbstractTlsClient
allowUnexpectedServerExtension, checkForUnexpectedServerExtension, getCertificateAuthorities, getCertificateStatusRequest, getCipherSuites, getClientExtensions, getClientSupplementalData, getDHGroupVerifier, getEarlyKeyShareGroups, getExternalPSKs, getMultiCertStatusRequest, getNamedGroupRoles, getProtocolNames, getProtocolVersions, getSessionToResume, getSNIServerNames, getSRPConfigVerifier, getSRPIdentity, getSupportedGroups, getSupportedSignatureAlgorithms, getSupportedSignatureAlgorithmsCert, getTrustedCAIndication, init, isFallback, notifyHandshakeBeginning, notifyNewSessionTicket, notifySelectedCipherSuite, notifySelectedPSK, notifyServerVersion, notifySessionID, notifySessionToResume, processServerExtensions, processServerSupplementalData
-
Methods inherited from class org.bouncycastle.tls.AbstractTlsPeer
allowLegacyResumption, cancel, getCrypto, getHandshakeTimeoutMillis, getHeartbeat, getHeartbeatPolicy, getKeyExchangeFactory, getMaxCertificateChainLength, getMaxHandshakeMessageSize, getPskKeyExchangeModes, getRenegotiationPolicy, notifyAlertRaised, notifyAlertReceived, notifyCloseHandle, notifyHandshakeComplete, notifySecureRenegotiation, requiresCloseNotify, 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, getMaxCertificateChainLength, getMaxHandshakeMessageSize, getPskKeyExchangeModes, getRenegotiationPolicy, notifyAlertRaised, notifyAlertReceived, notifyCloseHandle, notifyHandshakeComplete, notifySecureRenegotiation, requiresCloseNotify, 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
-
getSupportedVersions
protected ProtocolVersion[] getSupportedVersions()
Description copied from class:AbstractTlsPeerGet theProtocolVersionvalues 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:
getSupportedVersionsin classAbstractTlsPeer- Returns:
- an array of supported
ProtocolVersionvalues.
-
getSupportedCipherSuites
protected int[] getSupportedCipherSuites()
- Specified by:
getSupportedCipherSuitesin classAbstractTlsPeer
-
getPSKIdentity
public TlsPSKIdentity getPSKIdentity()
- Specified by:
getPSKIdentityin interfaceTlsClient- Overrides:
getPSKIdentityin classAbstractTlsClient
-
getAuthentication
public TlsAuthentication getAuthentication() throws java.io.IOException
- Throws:
java.io.IOException
-
-