Class NegotiationState.Challenge

java.lang.Object
org.simpleframework.transport.NegotiationState.Challenge
All Implemented Interfaces:
CertificateChallenge
Enclosing class:
NegotiationState

private class NegotiationState.Challenge extends Object implements CertificateChallenge
The Challenge 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
  • Field Details

    • engine

      private final 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 Details

    • Challenge

      public Challenge(Socket socket)
      Constructor for the Challenge 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 Details

    • challenge

      public 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 interface CertificateChallenge
      Returns:
      this future containing the original certificate
    • challenge

      public Future<Certificate> challenge(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 interface CertificateChallenge
      Parameters:
      task - task to be run on successful challenge
      completion - task to be run on successful challenge
      Returns:
      this future containing the original certificate
    • resume

      private void resume(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