Skip to content

Commit

Permalink
#65 Request certificate without requiring it
Browse files Browse the repository at this point in the history
  • Loading branch information
To-om committed Aug 20, 2018
1 parent 816a781 commit 34ff87e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/org/elastic4play/ClientAuthSSLEngineProvider.scala
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ class ClientAuthSSLEngineProvider(serverConfig: ServerConfig, appProvider: Appli
sslParameters.setUseCipherSuitesOrder(true)

// http://docs.oracle.com/javase/8/docs/technotes/guides/security/jsse/JSSERefGuide.html#SSLParameters
val needClientAuth = config.getOptional[Boolean]("auth.method.pki").getOrElse(false)
logger.info(s"Client certificate authentication is ${if (needClientAuth) "enable" else "disable"}")
sslParameters.setNeedClientAuth(needClientAuth)
val wantClientAuth = config.getOptional[Boolean]("auth.method.pki").getOrElse(false)
logger.info(s"Client certificate authentication is ${if (wantClientAuth) "enable" else "disable"}")
sslParameters.setWantClientAuth(wantClientAuth)

// Clone and modify the default SSL parameters.
val engine = sslContext.createSSLEngine
Expand Down

0 comments on commit 34ff87e

Please sign in to comment.