@Test (expected = RuntimeException.class) public void createSSLContextKeyStoreNotFound() { final SockJsConfig sockJsConfig = SockJsConfig.withPrefix("/echo") .tls(true) .keyStore("/missing.keystore") .keyStorePassword("simplepush") .build(); new WebSocketSslServerSslContext(sockJsConfig).sslContext(); }
public SSLContext sslContext() { try { final SSLContext serverContext = SSLContext.getInstance(PROTOCOL); serverContext.init(keyManagerFactory(loadKeyStore()).getKeyManagers(), null, null); return serverContext; } catch (final Exception e) { throw new RuntimeException("Failed to initialize the server-side SSLContext", e); } }
WebSocketSslServerSslContext { public SSLContext sslContext() { try { final SSLContext serverContext = SSLContext.getInstance(PROTOCOL); serverContext.init(keyManagerFactory(loadKeyStore()).getKeyManagers(), null, null); return serverContext; } catch (final Exception e) { throw new RuntimeException("Failed to initialize the server-side SSLContext", e); } } }
WebSocketSslServerSslContext { public SSLContext sslContext() { try { final SSLContext serverContext = SSLContext.getInstance(PROTOCOL); serverContext.init(keyManagerFactory(loadKeyStore()).getKeyManagers(), null, null); return serverContext; } catch (final Exception e) { throw new RuntimeException("Failed to initialize the server-side SSLContext", e); } } WebSocketSslServerSslContext(final SockJsConfig sockJsConfig); }
WebSocketSslServerSslContext { public SSLContext sslContext() { try { final SSLContext serverContext = SSLContext.getInstance(PROTOCOL); serverContext.init(keyManagerFactory(loadKeyStore()).getKeyManagers(), null, null); return serverContext; } catch (final Exception e) { throw new RuntimeException("Failed to initialize the server-side SSLContext", e); } } WebSocketSslServerSslContext(final SockJsConfig sockJsConfig); SSLContext sslContext(); }
WebSocketSslServerSslContext { public SSLContext sslContext() { try { final SSLContext serverContext = SSLContext.getInstance(PROTOCOL); serverContext.init(keyManagerFactory(loadKeyStore()).getKeyManagers(), null, null); return serverContext; } catch (final Exception e) { throw new RuntimeException("Failed to initialize the server-side SSLContext", e); } } WebSocketSslServerSslContext(final SockJsConfig sockJsConfig); SSLContext sslContext();  }