[erlang-bugs] openssl s_client hangs when accessing https service in inets application

Liu Yubao yubao.liu@REDACTED
Sun Jan 4 04:15:46 CET 2009


Hi,

The documentation and code of inets application are not consistent,
the corresponding option in {proplist_file, path()} to "SocketType"
option in {file, path()} is "com_type", not "socket_type".

Liu Yubao wrote:
> 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-bugs mailing list