ssl:handshake_continue should error if you pass {handshake, hello} again?

Roger Lipscombe <[email protected]>
Newsgroups gmane.comp.lang.erlang.general
Message-ID <CAJgnQd9qGawuo1Rh+Qq=kSW4Yztv9y1JAK2=O07+0Az030KEPg@mail.gmail.com>
I'm experimenting with the {handshake, hello} option in ssl:connect.

Using the following:

{ok, S0, Ex} = ssl:connect(Host, Port, [{handshake, hello}]).
{ok, S1} = ssl:handshake_continue(S0, [{handshake, hello}]).

I was expecting it to do one of the following:
1. ignore the 'handshake' setting and return either the connected
socket or a connection error.
2. return an error complaining about the handshake option.

Instead, it returns a slightly-altered copy of Ex.

Ex is #{alpn => undefined,
                                    ec_point_formats => [0],
                                    next_protocol_negotiation => undefined,
                                    renegotiation_info => <<0>>}

S1 is #{alpn => undefined,
  ec_point_formats => {ec_point_formats,[0]},
  next_protocol_negotiation => undefined,
  renegotiation_info => {renegotiation_info,<<0>>}}

This is with OTP-24.0-rc1 and with 23.0.3.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.