parent
54ecf32d2b
commit
92019c7ac9
2 changed files with 2 additions and 2 deletions
|
|
@ -52,7 +52,7 @@ abstract class HttpsServerExampleSpec extends WordSpec with Matchers
|
|||
tmf.init(ks)
|
||||
|
||||
val sslContext: SSLContext = SSLContext.getInstance("TLS")
|
||||
sslContext.init(keyManagerFactory.getKeyManagers, tmf.getTrustManagers, SecureRandom.getInstanceStrong)
|
||||
sslContext.init(keyManagerFactory.getKeyManagers, tmf.getTrustManagers, new SecureRandom)
|
||||
val https: HttpsConnectionContext = ConnectionContext.https(sslContext)
|
||||
|
||||
// sets default context to HTTPS – all Http() bound servers for this ActorSystem will use HTTPS from now on
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ public class SimpleServerApp extends AllDirectives { // or import Directives.*
|
|||
tmf.init(ks);
|
||||
|
||||
final SSLContext sslContext = SSLContext.getInstance("TLS");
|
||||
sslContext.init(keyManagerFactory.getKeyManagers(), tmf.getTrustManagers(), SecureRandom.getInstanceStrong());
|
||||
sslContext.init(keyManagerFactory.getKeyManagers(), tmf.getTrustManagers(), new SecureRandom());
|
||||
|
||||
https = ConnectionContext.https(sslContext);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue