@Override public JerseyClientBuilder trustStore(KeyStore trustStore) { if (trustStore == null) { throw new NullPointerException(LocalizationMessages.NULL_TRUSTSTORE()); } if (sslConfigurator == null) { sslConfigurator = SslConfigurator.newInstance(); } sslConfigurator.trustStore(trustStore); sslContext = null; return this; }
public static Client buildClient(RestClientConfig clientConfig) { Client client; if (clientConfig.isDisabledSecureConnection()) { client = ClientBuilder.newBuilder().build(); } else { SslConfigurator sslConfig = SslConfigurator.newInstance() .trustStore(getTrustStore()) .trustStorePassword(getTrustStorePassword()) .securityProtocol(TLSV1_2); SSLContext sslContext = sslConfig.createSSLContext(); client = ClientBuilder.newBuilder().sslContext(sslContext).build(); } client.register(RestClientLoggingFilter.class); return client; }
@Override public JerseyClientBuilder trustStore(KeyStore trustStore) { if (trustStore == null) { throw new NullPointerException(LocalizationMessages.NULL_TRUSTSTORE()); } if (sslConfigurator == null) { sslConfigurator = SslConfigurator.newInstance(); } sslConfigurator.trustStore(trustStore); sslContext = null; return this; }
@Override public JerseyClientBuilder trustStore(KeyStore trustStore) { if (trustStore == null) { throw new NullPointerException(LocalizationMessages.NULL_TRUSTSTORE()); } if (sslConfigurator == null) { sslConfigurator = SslConfigurator.newInstance(); } sslConfigurator.trustStore(trustStore); sslContext = null; return this; }
private static Client initializeClient(DirectoryServerConfiguration directoryServerConfiguration) throws CertificateException { KeyStore trustStore = initializeKeyStore(directoryServerConfiguration.getReplicationCaCertificate()); SSLContext sslContext = SslConfigurator.newInstance() .securityProtocol("TLSv1.2") .trustStore(trustStore) .createSSLContext(); return ClientBuilder.newBuilder() .register(HttpAuthenticationFeature.basic("signal", directoryServerConfiguration.getReplicationPassword().getBytes())) .sslContext(sslContext) .build(); }
@Override public JerseyClientBuilder trustStore(KeyStore trustStore) { if (trustStore == null) { throw new NullPointerException(LocalizationMessages.NULL_TRUSTSTORE()); } if (sslConfigurator == null) { sslConfigurator = SslConfigurator.newInstance(); } sslConfigurator.trustStore(trustStore); sslContext = null; return this; }
@Override public JerseyClientBuilder trustStore(KeyStore trustStore) { if (trustStore == null) { throw new NullPointerException(LocalizationMessages.NULL_TRUSTSTORE()); } if (sslConfigurator == null) { sslConfigurator = SslConfigurator.newInstance(); } sslConfigurator.trustStore(trustStore); sslContext = null; return this; }
@Override public JerseyClientBuilder trustStore(KeyStore trustStore) { if (trustStore == null) { throw new NullPointerException(LocalizationMessages.NULL_TRUSTSTORE()); } if (sslConfigurator == null) { sslConfigurator = SslConfigurator.newInstance(); } sslConfigurator.trustStore(trustStore); sslContext = null; return this; }
@Override public JerseyClientBuilder trustStore(KeyStore trustStore) { if (trustStore == null) { throw new NullPointerException(LocalizationMessages.NULL_TRUSTSTORE()); } if (sslConfigurator == null) { sslConfigurator = SslConfigurator.newInstance(); } sslConfigurator.trustStore(trustStore); sslContext = null; return this; }