SSL_IN_INIT(3ossl)
π NAME π
okay so this is the SSL_IN_INIT(3ossl) page, and it's literally about SSL_in_before, SSL_in_init, SSL_is_init_finished, SSL_in_connect_init, SSL_in_accept_init, and SSL_get_state β the girlies that retrieve information about the handshake state machine. π«Άβ¨
β¨ SYNOPSIS β¨
#include <openssl/ssl.h>
int SSL_in_init(const SSL *s);
int SSL_in_before(const SSL *s);
int SSL_is_init_finished(const SSL *s);
int SSL_in_connect_init(SSL *s);
int SSL_in_accept_init(SSL *s);
OSSL_HANDSHAKE_STATE SSL_get_state(const SSL *ssl);
π¦ DESCRIPTION π¦
bestie, this whole page is a vibe check on the SSL/TLS handshake state machine. here's the tea β:
SSL_in_init()returns1if the SSL/TLS state machine is currently processing or awaiting handshake messages, or0otherwise. πSSL_in_before()returns1if no SSL/TLS handshake has yet been initiated, or0otherwise. π±SSL_is_init_finished()returns1if the SSL/TLS connection is in a state where fully protected application data can be transferred, or0otherwise. π
β οΈ lowkey important: in some circumstances (such as when early data is being transferred),SSL_in_init(),SSL_in_before()andSSL_is_init_finished()can all return0. so don't be surprised, bestie π
π¨ and<red>s MUST NOT be NULL</red>β like, periodt.s MUST NOT be NULL. no cap.
SSL_in_connect_init()returns1ifsis acting as a client andSSL_in_init()would return1, or0otherwise. πSSL_in_accept_init()returns1ifsis acting as a server andSSL_in_init()would return1, or0otherwise. π
also, SSL_in_connect_init() and SSL_in_accept_init() are implemented as macros. iykyk π§
π
SSL_get_state() and the naming lore π
SSL_get_state() returns a value indicating the current state of the handshake state machine. OSSL_HANDSHAKE_STATE is an enumerated type where each value indicates a discrete state machine state. π¦
π heads up: future versions of OpenSSL may define more states, so applications should expect to receive unrecognised state values. not me being flexible about future enum girlies π
the naming format is made up of a number of elements, like this:
protocol_ST_role_message
protocolis one ofTLSorDTLS.DTLSis used where a state is specific to the DTLS protocol. OtherwiseTLSis used. πΈroleis one ofCR,CW,SRorSWto indicate "client reading", "client writing", "server reading" or "server writing" respectively. πmessageis the name of a handshake message that is being or has been sent, or is being or has been processed. π
additionally there are some special states that do not conform to the above format. these are:
TLS_ST_BEFOREβ no handshake messages have yet been sent or received. π±TLS_ST_OKβ handshake message sending/processing has completed. βTLS_ST_EARLY_DATAβ early data is being processed. πΈTLS_ST_PENDING_EARLY_DATA_ENDβ awaiting the end of early data processing. β³
π RETURN VALUES π
SSL_in_init(), SSL_in_before(), SSL_is_init_finished(), SSL_in_connect_init() and SSL_in_accept_init() return values as indicated above. π
SSL_get_state() returns the current handshake state. π
π SEE ALSO π
π COPYRIGHT π
Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved.
Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at https://www.openssl.org/source/license.html.
mwah π β this page is from OpenSSL 3.5.0, dated 2026-09-25, and it's literally the SSL_IN_INIT(3ossl) moment. bye bestie, go slay that handshake π«Άβ¨
π¦ where this page comes from
- opensuse-leap 16.0: openssl-3-doc 3.5.0-160000.11.1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms