public SslSocketFactory(final NiFiProperties nifiProperties) { final SSLContext sslCtx = SslContextFactory.createSslContext(nifiProperties); if (sslCtx == null) { try { sslSocketFactory = SSLContext.getDefault().getSocketFactory(); } catch (final NoSuchAlgorithmException nsae) { throw new SslSocketFactoryCreationException(nsae); } } else { sslSocketFactory = sslCtx.getSocketFactory(); } }
public SslServerSocketFactory(final NiFiProperties nifiProperties) { final SSLContext sslCtx = SslContextFactory.createSslContext(nifiProperties); if (sslCtx == null) { try { sslServerSocketFactory = SSLContext.getDefault().getServerSocketFactory(); } catch (final NoSuchAlgorithmException nsae) { throw new SslServerSocketFactoryCreationException(nsae); } } else { sslServerSocketFactory = sslCtx.getServerSocketFactory(); } }
public static SSLContext createSslContext(final NiFiProperties props) throws SslContextCreationException { if (hasKeystoreProperties(props) == false) { return null; } else if (hasTruststoreProperties(props) == false) { throw new SslContextCreationException("SSL context cannot be created because truststore properties have not been configured."); if (hasTruststoreProperties(props)) { trustStore = KeyStoreUtils.getTrustStore(props.getProperty(NiFiProperties.SECURITY_TRUSTSTORE_TYPE)); try (final InputStream trustStoreStream = new FileInputStream(props.getProperty(NiFiProperties.SECURITY_TRUSTSTORE))) { throw new SslContextCreationException(e);
final SSLContext sslContext = SslContextFactory.createSslContext(nifiProperties); if (sslContext == null && uriScheme.equalsIgnoreCase("https")) { throw new IllegalStateException("Failed to create Flow Registry for URI " + registryUrl
private Tuple<SSLSocketFactory, X509TrustManager> createSslSocketFactory(final NiFiProperties properties) { final SSLContext sslContext = SslContextFactory.createSslContext(properties);
public SslSocketFactory(final NiFiProperties nifiProperties) { final SSLContext sslCtx = SslContextFactory.createSslContext(nifiProperties); if (sslCtx == null) { try { sslSocketFactory = SSLContext.getDefault().getSocketFactory(); } catch (final NoSuchAlgorithmException nsae) { throw new SslSocketFactoryCreationException(nsae); } } else { sslSocketFactory = sslCtx.getSocketFactory(); } }
public SslServerSocketFactory(final NiFiProperties nifiProperties) { final SSLContext sslCtx = SslContextFactory.createSslContext(nifiProperties); if (sslCtx == null) { try { sslServerSocketFactory = SSLContext.getDefault().getServerSocketFactory(); } catch (final NoSuchAlgorithmException nsae) { throw new SslServerSocketFactoryCreationException(nsae); } } else { sslServerSocketFactory = sslCtx.getServerSocketFactory(); } }
public static SSLContext createSslContext(final NiFiProperties props) throws SslContextCreationException { if (hasKeystoreProperties(props) == false) { return null; } else if (hasTruststoreProperties(props) == false) { throw new SslContextCreationException("SSL context cannot be created because truststore properties have not been configured."); if (hasTruststoreProperties(props)) { trustStore = KeyStoreUtils.getTrustStore(props.getProperty(NiFiProperties.SECURITY_TRUSTSTORE_TYPE)); try (final InputStream trustStoreStream = new FileInputStream(props.getProperty(NiFiProperties.SECURITY_TRUSTSTORE))) { throw new SslContextCreationException(e);
client = WebUtils.createClient(clientConfig, SslContextFactory.createSslContext(properties)); } else { client = WebUtils.createClient(clientConfig);
final SSLContext sslContext = SslContextFactory.createSslContext(properties); final ComponentLog logger = new SimpleProcessLogger(providerId, provider); final StateProviderInitializationContext initContext = new StandardStateProviderInitializationContext(providerId, propertyMap, sslContext, logger);
this.heartbeatMonitor = heartbeatMonitor; this.leaderElectionManager = leaderElectionManager; this.sslContext = SslContextFactory.createSslContext(nifiProperties); this.extensionManager = extensionManager; this.clusterCoordinator = clusterCoordinator;
client = WebUtils.createClient(clientConfig, SslContextFactory.createSslContext(properties)); } else { client = WebUtils.createClient(clientConfig);