Java Code Examples for io.netty.handler.ssl.ClientAuth#NONE

The following examples show how to use io.netty.handler.ssl.ClientAuth#NONE . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TlsHelper.java    From DDMQ with Apache License 2.0 5 votes vote down vote up
private static ClientAuth parseClientAuthMode(String authMode) {
    if (null == authMode || authMode.trim().isEmpty()) {
        return ClientAuth.NONE;
    }

    for (ClientAuth clientAuth : ClientAuth.values()) {
        if (clientAuth.name().equals(authMode.toUpperCase())) {
            return clientAuth;
        }
    }

    return ClientAuth.NONE;
}
 
Example 2
Source File: TlsHelper.java    From rocketmq-4.3.0 with Apache License 2.0 5 votes vote down vote up
private static ClientAuth parseClientAuthMode(String authMode) {
    if (null == authMode || authMode.trim().isEmpty()) {
        return ClientAuth.NONE;
    }

    for (ClientAuth clientAuth : ClientAuth.values()) {
        if (clientAuth.name().equals(authMode.toUpperCase())) {
            return clientAuth;
        }
    }

    return ClientAuth.NONE;
}
 
Example 3
Source File: TlsHelper.java    From rocketmq-read with Apache License 2.0 5 votes vote down vote up
private static ClientAuth parseClientAuthMode(String authMode) {
    if (null == authMode || authMode.trim().isEmpty()) {
        return ClientAuth.NONE;
    }

    for (ClientAuth clientAuth : ClientAuth.values()) {
        if (clientAuth.name().equals(authMode.toUpperCase())) {
            return clientAuth;
        }
    }

    return ClientAuth.NONE;
}
 
Example 4
Source File: TlsHelper.java    From DDMQ with Apache License 2.0 5 votes vote down vote up
private static ClientAuth parseClientAuthMode(String authMode) {
    if (null == authMode || authMode.trim().isEmpty()) {
        return ClientAuth.NONE;
    }

    for (ClientAuth clientAuth : ClientAuth.values()) {
        if (clientAuth.name().equals(authMode.toUpperCase())) {
            return clientAuth;
        }
    }

    return ClientAuth.NONE;
}
 
Example 5
Source File: TlsHelper.java    From rocketmq with Apache License 2.0 5 votes vote down vote up
private static ClientAuth parseClientAuthMode(String authMode) {
    if (null == authMode || authMode.trim().isEmpty()) {
        return ClientAuth.NONE;
    }

    for (ClientAuth clientAuth : ClientAuth.values()) {
        if (clientAuth.name().equals(authMode.toUpperCase())) {
            return clientAuth;
        }
    }

    return ClientAuth.NONE;
}
 
Example 6
Source File: NettySslFactory.java    From ambry with Apache License 2.0 5 votes vote down vote up
/**
 * @param config the {@link SSLConfig}.
 * @return the {@link ClientAuth} setting.
 */
static ClientAuth getClientAuth(SSLConfig config) {
  switch (config.sslClientAuthentication) {
    case "required":
      return ClientAuth.REQUIRE;
    case "requested":
      return ClientAuth.OPTIONAL;
    default:
      return ClientAuth.NONE;
  }
}
 
Example 7
Source File: SslHandshakeInfoHandler.java    From zuul with Apache License 2.0 5 votes vote down vote up
private ClientAuth whichClientAuthEnum(SslHandler sslhandler)
{
    ClientAuth clientAuth;
    if (sslhandler.engine().getNeedClientAuth()) {
        clientAuth = ClientAuth.REQUIRE;
    }
    else if (sslhandler.engine().getWantClientAuth()) {
        clientAuth = ClientAuth.OPTIONAL;
    }
    else {
        clientAuth = ClientAuth.NONE;
    }
    return clientAuth;
}
 
Example 8
Source File: SslHandshakeInfo.java    From zuul with Apache License 2.0 5 votes vote down vote up
public SslHandshakeInfo(boolean isOfIntermediary, String protocol, String cipherSuite, Certificate serverCertificate)
{
    this.protocol = protocol;
    this.cipherSuite = cipherSuite;
    this.isOfIntermediary = isOfIntermediary;
    this.serverCertificate = serverCertificate;
    this.clientAuthRequirement = ClientAuth.NONE;
    this.clientCertificate = null;
}
 
Example 9
Source File: SocketIOServer.java    From socketio with Apache License 2.0 4 votes vote down vote up
/**
 * Creates instance of Socket.IO server with the given secure port.
 */
public static SocketIOServer newInstance(int port, SSLContext sslContext) {
  SslContext nettySslContext = new JdkSslContext(sslContext, false, ClientAuth.NONE);
  return newInstance(port, nettySslContext);
}
 
Example 10
Source File: ServerSslConfig.java    From zuul with Apache License 2.0 4 votes vote down vote up
public ServerSslConfig(String[] protocols, String[] ciphers, File certChainFile, File keyFile) {
    this(protocols, ciphers, certChainFile, keyFile, ClientAuth.NONE, null, (File) null, false);
}