Nowin
Nowin copied to clipboard
Support for SSL using owin hosting
According to sample code, it seems that SSL support requires Nowin server to be instantiated directly, lacking the support for Microsoft.Owin.Hosting.
In that time I written it, there was no support for it in Microsoft.Owin.Hosting - there was no way to pass Certificate? Is it now possible?
From discussion thread on OWIN, there's a willingness to go ahead with this, but no standard update. Maybe you could create a custom/extension property in StartupOptions.Settings to avoid the Builder's boilerplate? Something like
Settings["server.certificateBindings.PORT#"] = PATHNAME_TO_X509_PFX
It's not ideal by any means, but it would give most people most of what they want. For advanced scenarios we could still use Builder.
If PFX, I would also need password, so 2 properties. Or I need instance of X509Certificate. Don't you want to try to write it on your own it is probably much easier to write directly code you need: https://github.com/Bobris/Nowin/blob/master/Nowin/OwinServerFactory.cs#L73
Right, forgot about the password. The "certificate" property, I guess I'd set it in my Startup.Configuration() on an IAppBuilder instance?
I don't know if it is possible to set in Startup.Configuration, but it could be. At the time it was just simple proposal how it could work, it was never tested by me.
What's the discussion thread on OWIN? I've not seen anything?
https://groups.google.com/forum/#!searchin/net-http-abstractions/SSL/net-http-abstractions/-icGvmayRAY/8ku-YSlH2C8J 2 year old, that's ancient in internet-years :)