src/java.base/share/classes/sun/security/ssl/SSLServerSocketImpl.java

Print this page

        

*** 66,76 **** class SSLServerSocketImpl extends SSLServerSocket { private SSLContextImpl sslContext; /* Do newly accepted connections require clients to authenticate? */ ! private byte doClientAuth = SSLEngineImpl.clauth_none; /* Do new connections created here use the "server" mode of SSL? */ private boolean useServerMode = true; /* Can new connections created establish new sessions? */ --- 66,76 ---- class SSLServerSocketImpl extends SSLServerSocket { private SSLContextImpl sslContext; /* Do newly accepted connections require clients to authenticate? */ ! private ClientAuthType clientAuthType = ClientAuthType.CLIENT_AUTH_NONE; /* Do new connections created here use the "server" mode of SSL? */ private boolean useServerMode = true; /* Can new connections created establish new sessions? */
*** 228,259 **** * Controls whether the connections which are accepted must include * client authentication. */ @Override public void setNeedClientAuth(boolean flag) { ! doClientAuth = (flag ? ! SSLEngineImpl.clauth_required : SSLEngineImpl.clauth_none); } @Override public boolean getNeedClientAuth() { ! return (doClientAuth == SSLEngineImpl.clauth_required); } /** * Controls whether the connections which are accepted should request * client authentication. */ @Override public void setWantClientAuth(boolean flag) { ! doClientAuth = (flag ? ! SSLEngineImpl.clauth_requested : SSLEngineImpl.clauth_none); } @Override public boolean getWantClientAuth() { ! return (doClientAuth == SSLEngineImpl.clauth_requested); } /** * Makes the returned sockets act in SSL "client" mode, not the usual * server mode. The canonical example of why this is needed is for --- 228,259 ---- * Controls whether the connections which are accepted must include * client authentication. */ @Override public void setNeedClientAuth(boolean flag) { ! clientAuthType = (flag ? ClientAuthType.CLIENT_AUTH_REQUIRED : ! ClientAuthType.CLIENT_AUTH_NONE); } @Override public boolean getNeedClientAuth() { ! return (clientAuthType == ClientAuthType.CLIENT_AUTH_REQUIRED); } /** * Controls whether the connections which are accepted should request * client authentication. */ @Override public void setWantClientAuth(boolean flag) { ! clientAuthType = (flag ? ClientAuthType.CLIENT_AUTH_REQUESTED : ! ClientAuthType.CLIENT_AUTH_NONE); } @Override public boolean getWantClientAuth() { ! return (clientAuthType == ClientAuthType.CLIENT_AUTH_REQUESTED); } /** * Makes the returned sockets act in SSL "client" mode, not the usual * server mode. The canonical example of why this is needed is for
*** 339,349 **** * presented during construction. */ @Override public Socket accept() throws IOException { SSLSocketImpl s = new SSLSocketImpl(sslContext, useServerMode, ! enabledCipherSuites, doClientAuth, enableSessionCreation, enabledProtocols, identificationProtocol, algorithmConstraints, sniMatchers, preferLocalCipherSuites); implAccept(s); s.doneConnect(); --- 339,349 ---- * presented during construction. */ @Override public Socket accept() throws IOException { SSLSocketImpl s = new SSLSocketImpl(sslContext, useServerMode, ! enabledCipherSuites, clientAuthType, enableSessionCreation, enabledProtocols, identificationProtocol, algorithmConstraints, sniMatchers, preferLocalCipherSuites); implAccept(s); s.doneConnect();