[Mono-list] How to use SSL with HttpListener with an mkbundle'd Mono app

Robert Jordan robertj at gmx.net
Wed Apr 23 14:45:18 UTC 2014


On 23.04.2014 13:40, cocowalla wrote:
> I have a .NET application built with Mono, that I've bundled into a native
> (Linux) executable using `mkbundle`. This is so that end users don't need to
> mess around and install Mono themselves.
>
> The application uses ServiceStack, which under the hood uses `HttpListener`.
> I need the web services to be exposed over an SSL-enabled HTTP endpoint.
>
> Normally, you would run something like `httpcfg -add -port 1234 -p12
> MyCert.pfx -pwd "MyPass"` during configuration (all this really does is copy
> the certificate to a specific path), and `HttpListener` would automatically
> bind the certificate to the port.
>
> So `HttpListener` loads certificates from a particular path at runtime.
>
> Is that path hard-coded? Or is there some way I can tell it to use a
> certificate from another location, since the end user will not have Mono
> installed?

The path is hard-coded as ~/.mono/httplistener/

See https://github.com/mono/mono/blob/master/mcs/tools/security/httpcfg.cs


Robert




More information about the Mono-list mailing list