---
name: "libressl-SSL_state_string"
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_state_string"
---

# libressl-SSL\_state\_string(3)

get textual description of state of an SSL object

## NAME

**SSL\_state\_string**, **SSL\_state\_string\_long** – get textual description of state of an SSL object

## SYNOPSIS

SSL Library (libssl, -lssl) libcrypto

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

*const* *char* *\**\

**SSL\_state\_string**(*const SSL \*ssl*);

*const* *char* *\**\

**SSL\_state\_string\_long**(*const SSL \*ssl*);

## DESCRIPTION

**SSL\_state\_string**() returns a 6 letter string indicating the current state of the *SSL* object *ssl*.

**SSL\_state\_string\_long**() returns a string indicating the current state of the *SSL* object *ssl*.

During its use, an *SSL* object passes several states. The state is internally maintained. Querying the state information is not very informative before or when a connection has been established. It however can be of significant interest during the handshake.

When using non-blocking sockets, the function call performing the handshake may return with SSL\_ERROR\_WANT\_READ or SSL\_ERROR\_WANT\_WRITE condition, so that **SSL\_state\_string\[\_long\]**() may be called.

For both blocking or non-blocking sockets, the details state information can be used within the **info\_callback**() function set with the SSL\_set\_info\_callback(3) call.

## RETURN VALUES

Detailed description of possible states to be included later.

## SEE ALSO

[ssl(3)](/ssl/3.md), SSL\_CTX\_set\_info\_callback(3)

## HISTORY

**SSL\_state\_string**() and **SSL\_state\_string\_long**() first appeared in SSLeay 0.6.0 and have been available since OpenBSD 2.4.
