[Mono-list] HttpListener SSL client certificate

DrGusman geniwab at gmail.com
Thu Aug 7 15:33:07 UTC 2014


No, it's not related (but is good to know), found what happens and had to
modify the mono source for HttpConnection.

Some time ago someone had the brilliant idea to enable client certificate
support, /*and hardcoded it*/

https://groups.google.com/forum/#!topic/mono-svn-patches/FHBT66s39pg

I can understand that someone can want to use client certificates, but not
everybody will (99.99999999% of times will not be used (did I mis some
nines?)), so if this is added it must have a configuration property or
something like that.

Just in case someone is in my same situation, if you are compiling mono from
source as me go to /mcs/class/System/System.Net/HttpConnection.cs and
change:

    SslServerStream ssl_stream = new SslServerStream (new NetworkStream
(sock, false), cert, false, true, false);

for

    SslServerStream ssl_stream = new SslServerStream (new NetworkStream
(sock, false), cert, false, false);

Recompile and voila, you can now use SSL without annoying your users asking
on each connection for a user certificate.

Cheers.



--
View this message in context: http://mono.1490590.n4.nabble.com/HttpListener-SSL-client-certificate-tp4663483p4663487.html
Sent from the Mono - General mailing list archive at Nabble.com.


More information about the Mono-list mailing list