---
name: "libressl-SSL_SESSION_get_protocol_version"
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_SESSION_get_protocol_version"
---

# libressl-SSL\_SESSION\_get\_protocol\_version(3)

get the session protocol version

## NAME

**SSL\_SESSION\_get\_protocol\_version** – get the session protocol version

## SYNOPSIS

SSL Library (libssl, -lssl) libcrypto

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

*int*\

**SSL\_SESSION\_get\_protocol\_version**(*const SSL\_SESSION \*s*);

## DESCRIPTION

**SSL\_SESSION\_get\_protocol\_version**() returns the protocol version number used by the session *s*.

## RETURN VALUES

**SSL\_SESSION\_get\_protocol\_version**() returns a constant like TLS1\_VERSION or TLS1\_2\_VERSION.

## SEE ALSO

[ssl(3)](/ssl/3.md), SSL\_get\_session(3), SSL\_SESSION\_get0\_peer(3), SSL\_SESSION\_get\_compress\_id(3), SSL\_SESSION\_get\_id(3), SSL\_SESSION\_get\_time(3), SSL\_SESSION\_new(3)

## HISTORY

**SSL\_SESSION\_get\_protocol\_version**() first appeared in OpenSSL 1.1.0 and has been available since OpenBSD 6.3.
