---
name: "libressl-SSL_num_renegotiations"
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_num_renegotiations"
---

# libressl-SSL\_num\_renegotiations(3)

renegotiation counters

## NAME

**SSL\_num\_renegotiations**, **SSL\_clear\_num\_renegotiations**, **SSL\_total\_renegotiations** – renegotiation counters

## SYNOPSIS

SSL Library (libssl, -lssl) libcrypto

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

*long*\

**SSL\_num\_renegotiations**(*SSL \*ssl*);

*long*\

**SSL\_clear\_num\_renegotiations**(*SSL \*ssl*);

*long*\

**SSL\_total\_renegotiations**(*SSL \*ssl*);

## DESCRIPTION

**SSL\_num\_renegotiations**() reports the number of renegotiations initiated in *ssl* since SSL\_new(3), SSL\_clear(3), or **SSL\_clear\_num\_renegotiations**() was last called on that object.

**SSL\_clear\_num\_renegotiations**() does the same and additionally resets the renegotiation counter to 0.

**SSL\_total\_renegotiations**() reports the number of renegotiations initiated in *ssl* since SSL\_new(3) or SSL\_clear(3) was last called on that object.

These functions are implemented as macros.

## RETURN VALUES

All these functions return a number of renegotiations.

## SEE ALSO

BIO\_set\_ssl\_renegotiate\_bytes(3), [ssl(3)](/ssl/3.md), SSL\_ctrl(3), SSL\_read(3), SSL\_renegotiate(3), SSL\_write(3)

## HISTORY

These functions first appeared in SSLeay 0.9.0 and have been available since OpenBSD 2.4.
