private SslClientAuthMode getSslClientAuthMode(Ssl ssl) { if (ssl.getClientAuth() == Ssl.ClientAuth.NEED) { return SslClientAuthMode.REQUIRED; } if (ssl.getClientAuth() == Ssl.ClientAuth.WANT) { return SslClientAuthMode.REQUESTED; } return SslClientAuthMode.NOT_REQUESTED; }
private void configureSslClientAuth(AbstractHttp11JsseProtocol<?> protocol, Ssl ssl) { if (ssl.getClientAuth() == Ssl.ClientAuth.NEED) { protocol.setClientAuth(Boolean.TRUE.toString()); } else if (ssl.getClientAuth() == Ssl.ClientAuth.WANT) { protocol.setClientAuth("want"); } }
private void configureSslClientAuth(SslContextFactory factory, Ssl ssl) { if (ssl.getClientAuth() == Ssl.ClientAuth.NEED) { factory.setNeedClientAuth(true); factory.setWantClientAuth(true); } else if (ssl.getClientAuth() == Ssl.ClientAuth.WANT) { factory.setWantClientAuth(true); } }
protected SslContextBuilder getContextBuilder() { SslContextBuilder builder = SslContextBuilder .forServer(getKeyManagerFactory(this.ssl, this.sslStoreProvider)) .trustManager(getTrustManagerFactory(this.ssl, this.sslStoreProvider)); if (this.ssl.getEnabledProtocols() != null) { builder.protocols(this.ssl.getEnabledProtocols()); } if (this.ssl.getCiphers() != null) { builder.ciphers(Arrays.asList(this.ssl.getCiphers())); } if (this.ssl.getClientAuth() == Ssl.ClientAuth.NEED) { builder.clientAuth(ClientAuth.REQUIRE); } else if (this.ssl.getClientAuth() == Ssl.ClientAuth.WANT) { builder.clientAuth(ClientAuth.OPTIONAL); } return builder; }
final ClientAuth clientAuth = ssl.getClientAuth(); if (clientAuth != null) { switch (clientAuth) {
if (sslConfig.getClientAuth() == Ssl.ClientAuth.WANT) { scsp.setClientAuthentication(ClientAuthentication.WANT.name()); } else if (sslConfig.getClientAuth() == Ssl.ClientAuth.NEED) { scsp.setClientAuthentication(ClientAuthentication.REQUIRE.name());