[erlang-bugs] Type errors in ssl application since OTP 17.0-rc2
Ingela Anderton Andin
Ingela.Anderton.Andin@REDACTED
Mon Mar 3 09:57:00 CET 2014
Hi!
Thank you for reporting this. The thing is that the DTLS-code is not
finished, we had planed to finish it for R17 but other things came up,
so that we alas did not have had time to complete it yet. But I am
working now with cleaning it up a little to avoid all dialyzer warnings.
The reason for it being there (unfinished) is that we are phasing it in
and refactoring the TLS code all the time to be able to reuse as much
code as possible for DTLS.
Regards Ingela Erlang/OTP team - Ericsson AB
On 03/02/2014 10:42 PM, Johannes Weißl wrote:
> Hello,
>
> we noticed dialyzer warnings in our application with OTP 17.0-rc2.
> Through "git bisect" I could determine the commit which made the error
> apparent:
>
> 48c3778 Ingela Anderton Andin Fri Feb 14 17:08:14 2014 +0100
> ssl: Fix possible mismatch between SSL/TLS version and default ciphers
>
> I attached a small example (ssl_bug.erl), it can be compiled and run
> like this:
>
> erlc ssl_bug.erl
> erl -noshell -s ssl_bug listen no_use_ssl -s init stop
> erl -noshell -s ssl_bug listen use_ssl -s init stop
>
> Although the program seems correct, dialyzer throws a warning:
>
> dialyzer --build_plt --apps erts kernel stdlib mnesia compiler asn1 \
> syntax_tools hipe crypto public_key ssl
> dialyzer ssl_bug.erl
> ssl_bug.erl:30: The call ssl:sockname(Socket::port()) will never return since the success typing is ({'sslsocket',_,pid() | {port(),{'config',_,_,_,_,{_,_,_,_},_}}}) -> any() and the contract is (#sslsocket{}) -> {'ok',{inet:ip_address(),inet:port_number()}} | {'error',reason()}
>
> There are multiple type issues in the ssl application, which could be
> responsible for this, e.g.:
> dtls_handshake.erl:57: The call dtls_record:highest_protocol_version(Versions::'undefined' | ['dtlsv1' | 'dtlsv1.2' | 'sslv3' | 'tlsv1' | 'tlsv1.1' | 'tlsv1.2']) will never return since the success typing is ([any(),...]) -> any() and the contract is ([tls_version()]) -> tls_version()
> (tls_version() is {integer(), integer()})
>
> Regards,
> Johannes Weißl
>
>
>
> _______________________________________________
> erlang-bugs mailing list
> erlang-bugs@REDACTED
> http://erlang.org/mailman/listinfo/erlang-bugs
>
More information about the erlang-bugs
mailing list