[erlang-questions] Re: Mochiweb and SSL

Alessandro Sivieri alessandro.sivieri@REDACTED
Wed Nov 10 17:18:18 CET 2010


Oh, I have solved the problem (and forgot to write about it): I think the
problem was that I was using R13; on R14, it just works with the following
configuration structure:

WebConfigSSL = [
                 {ip, Ip},
                 {port, 8443},
                 {docroot, crest_deps:local_path(["priv", "www"])},
                 {ssl, true},
                 {ssl_opts, [
                    {certfile, crest_deps:local_path(["ca", "certs",
"01.pem"])},
                    {keyfile, crest_deps:local_path(["ca", "private",
"crest.key"])},
                    {verify, verify_peer},
                    {cacertfile, crest_deps:local_path(["ca",
"cacert.pem"])},
                    {fail_if_no_peer_cert, true},
                    {verify_fun, fun(_) -> false end}
                 ]}],

of course, the three local paths point to the directory with certificates
and keys, and that's all it needed; now the _web module answers correctly to
SSL requests (with mutual authentication, because of the
fail_if_no_peer_cert).

-- 
Sivieri Alessandro
alessandro.sivieri@REDACTED
http://www.chimera-bellerofonte.eu/
http://www.poul.org/


More information about the erlang-questions mailing list