Class NegotiationState.Challenge

  • All Implemented Interfaces:
    CertificateChallenge
    Enclosing class:
    NegotiationState

    private class NegotiationState.Challenge
    extends java.lang.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 Summary

      Fields 
      Modifier and Type Field Description
      private javax.net.ssl.SSLEngine engine
      This is the SSL engine that is used to begin the handshake.
      private Trace trace
      This is used to trace the certificate challenge request.
    • Constructor Summary

      Constructors 
      Constructor Description
      Challenge​(Socket socket)
      Constructor for the Challenge object.
    • 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 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 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 interface CertificateChallenge
        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 interface CertificateChallenge
        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