[erlang-questions] openssl s_client hangs when accessing https service in inets application
Liu Yubao
yubao.liu@REDACTED
Wed Dec 31 04:01:22 CET 2008
Hi,
The https services in inets application doesn't work, I guess
I got something wrong. Below is the steps to recur:
a. use gen-cert.sh to generate server.pem;
(All scripts and configuration are provided at
http://jff.googlecode.com/files/inets-https-test.tar
)
b. execute runerl.sh and input these clauses in the erlang shell:
application:start(ssl).
application:start(inets).
c. execute `openssl s_client -connect localhost:8443 -debug -msg`,
you can see openssl hangs after sending a CLIENT-HELLO message,
the TCP connection is established successfully but https server
doesn't response to the CLIENT-HELLO message.
I tested "ssl:listen" in erlang shell and succeed to communication between
openssl and erlang shell:
application:start(ssl).
{ok, S} = ssl:listen(8443, [{certfile, "server.pem"}, {active, false}]).
{ok, S2} = ssl:accept(S).
# execute in another bash: openssl s_client -connect localhost:8443
ssl:send(S2, <<"hello world\n">>).
# "openssl s_client" can receive this greeting.
I tested against the latest erlang 5.6.5 under Windows XP and 5.6.3 under
Debian Lenny.
I'm looking forward your help!
Best regards,
Liu Yubao
More information about the erlang-questions
mailing list