---
name: "libressl-SSL_get_finished"
section: "3"
platform: "linux"
package: "libressl"
version: "4.4.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/libressl-SSL_get_finished"
---

# libressl-SSL\_get\_finished(3)

get last sent or last expected finished message

## NAME

**SSL\_get\_finished**, **SSL\_get\_peer\_finished** – get last sent or last expected finished message

## SYNOPSIS

SSL Library (libssl, -lssl) 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*);

## DESCRIPTION

**SSL\_get\_finished**() and **SSL\_get\_peer\_finished**() copy *count* bytes from the last finished message sent to the peer or expected from the peer into the caller-provided buffer *buf*.

The finished message is computed from a checksum of the handshake records exchanged with the peer. Its length depends on the ciphersuite in use and is at most EVP\_MAX\_MD\_SIZE, i.e., 64 bytes.

## RETURN VALUES

**SSL\_get\_finished**() and **SSL\_get\_peer\_finished**() return the number of bytes copied into *buf*. The return value is zero if the handshake has not reached the finished message.

## SEE ALSO

[ssl(3)](/ssl/3.md), SSL\_get\_session(3), SSL\_set\_session(3)

## STANDARDS

RFC 9846: The Transport Layer Security (TLS) Protocol Version 1.3, section 4.5.3: Finished.

RFC 5246: The Transport Layer Security (TLS) Protocol Version 1.2, section 7.4.9: Finished.

## HISTORY

**SSL\_get\_finished**() and **SSL\_get\_peer\_finished**() first appeared in SSLeay 0.9.5 and have been available since OpenBSD 2.7.
