You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are currently two ways to configure TLS for an HttpServer.
HttpServer.create().secure() will setup TLS with:
a default SelfSignedCertificate
OpenSSL or JDK as an SslProvider depending on which is available
http/2 ciphers, ALPN support
both h2 and http/1.1 support
HttpServer.create().secure((contextSpec) -> contextSpec.forServer().sslContext(Consumer<SslContextBuilder>) will setup TLS with whatever is given as an argument. This is giving full control, but also no defaults.
So the "simple" setup gives you most defaults, except the self-signed certificate; choosing a self-signed cert should be a conscious choice by the developer, or a testing utility.
The "complex" setup gives you full control, but you often end up copying/pasting reactor's code and just changing a couple of things.
I'm wondering if we could have variants like this instead:
sslContext(Consumer<SslContextBuilder>) sets up an incomplete context for you; you need to set your certificate and you can choose to override the defaults
sslContext(Supplier<SslContext>), gives you full control and no defaults
and a high level HttpServer.create().secure(/* argument providing the server certification */); there might be many variants for that, so we need to discuss what to do here
The text was updated successfully, but these errors were encountered:
There are currently two ways to configure TLS for an
HttpServer
.HttpServer.create().secure()
will setup TLS with:SelfSignedCertificate
SslProvider
depending on which is availableHttpServer.create().secure((contextSpec) -> contextSpec.forServer().sslContext(Consumer<SslContextBuilder>)
will setup TLS with whatever is given as an argument. This is giving full control, but also no defaults.So the "simple" setup gives you most defaults, except the self-signed certificate; choosing a self-signed cert should be a conscious choice by the developer, or a testing utility.
The "complex" setup gives you full control, but you often end up copying/pasting reactor's code and just changing a couple of things.
I'm wondering if we could have variants like this instead:
sslContext(Consumer<SslContextBuilder>)
sets up an incomplete context for you; you need to set your certificate and you can choose to override the defaultssslContext(Supplier<SslContext>)
, gives you full control and no defaultsHttpServer.create().secure(/* argument providing the server certification */)
; there might be many variants for that, so we need to discuss what to do hereThe text was updated successfully, but these errors were encountered: