Skip to content

Improved handling of subjectAltName certificate fields in future release #263

@markphaedrus

Description

@markphaedrus

This feature request is a follow up to #260 .

To quickly summarize, the dummy SSL certificate generated by Simple Web Server previously only had one subjectAltName: a URI-based altname for "http://localhost", which could never match an HTTPS connection. The fix I submitted for #260 changed this to two altnames: a URI for "https://localhost", and an IP for 127.0.0.1 .

I suspect that this will turn out to be an 80% solution. It won't handle some IPv6 cases, and it won't handle some cases where the user loads up the site using "https://mylocalPChostname:7654" rather than "https://localhost:7654".

I suspect that you could pretty easily turn this into a 99% solution, by using the same url_list generation logic that you use in getServerStatusBox, and creating a URL-based altname in the dummy certificate for each of the generated URLs. So if the Edit Server screen would have this list:

Image

then the generated certificate should have type-6 altNames for "https://192.168.48.137:7654", "https://127.0.0.1:7654", and "https://KOBOLD:7654".

That should make the certificate correct for all except the very weirdest of cases. And yes, the user would have to regenerate the dummy certificate if they changed the server's port or the PC's hostname; but that seems like an incredibly reasonable limitation.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions