org.bouncycastle.crypto.tls
Class TlsSRPKeyExchange
java.lang.Object
org.bouncycastle.crypto.tls.AbstractTlsKeyExchange
org.bouncycastle.crypto.tls.TlsSRPKeyExchange
- All Implemented Interfaces:
- TlsKeyExchange
public class TlsSRPKeyExchange
- extends AbstractTlsKeyExchange
TLS 1.1 SRP key exchange (RFC 5054).
Constructor Summary |
TlsSRPKeyExchange(int keyExchange,
java.util.Vector supportedSignatureAlgorithms,
byte[] identity,
byte[] password)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
tlsSigner
protected TlsSigner tlsSigner
identity
protected byte[] identity
password
protected byte[] password
serverPublicKey
protected AsymmetricKeyParameter serverPublicKey
s
protected byte[] s
B
protected java.math.BigInteger B
srpClient
protected SRP6Client srpClient
TlsSRPKeyExchange
public TlsSRPKeyExchange(int keyExchange,
java.util.Vector supportedSignatureAlgorithms,
byte[] identity,
byte[] password)
init
public void init(TlsContext context)
- Specified by:
init
in interface TlsKeyExchange
- Overrides:
init
in class AbstractTlsKeyExchange
skipServerCredentials
public void skipServerCredentials()
throws java.io.IOException
- Throws:
java.io.IOException
processServerCertificate
public void processServerCertificate(Certificate serverCertificate)
throws java.io.IOException
- Specified by:
processServerCertificate
in interface TlsKeyExchange
- Overrides:
processServerCertificate
in class AbstractTlsKeyExchange
- Throws:
java.io.IOException
requiresServerKeyExchange
public boolean requiresServerKeyExchange()
- Specified by:
requiresServerKeyExchange
in interface TlsKeyExchange
- Overrides:
requiresServerKeyExchange
in class AbstractTlsKeyExchange
processServerKeyExchange
public void processServerKeyExchange(java.io.InputStream input)
throws java.io.IOException
- Specified by:
processServerKeyExchange
in interface TlsKeyExchange
- Overrides:
processServerKeyExchange
in class AbstractTlsKeyExchange
- Throws:
java.io.IOException
validateCertificateRequest
public void validateCertificateRequest(CertificateRequest certificateRequest)
throws java.io.IOException
- Throws:
java.io.IOException
processClientCredentials
public void processClientCredentials(TlsCredentials clientCredentials)
throws java.io.IOException
- Throws:
java.io.IOException
generateClientKeyExchange
public void generateClientKeyExchange(java.io.OutputStream output)
throws java.io.IOException
- Throws:
java.io.IOException
generatePremasterSecret
public byte[] generatePremasterSecret()
throws java.io.IOException
- Throws:
java.io.IOException
initVerifyer
protected Signer initVerifyer(TlsSigner tlsSigner,
SecurityParameters securityParameters)