How Can I Use a Self-Signed Certificate with a Finagle Server

17 views Asked by At

I have a simple https server setup in scala using twitter finagle.

Http.server
  .configured(Transport.ServerSsl(Some(SslServerConfiguration(
      keyCredentials = KeyCredentials.CertAndKey(certFile, certKey),
      trustCredentials = TrustCredentials.Insecure
  ))))

When I connect to it from a web client with a self-signed certificate I get this error:

2024-03-20 19:03:41,587 WARN i.n.c.DefaultChannelPipeline - An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception. io.netty.handler.codec.DecoderException: javax.net.ssl.SSLHandshakeException: error:10000418:SSL routines:OPENSSL_internal:TLSV1_ALERT_UNKNOWN_CA

From what I have gathered, I need to somehow handle the exception being thrown for untrusted CA within finagle, but I can find no documentation for how to do such a thing.

0

There are 0 answers