/** * This is used to acquire the SSL engine used for https. If the * pipeline is connected to an SSL transport this returns an SSL * engine which can be used to establish the secure connection * and send and receive content over that connection. If this is * null then the pipeline represents a normal transport. * * @return the SSL engine used to establish a secure transport */ public SSLEngine getEngine() { return socket.getEngine(); }
/** * This is used to acquire the SSL engine used for https. If the * pipeline is connected to an SSL transport this returns an SSL * engine which can be used to establish the secure connection * and send and receive content over that connection. If this is * null then the pipeline represents a normal transport. * * @return the SSL engine used to establish a secure transport */ public SSLEngine getEngine() { return socket.getEngine(); }
/** * This is used to acquire the SSL engine used for https. If the * pipeline is connected to an SSL transport this returns an SSL * engine which can be used to establish the secure connection * and send and receive content over that connection. If this is * null then the pipeline represents a normal transport. * * @return the SSL engine used to establish a secure transport */ public SSLEngine getEngine() { return socket.getEngine(); }
/** * This is used to acquire the SSL session associated with the * handshake. The session makes all of the details associated * with the handshake available, including the cipher suites * used and the SSL context used to create the session. * * @return the SSL session associated with the connection */ public SSLSession getSession() throws Exception{ SSLEngine engine = socket.getEngine(); if(engine != null) { return engine.getSession(); } return null; }
/** * This is used to acquire the SSL session associated with the * handshake. The session makes all of the details associated * with the handshake available, including the cipher suites * used and the SSL context used to create the session. * * @return the SSL session associated with the connection */ public SSLSession getSession() throws Exception{ SSLEngine engine = socket.getEngine(); if(engine != null) { return engine.getSession(); } return null; }
/** * This is used to acquire the SSL session associated with the * handshake. The session makes all of the details associated * with the handshake available, including the cipher suites * used and the SSL context used to create the session. * * @return the SSL session associated with the connection */ public SSLSession getSession() throws Exception{ SSLEngine engine = socket.getEngine(); if(engine != null) { return engine.getSession(); } return null; }
@Override public void process(Socket socket) throws IOException { socket.getEngine().setNeedClientAuth(true); delegate.process(socket); }
/** * Constructor for the <code>Challenge</code> 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. * * @param socket this is the TCP connection to the client */ public Challenge(Socket socket) { this.engine = socket.getEngine(); this.trace = socket.getTrace(); }
/** * This method is used to create <code>Operation</code> object to * process the next phase of the negotiation. The operations that * are created using this factory ensure the processing can be * done asynchronously, which reduces the overhead the connection * thread has when handing the pipelines over for processing. * * @param socket this is the pipeline that is to be processed * * @return this returns the operation used for processing */ public Operation getInstance(Socket socket) throws IOException { return getInstance(socket, socket.getEngine()); }
/** * Constructor for the <code>Challenge</code> 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. * * @param socket this is the TCP connection to the client */ public Challenge(Socket socket) { this.engine = socket.getEngine(); this.trace = socket.getTrace(); }
/** * Constructor for the <code>Challenge</code> 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. * * @param socket this is the TCP connection to the client */ public Challenge(Socket socket) { this.engine = socket.getEngine(); this.trace = socket.getTrace(); }
/** * This method is used to create <code>Operation</code> object to * process the next phase of the negotiation. The operations that * are created using this factory ensure the processing can be * done asynchronously, which reduces the overhead the connection * thread has when handing the pipelines over for processing. * * @param socket this is the pipeline that is to be processed * * @return this returns the operation used for processing */ public Operation getInstance(Socket socket) throws IOException { return getInstance(socket, socket.getEngine()); }
/** * This method is used to create <code>Operation</code> object to * process the next phase of the negotiation. The operations that * are created using this factory ensure the processing can be * done asynchronously, which reduces the overhead the connection * thread has when handing the pipelines over for processing. * * @param socket this is the pipeline that is to be processed * * @return this returns the operation used for processing */ public Operation getInstance(Socket socket) throws IOException { return getInstance(socket, socket.getEngine()); }
/** * Pass in the connection socket and add the engine to the pipeline * attributes. * * @param socket * the pipeline */ @SuppressWarnings("unchecked") public void process(Socket socket) throws IOException { final Map map = socket.getAttributes(); final SSLEngine engine = socket.getEngine(); final SocketChannel channel = socket.getChannel(); map.put(PROPERTY_ENGINE, engine); map.put(PROPERTY_SOCKET, channel); server.process(socket); }