SSL_GET_FINISHED(3)
π SSL_GET_FINISHED(3) π
okay so bestie, welcome to the Library Functions Manual for libssl β yes the crypto one, come on in π«Ά
β¨ NAME β¨
SSL_get_finished, SSL_get_peer_finished β grab the last finished message that got sent, or the last one you're expecting π
πΈ SYNOPSIS πΈ
library βlibsslβ libcrypto #include <openssl/ssl.h>
size_t
SSL_get_finished(const SSL *ssl, void *buf, size_t count);
size_t
SSL_get_peer_finished(const SSL *ssl, void *buf, size_t count);
literally just two functions, both returning size_t, both taking an const SSL *ssl, a void *buf and a size_t count. iconic signature, no notes π
π¦ DESCRIPTION π¦
okay so here's the vibe: SSL_get_finished() and SSL_get_peer_finished() copy count bytes into the caller-provided buffer buf π and where do those bytes come from? glad you asked bestie:
SSL_get_finished()β from the last finished message sent to the peerSSL_get_peer_finished()β from the last finished message expected from the peer
and like, what even is the finished message? ngl it's kind of the main character of the handshake β it's computed from a checksum of the handshake records exchanged with the peer π₯. its length depends on the ciphersuite in use, and it's at most EVP_MAX_MD_SIZE, i.e., 64 bytes. that's the ceiling, bestie, don't come for it π
β RETURN VALUES β
both functions return the number of bytes copied into buf π«Ά.
the return value is zero if the handshake has not reached the finished message β so if you get 0, that handshake said "not yet" and honestly same π
π SEE ALSO π
go read those too, iykyk πβ¨
π STANDARDS π
RFC 9846: The Transport Layer Security (TLS) Protocol Version 1.3, section4.5.3: Finished.RFC 5246: The Transport Layer Security (TLS) Protocol Version 1.2, section7.4.9: Finished.
like yes, both versions, we contain multitudes π
π HISTORY π
SSL_get_finished() and SSL_get_peer_finished() first appeared in SSLeay 0.9.5 and have been available since OpenBSD 2.7 β absolute elders, they've been slaying since before we were born ππ°οΈ
okay that's the whole page bestie, no cap π§
sign-off szn: this one's from Debian, dated August 21, 2026, and it's SSL_GET_FINISHED(3) β periodt π
π
π¦ where this page comes from
- arch rolling: libressl 4.4.0-1 Β· ISC AND custom:OpenSSL
- Copyright (c) 2020 Theo Buehler <tb@openbsd.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms