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

# libressl-ERR\_set\_mark(3)

set marks and pop OpenSSL errors until mark

## NAME

**ERR\_set\_mark**, **ERR\_pop\_to\_mark** – set marks and pop OpenSSL errors until mark

## SYNOPSIS

Crypto Library (libcrypto, -lcrypto)

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

*int*\

**ERR\_set\_mark**(*void*);

*int*\

**ERR\_pop\_to\_mark**(*void*);

## DESCRIPTION

**ERR\_set\_mark**() sets a mark on the current topmost error record if there is one.

**ERR\_pop\_to\_mark**() will pop the top of the error stack until a mark is found. The mark is then removed. If there is no mark, the whole stack is removed.

## RETURN VALUES

**ERR\_set\_mark**() returns 0 if the error stack is empty, otherwise 1.

**ERR\_pop\_to\_mark**() returns 0 if there was no mark in the error stack, which implies that the stack became empty, otherwise 1.

## SEE ALSO

ERR(3)

## HISTORY

**ERR\_set\_mark**() and **ERR\_pop\_to\_mark**() first appeared in OpenSSL 0.9.8 and have been available since OpenBSD 4.5.
