Package org.bouncycastle.crypto.tls
Class AbstractTlsKeyExchange
- java.lang.Object
-
- org.bouncycastle.crypto.tls.AbstractTlsKeyExchange
-
- All Implemented Interfaces:
TlsKeyExchange
- Direct Known Subclasses:
TlsDHKeyExchange
,TlsECDHKeyExchange
,TlsPSKKeyExchange
,TlsRSAKeyExchange
,TlsSRPKeyExchange
public abstract class AbstractTlsKeyExchange extends java.lang.Object implements TlsKeyExchange
-
-
Field Summary
Fields Modifier and Type Field Description protected TlsContext
context
protected int
keyExchange
protected java.util.Vector
supportedSignatureAlgorithms
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractTlsKeyExchange(int keyExchange, java.util.Vector supportedSignatureAlgorithms)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
generateServerKeyExchange()
void
init(TlsContext context)
protected DigitallySigned
parseSignature(java.io.InputStream input)
void
processClientCertificate(Certificate clientCertificate)
void
processClientKeyExchange(java.io.InputStream input)
void
processServerCertificate(Certificate serverCertificate)
void
processServerCredentials(TlsCredentials serverCredentials)
void
processServerKeyExchange(java.io.InputStream input)
boolean
requiresServerKeyExchange()
void
skipClientCredentials()
void
skipServerKeyExchange()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.bouncycastle.crypto.tls.TlsKeyExchange
generateClientKeyExchange, generatePremasterSecret, processClientCredentials, skipServerCredentials, validateCertificateRequest
-
-
-
-
Field Detail
-
keyExchange
protected int keyExchange
-
supportedSignatureAlgorithms
protected java.util.Vector supportedSignatureAlgorithms
-
context
protected TlsContext context
-
-
Method Detail
-
parseSignature
protected DigitallySigned parseSignature(java.io.InputStream input) throws java.io.IOException
- Throws:
java.io.IOException
-
init
public void init(TlsContext context)
- Specified by:
init
in interfaceTlsKeyExchange
-
processServerCertificate
public void processServerCertificate(Certificate serverCertificate) throws java.io.IOException
- Specified by:
processServerCertificate
in interfaceTlsKeyExchange
- Throws:
java.io.IOException
-
processServerCredentials
public void processServerCredentials(TlsCredentials serverCredentials) throws java.io.IOException
- Specified by:
processServerCredentials
in interfaceTlsKeyExchange
- Throws:
java.io.IOException
-
requiresServerKeyExchange
public boolean requiresServerKeyExchange()
- Specified by:
requiresServerKeyExchange
in interfaceTlsKeyExchange
-
generateServerKeyExchange
public byte[] generateServerKeyExchange() throws java.io.IOException
- Specified by:
generateServerKeyExchange
in interfaceTlsKeyExchange
- Throws:
java.io.IOException
-
skipServerKeyExchange
public void skipServerKeyExchange() throws java.io.IOException
- Specified by:
skipServerKeyExchange
in interfaceTlsKeyExchange
- Throws:
java.io.IOException
-
processServerKeyExchange
public void processServerKeyExchange(java.io.InputStream input) throws java.io.IOException
- Specified by:
processServerKeyExchange
in interfaceTlsKeyExchange
- Throws:
java.io.IOException
-
skipClientCredentials
public void skipClientCredentials() throws java.io.IOException
- Specified by:
skipClientCredentials
in interfaceTlsKeyExchange
- Throws:
java.io.IOException
-
processClientCertificate
public void processClientCertificate(Certificate clientCertificate) throws java.io.IOException
- Specified by:
processClientCertificate
in interfaceTlsKeyExchange
- Throws:
java.io.IOException
-
processClientKeyExchange
public void processClientKeyExchange(java.io.InputStream input) throws java.io.IOException
- Specified by:
processClientKeyExchange
in interfaceTlsKeyExchange
- Throws:
java.io.IOException
-
-