Skip to content
This repository was archived by the owner on Dec 18, 2018. It is now read-only.
This repository was archived by the owner on Dec 18, 2018. It is now read-only.

Allow to replace the server cert at runtime #2103

Closed
@iftahbe

Description

@iftahbe

Right now, the SSL certificate that Kestrel will use is here:

https://github.com/aspnet/KestrelHttpServer/blob/dev/src/Kestrel.Https/Internal/HttpsConnectionAdapter.cs#L25-L26

There are certain scenarios that we want to support replacing the certificate while the server is still running. This can be done quite easily if we could set the _serverCertificate so all new connections will be able to use that.

Scenarios for that include using Let's Encrypt certificates and not having to restart every 3 months.

While making it public is one option, I think it would be better to not hold a reference to the _serverCertificate from the options but use the value in the options itself. That will mean that the caller could hold on to the options and change the certificate value used without messing with any internal state.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions