MediaBrowser / SocketHttpListener

A standalone HttpListener with support for SSL, WebSockets and Mono
MIT License
42 stars 14 forks source link

Error establishing an HTTPS connection #12

Closed WJ-GitHub closed 7 years ago

WJ-GitHub commented 8 years ago

Trying to generate an HTTPS server.

Create Certificate on Windows: makecert -r -pe -n "CN=myserver" -e 12/02/2023 -ss my -sr localmachine -sky signature -r mycert.cer

Code: var x509 = new System.Security.Cryptography.X509Certificates.X509Certificate2("mycert.cer"); HttpListener = new SocketHttpListener.Net.HttpListener(x509); HttpListener.Prefixes.Add("https://+:8080/");

No problem on Windows !

However, trying same under Linux starting the server. Opening the page via webbrowser gives the usual warnings that the certificate is not trustful... Setting an exception for the webpage in the browser (i.e. Firefox) should load the page furher, but nothing happens. The browser ist loading and loading and loading...

Trying Mono´s HttpListener on https://*:8080/ use the included certificate by httpcfg.lead to no problems.

Can anyone confirm or solve the problem ?

LukePulverenti commented 8 years ago

I have seen recently that mono has imported more Microsoft source code and there are some changes to https. So I need to sync up with that.