In OpenSSL 1.1.0 and prior versions of OpenSSL, SSL_in_init was always false at SSL_CB_HANDSHAKE_DONE. In master, this has changed because ossl_statem_set_in_init(s, 0) now happens late in tls_finish_handshake, after SSL_CB_HANDSHAKE_DONE is triggered.
The immediate trigger for this was Node, who rely on not only this but being able to reentrantly call things like SSL_shutdown from that callback. That one seems a little nuts and probably should also be fixed on their end. Nonetheless, this is a little odd behavior on the OpenSSL side of things. (We at one point also caused SSL_in_init to change at this callback on accident and that broke some stuff.)
In OpenSSL 1.1.0 and prior versions of OpenSSL,
SSL_in_initwas always false atSSL_CB_HANDSHAKE_DONE. In master, this has changed becauseossl_statem_set_in_init(s, 0)now happens late intls_finish_handshake, afterSSL_CB_HANDSHAKE_DONEis triggered.The immediate trigger for this was Node, who rely on not only this but being able to reentrantly call things like
SSL_shutdownfrom that callback. That one seems a little nuts and probably should also be fixed on their end. Nonetheless, this is a little odd behavior on the OpenSSL side of things. (We at one point also causedSSL_in_initto change at this callback on accident and that broke some stuff.)