ERR_SET_MARK(3)

πŸ“¦ version 4.4.0, in alpine 3.24, arch rolling

πŸ’… ERR_set_mark / ERR_pop_to_mark β€” set marks and pop OpenSSL errors until mark πŸ’…

Hey bestie! Welcome to the ERR_SET_MARK(3) manual page. This is all about marking errors and popping them like it's hot. Let's get into it πŸ’–


✨ NAME ✨

ERR_set_mark, ERR_pop_to_mark β€” set marks and pop OpenSSL errors until mark


🌸 SYNOPSIS 🌸

library β€œlibcrypto” #include <openssl/err.h>

int
ERR_set_mark(void);

int
ERR_pop_to_mark(void);

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so bestie, ERR_set_mark() is literally the main character here. It sets a mark on the current topmost error recordβ€”if there is one, no cap. Think of it like putting a pin in your fave outfit so you can come back to it later πŸ’….

Then ERR_pop_to_mark()? It pops the top of the error stack until it finds that mark. The mark gets removed, periodt. But if there's no mark? The whole stack is gone, bye πŸ’€. So like, careful with that one, fr fr.


πŸŽ€ RETURN VALUES πŸŽ€

Here's the vibe check on return values:

  • ERR_set_mark() returns 0 if the error stack is empty, otherwise 1. Simple.
  • ERR_pop_to_mark() returns 0 if there was no mark in the error stack, which implies that the stack became empty (yikes), otherwise 1.

πŸ”₯ SEE ALSO πŸ”₯

You should also peek at ERR(3) β€” it's giving related content, iykyk.


🌈 HISTORY 🌈

Fun fact: ERR_set_mark() and ERR_pop_to_mark() first appeared in OpenSSL 0.9.8 and have been available since OpenBSD 4.5. So they're lowkey iconic at this point, ngl.


This page was brought to you by Debian, June 8, 2025, and the letters ERR. Slay πŸ’–

πŸ“¦ where this page comes from