rgrinberg / opium

Sinatra like web toolkit for OCaml
MIT License
755 stars 67 forks source link

Lack of documentation regarding use of Opium with SSL #230

Closed rosalogia closed 3 years ago

rosalogia commented 3 years ago

I would appreciate some further documentation on how to use the ssl function in the App module. Right now I'm passing it the paths to my cert and privkey respectively, but it doesn't seem to be having any effect. I read some of the code for the App module and it seems like the cert and key, if they were passed at all, are extracted into _mode here, but it doesn't seem like _mode is ever referenced after creation. Why might that be?

anuragsoni commented 3 years ago

The _mode should be removed. The httpaf based opium (version 0.19.0) and above do not support setting up a ssl server at the moment.

rosalogia commented 3 years ago

I see; thank you!

rosalogia commented 3 years ago

Out of curiosity, is there an issue open that addresses this? If you don't mind, I'd like to inquire further about the problem and what it would take to solve it.

anuragsoni commented 3 years ago

The issue tracking the original work on the httpaf port had some details about it https://github.com/rgrinberg/opium/issues/138#issue-548455807

TLDR: It'll be easy to support it once the httpaf project adds support for this.