/** * Constructor for the <code>NegotiationCertificate</code> object. * This creates an object used to provide certificate details and * a means to challenge for certificate details for the connected * client if required. * * @param negotiation the negotiation associated with this * @param socket the underlying TCP connection to the client */ public NegotiationState(Negotiation negotiation, Socket socket) { this.delegate = new Delegate(socket); this.future = new FutureTask<Certificate>(delegate, this); this.challenge = new Challenge(socket); this.negotiation = negotiation; this.socket = socket; }
/** * 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. * * @param completion task to be run on successful challenge */ private void resume(Runnable task) { try { trace.trace(CERTIFICATE_CHALLENGE); delegate.set(task); engine.setNeedClientAuth(true); engine.beginHandshake(); negotiation.resume(); } catch(Exception cause) { trace.trace(ERROR, cause); negotiation.cancel(); } } }
/** * 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. * * @param completion task to be run on successful challenge */ private void resume(Runnable task) { try { trace.trace(CERTIFICATE_CHALLENGE); delegate.set(task); engine.setNeedClientAuth(true); engine.beginHandshake(); negotiation.resume(); } catch(Exception cause) { trace.trace(ERROR, cause); negotiation.cancel(); } } }
/** * 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. * * @param completion task to be run on successful challenge */ private void resume(Runnable task) { try { trace.trace(CERTIFICATE_CHALLENGE); delegate.set(task); engine.setNeedClientAuth(true); engine.beginHandshake(); negotiation.resume(); } catch(Exception cause) { trace.trace(ERROR, cause); negotiation.cancel(); } } }
/** * Constructor for the <code>NegotiationCertificate</code> object. * This creates an object used to provide certificate details and * a means to challenge for certificate details for the connected * client if required. * * @param negotiation the negotiation associated with this * @param socket the underlying TCP connection to the client */ public NegotiationState(Negotiation negotiation, Socket socket) { this.delegate = new Delegate(socket); this.future = new FutureTask<Certificate>(delegate, this); this.challenge = new Challenge(socket); this.negotiation = negotiation; this.socket = socket; }
/** * Constructor for the <code>NegotiationCertificate</code> object. * This creates an object used to provide certificate details and * a means to challenge for certificate details for the connected * client if required. * * @param negotiation the negotiation associated with this * @param socket the underlying TCP connection to the client */ public NegotiationState(Negotiation negotiation, Socket socket) { this.delegate = new Delegate(socket); this.future = new FutureTask<Certificate>(delegate, this); this.challenge = new Challenge(socket); this.negotiation = negotiation; this.socket = socket; }
/** * This is used to determine if the state is in challenge mode. * In challenge mode a challenge future will be executed on * completion of the challenge. This will the completion task. * * @return this returns true if the state is in challenge mode */ public boolean isChallenge() { return delegate.isSet(); }
/** * This is used to determine if the state is in challenge mode. * In challenge mode a challenge future will be executed on * completion of the challenge. This will the completion task. * * @return this returns true if the state is in challenge mode */ public boolean isChallenge() { return delegate.isSet(); }
/** * This is used to determine if the state is in challenge mode. * In challenge mode a challenge future will be executed on * completion of the challenge. This will the completion task. * * @return this returns true if the state is in challenge mode */ public boolean isChallenge() { return delegate.isSet(); }