Skip to content
This repository has been archived by the owner on Aug 5, 2019. It is now read-only.

Support for SSL using owin hosting #18

Open
igorgatis opened this issue Sep 24, 2014 · 7 comments
Open

Support for SSL using owin hosting #18

igorgatis opened this issue Sep 24, 2014 · 7 comments

Comments

@igorgatis
Copy link

According to sample code, it seems that SSL support requires Nowin server to be instantiated directly, lacking the support for Microsoft.Owin.Hosting.

@Bobris
Copy link
Owner

Bobris commented Sep 24, 2014

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?

@et1975
Copy link
Contributor

et1975 commented Mar 23, 2015

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.

@Bobris
Copy link
Owner

Bobris commented Mar 23, 2015

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

@et1975
Copy link
Contributor

et1975 commented Mar 23, 2015

Right, forgot about the password. The "certificate" property, I guess I'd set it in my Startup.Configuration() on an IAppBuilder instance?

@Bobris
Copy link
Owner

Bobris commented Mar 23, 2015

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.

@serialseb
Copy link
Contributor

What's the discussion thread on OWIN? I've not seen anything?

@et1975
Copy link
Contributor

et1975 commented Mar 23, 2015

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants