---
name: "libressl-SSL_renegotiate"
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_renegotiate"
---

# libressl-SSL\_renegotiate(3)

initiate a new TLS handshake

## NAME

**SSL\_renegotiate**, **SSL\_renegotiate\_abbreviated**, **SSL\_renegotiate\_pending** – initiate a new TLS handshake

## SYNOPSIS

SSL Library (libssl, -lssl) libcrypto

**#include \<openssl/ssl.h\>**

*int*\

**SSL\_renegotiate**(*SSL \*ssl*);

*int*\

**SSL\_renegotiate\_abbreviated**(*SSL \*ssl*);

*int*\

**SSL\_renegotiate\_pending**(*SSL \*ssl*);

## DESCRIPTION

When called from the client side, **SSL\_renegotiate**() schedules a completely new handshake over an existing TLS connection. The next time an I/O operation such as **SSL\_read**() or **SSL\_write**() takes place on the connection, a check is performed to confirm that it is a suitable time to start a renegotiation. If so, a new handshake is initiated immediately. An existing session associated with the connection is not resumed.

This function is automatically called by SSL\_read(3) and SSL\_write(3) whenever the renegotiation byte count set by BIO\_set\_ssl\_renegotiate\_bytes(3) or the timeout set by BIO\_set\_ssl\_renegotiate\_timeout(3) are exceeded.

When called from the client side, **SSL\_renegotiate\_abbreviated**() is similar to **SSL\_renegotiate**() except that resuming the session associated with the current connection is attempted in the new handshake.

When called from the server side, **SSL\_renegotiate**() and **SSL\_renegotiate\_abbreviated**() behave identically. They both schedule a request for a new handshake to be sent to the client. The next time an I/O operation is performed, the same checks as on the client side are performed and then, if appropriate, the request is sent. The client may or may not respond with a new handshake and it may or may not attempt to resume an existing session. If a new handshake is started, it is handled transparently during any I/O function.

If a LibreSSL client receives a renegotiation request from a server, it is also handled transparently during any I/O function. The client attempts to resume the current session in the new handshake. For historical reasons, DTLS clients do not attempt to resume the session in the new handshake.

## RETURN VALUES

**SSL\_renegotiate**() and **SSL\_renegotiate\_abbreviated**() return 1 on success or 0 on error.

**SSL\_renegotiate\_pending**() returns 1 if a renegotiation or renegotiation request has been scheduled but not yet acted on, or 0 otherwise.

## SEE ALSO

[ssl(3)](/ssl/3.md), SSL\_do\_handshake(3), SSL\_num\_renegotiations(3), SSL\_read(3), SSL\_write(3)

## HISTORY

**SSL\_renegotiate**() first appeared in SSLeay 0.8.0 and has been available since OpenBSD 2.4.

**SSL\_renegotiate\_pending**() first appeared in OpenSSL 0.9.7 and has been available since OpenBSD 3.2.

**SSL\_renegotiate\_abbreviated**() first appeared in OpenSSL 1.0.1 and has been available since OpenBSD 5.3.
