public void setWantClientAuth(final SSLContext sslContext, final SSLServerSocket sslServerSocket, final boolean value) { if (value) sslServerSocket.setWantClientAuth(value); }
public void setWantClientAuth(final boolean want) { delegate.setWantClientAuth(want); }
/** * Binds this socket to the previously specified URI. * * Overridden to allow for proper handling of needClientAuth. * * @throws IOException passed up from TcpTransportServer. */ @Override public void bind() throws IOException { super.bind(); if (needClientAuth) { ((SSLServerSocket)this.serverSocket).setNeedClientAuth(true); } else if (wantClientAuth) { ((SSLServerSocket)this.serverSocket).setWantClientAuth(true); } }
/** * Binds this socket to the previously specified URI. * * Overridden to allow for proper handling of needClientAuth. * * @throws IOException passed up from TcpTransportServer. */ @Override public void bind() throws IOException { super.bind(); if (needClientAuth) { ((SSLServerSocket)this.serverSocket).setNeedClientAuth(true); } else if (wantClientAuth) { ((SSLServerSocket)this.serverSocket).setWantClientAuth(true); } }
@Override public ServerSocket create() throws IOException { SSLServerSocket ss = null; ss = (SSLServerSocket) this.sslServerSocketFactory.createServerSocket(); if (this.sslProtocols != null) { ss.setEnabledProtocols(this.sslProtocols); } else { ss.setEnabledProtocols(ss.getSupportedProtocols()); } ss.setUseClientMode(false); ss.setWantClientAuth(false); ss.setNeedClientAuth(false); return ss; }
public ServerSocket createSSLServerSocket(int port, int backlog, InetAddress inetAddress) throws IOException { this.initSSLContext(); SSLServerSocketFactory serverSocketFactory = this.sslContext.getServerSocketFactory(); SSLServerSocket serverSocket = (SSLServerSocket) serverSocketFactory.createServerSocket(port, backlog, inetAddress); if (this.jsseSecurityDomain.getProtocols() != null){ serverSocket.setEnabledProtocols(this.jsseSecurityDomain.getProtocols()); } if (this.jsseSecurityDomain.getCipherSuites() != null){ serverSocket.setEnabledCipherSuites(this.jsseSecurityDomain.getCipherSuites()); } if (this.jsseSecurityDomain.isClientAuth() || this.require_mutual_auth){ serverSocket.setNeedClientAuth(true); } else { serverSocket.setWantClientAuth(this.request_mutual_auth); } return serverSocket; }
public void setWantClientAuth(boolean state) { delegate.setWantClientAuth(state); }
/** * Configures the given SSL server socket with the requested cipher suites, protocol versions, and need for client * authentication */ protected void initServerSocket(ServerSocket ssocket) { if (!(ssocket instanceof SSLServerSocket)) { throw new IllegalArgumentException("The ServerSocket has to be SSLServerSocket"); } SSLServerSocket socket = (SSLServerSocket) ssocket; if (attributes.get("ciphers") != null) { socket.setEnabledCipherSuites(enabledCiphers); } String requestedProtocols = (String) attributes.get("protocols"); setEnabledProtocols(socket, getEnabledProtocols(socket, requestedProtocols)); // we don't know if client auth is needed - // after parsing the request we may re-handshake if(clientAuthNeed) { socket.setNeedClientAuth(clientAuthNeed); } else { socket.setWantClientAuth(clientAuthWant); } } }
public void setWantClientAuth(boolean state) { delegate.setWantClientAuth(state); }
/** * Configure Client authentication for this version of JSSE. The * JSSE included in Java 1.4 supports the 'want' value. Prior * versions of JSSE will treat 'want' as 'false'. * @param socket the SSLServerSocket */ protected void configureClientAuth(SSLServerSocket socket){ if (wantClientAuth){ socket.setWantClientAuth(wantClientAuth); } else { socket.setNeedClientAuth(requireClientAuth); } }
/** * Configure Client authentication for this version of JSSE. The * JSSE included in Java 1.4 supports the 'want' value. Prior * versions of JSSE will treat 'want' as 'false'. * @param socket the SSLServerSocket */ protected void configureClientAuth(SSLServerSocket socket){ if (wantClientAuth){ socket.setWantClientAuth(wantClientAuth); } else { socket.setNeedClientAuth(requireClientAuth); } }
/** * Configure Client authentication for this version of JSSE. The * JSSE included in Java 1.4 supports the 'want' value. Prior * versions of JSSE will treat 'want' as 'false'. * @param socket the SSLServerSocket */ protected void configureClientAuth(SSLServerSocket socket){ if (wantClientAuth){ socket.setWantClientAuth(wantClientAuth); } else { socket.setNeedClientAuth(requireClientAuth); } }
/** * Configure Client authentication for this version of JSSE. The * JSSE included in Java 1.4 supports the 'want' value. Prior * versions of JSSE will treat 'want' as 'false'. * @param socket the SSLServerSocket */ protected void configureClientAuth(SSLServerSocket socket){ if (wantClientAuth){ socket.setWantClientAuth(wantClientAuth); } else { socket.setNeedClientAuth(requireClientAuth); } }
/** * Configure Client authentication for this version of JSSE. The * JSSE included in Java 1.4 supports the 'want' value. Prior * versions of JSSE will treat 'want' as 'false'. * @param socket the SSLServerSocket */ protected void configureClientAuth(SSLServerSocket socket){ if (wantClientAuth){ socket.setWantClientAuth(wantClientAuth); } else { socket.setNeedClientAuth(requireClientAuth); } }
/** * Configure Client authentication for this version of JSSE. The * JSSE included in Java 1.4 supports the 'want' value. Prior * versions of JSSE will treat 'want' as 'false'. * @param socket the SSLServerSocket */ protected void configureClientAuth(SSLServerSocket socket){ if (wantClientAuth){ socket.setWantClientAuth(wantClientAuth); } else { socket.setNeedClientAuth(requireClientAuth); } }
/** * Configure Client authentication for this version of JSSE. The * JSSE included in Java 1.4 supports the 'want' value. Prior * versions of JSSE will treat 'want' as 'false'. * @param socket the SSLServerSocket */ protected void configureClientAuth(SSLServerSocket socket){ if (wantClientAuth){ socket.setWantClientAuth(wantClientAuth); } else { socket.setNeedClientAuth(requireClientAuth); } }
private void setCipherSuiteAndProtocol(SSLServerSocket socket) { String[] cipherSuites = toArray(filter(asList(socket.getSupportedCipherSuites()), not(in(bannedCiphers))), String.class); String[] protocols = toArray(filter(asList(socket.getSupportedProtocols()), not(in(bannedProtocols))), String.class); socket.setEnabledCipherSuites(cipherSuites); socket.setEnabledProtocols(protocols); socket.setWantClientAuth(true); socket.setUseClientMode(false); } }
private void configureSocket(SSLServerSocket sock) { if (requestMutualAuth) { sock.setWantClientAuth(requestMutualAuth); } else if (requireMutualAuth) { sock.setNeedClientAuth(requireMutualAuth); } if (cipherSuites != null) { sock.setEnabledCipherSuites(cipherSuites); } if (protocols != null) { sock.setEnabledProtocols(protocols); } }
@Override public ServerSocket create() throws IOException { SSLServerSocket ss = null; ss = (SSLServerSocket) this.sslServerSocketFactory.createServerSocket(); if (this.sslProtocols != null) { ss.setEnabledProtocols(this.sslProtocols); } else { ss.setEnabledProtocols(ss.getSupportedProtocols()); } ss.setUseClientMode(false); ss.setWantClientAuth(false); ss.setNeedClientAuth(false); return ss; }
private static void postSSLServerSocket(SSLServerSocket sslServerSocket,int sslmode){ String[] pwdsuits = sslServerSocket.getSupportedCipherSuites(); sslServerSocket.setEnabledCipherSuites(pwdsuits); sslServerSocket.setUseClientMode(false); if(sslmode == 2){ sslServerSocket.setNeedClientAuth(true); }else{ sslServerSocket.setWantClientAuth(true); } }