It is asininely ridiculous how difficult this is to set up. I've been trying for 3 days now. Combed the internet and this site for help, but nothing has worked.
What I want is conceptually simple. I want an inets httpd server with ssl. Getting the server up and running is no issue... non-ssl anyway. It's when ssl is added in that it just doesn't work.
Don't ask what errors, there are multiple ones, and they shift depending on what change I make to the configuration. Mainly it's either a browser error saying the certificate doesn't give permission to do this or that, or if changes are made, a bunch of errors and process crashes in the erlang shell.
I simply want to know 1) what ssl certificates I will need, 2) what format they need to be in, and 3) on the httpd server side, exactly what ssl config options I will need.
No Apache-like config or config files. I want the config options for doing it programmatically.
If anyone can help with that, I'm all ears.
This worked for me using linux OTP release 22 and windows OTP release 23:
https://127.0.0.1:9999/db/api:get
Of course my cert was not signed (had to add an exception for that in Firefox) and in windows it seems that my connection was just reset.
However curl worked for both cases and it managed to establish a connection
curl -v -k https://127.0.0.1:9999/db/api:get
It worked after I used 127.0.0.1 instead of localhost and added the modules part:
After that I got some TLS notice reports from the server and the reason it doesn't seem to work in Windows is that:
My small code just increments a counter.
EDIT:
Will make it possible to do get commands through the webbrowser, seems it defaults to an old tls version.