Package org.simpleframework.transport
Class NegotiationState.Challenge
- java.lang.Object
-
- org.simpleframework.transport.NegotiationState.Challenge
-
- All Implemented Interfaces:
CertificateChallenge
- Enclosing class:
- NegotiationState
private class NegotiationState.Challenge extends java.lang.Object implements CertificateChallenge
TheChallenge
object is used to enable the server to challenge for the client X509 certificate if desired. It performs the challenge by performing an SSL renegotiation to request that the client sends the
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.concurrent.Future<Certificate>
challenge()
This method will challenge the client for their certificate.java.util.concurrent.Future<Certificate>
challenge(java.lang.Runnable task)
This method will challenge the client for their certificate.private void
resume(java.lang.Runnable task)
This method will challenge the client for their certificate.
-
-
-
Field Detail
-
engine
private final javax.net.ssl.SSLEngine engine
This is the SSL engine that is used to begin the handshake.
-
trace
private final Trace trace
This is used to trace the certificate challenge request.
-
-
Constructor Detail
-
Challenge
public Challenge(Socket socket)
Constructor for theChallenge
object. This can be used to challenge the client for their X509 certificate. It does this by performing an SSL renegotiation on the existing TCP connection.- Parameters:
socket
- this is the TCP connection to the client
-
-
Method Detail
-
challenge
public java.util.concurrent.Future<Certificate> challenge()
This method will challenge the client for their certificate. It does so by performing an SSL renegotiation. Successful completion of the SSL renegotiation results in the client providing their certificate, and execution of the task.- Specified by:
challenge
in interfaceCertificateChallenge
- Returns:
- this future containing the original certificate
-
challenge
public java.util.concurrent.Future<Certificate> challenge(java.lang.Runnable task)
This method will challenge the client for their certificate. It does so by performing an SSL renegotiation. Successful completion of the SSL renegotiation results in the client providing their certificate, and execution of the task.- Specified by:
challenge
in interfaceCertificateChallenge
- Parameters:
completion
- task to be run on successful challenge- Returns:
- this future containing the original certificate
-
resume
private void resume(java.lang.Runnable task)
This method will challenge the client for their certificate. It does so by performing an SSL renegotiation. Successful completion of the SSL renegotiation results in the client providing their certificate, and execution of the task.- Parameters:
completion
- task to be run on successful challenge
-
-