I found a lot of answers how to set httplistener up to use HTTPS, but each one solution requires the use of command line. I guess that is the fastest way to do it but I would like to write C# class to handle this.
In old solution I used webserver class (found somewhere on Internet, I don't remember exact name) which allowed to add certificate in that way:
webserver.Certificate = new X509Certificate2("MyCert.pfx", "MyPassword");
Is there way to achieve this with httplistener? From code obviously.
Regards.