ERR_SET_MARK(3ossl)

πŸ“¦ version 3.5.0, in opensuse-leap 16.0

✨ NAME ✨

okay so welcome to the ERR_SET_MARK(3ossl) page from the OpenSSL 3ossl manual, bestie! this one is all about:

  • ERR_set_mark, ERR_clear_last_mark, ERR_pop_to_mark, ERR_count_to_mark, ERR_pop β€” set mark, clear mark, pop errors until mark and pop last error

πŸ’… SYNOPSIS πŸ’…

here's the exact include + signatures, no edits, periodt:

#include <openssl/err.h>

int ERR_set_mark(void);
int ERR_pop_to_mark(void);
int ERR_clear_last_mark(void);
int ERR_count_to_mark(void);
int ERR_pop(void);

🌸 DESCRIPTION 🌸

vibe check on the error stack, okay? here's each function, slay:

  • ERR_set_mark() β€” sets a mark on the current topmost error record if there is one. like a little bookmark for your error stack, but only when there’s a topmost record to bookmark.
  • 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. yes, the whole stack. dramatic but that’s the rule.
  • ERR_clear_last_mark() β€” removes the last mark added if there is one.
  • ERR_count_to_mark() β€” returns the number of entries on the error stack above the most recently marked entry, not including that entry. if there is no mark in the error stack, the number of entries in the error stack is returned.
  • ERR_pop() β€” unconditionally pops a single error entry from the top of the error stack (which is the entry obtainable via ERR_peek_last_error(3)). β€œunconditionally” is doing a lot of work there, bestie: it just pops.

πŸ¦‹ RETURN VALUES πŸ¦‹

  • ERR_set_mark() β€” returns 0 if the error stack is empty, otherwise 1.
  • ERR_clear_last_mark() and ERR_pop_to_mark() β€” return 0 if there was no mark in the error stack, which implies that the stack became empty, otherwise 1.
  • ERR_count_to_mark() β€” returns the number of error stack entries found above the most recent mark, if any, or the total number of error stack entries.
  • ERR_pop() β€” returns 1 if an error was popped or 0 if the error stack was empty.

πŸŽ€ HISTORY πŸŽ€

  • ERR_count_to_mark() was added in OpenSSL 3.2.
  • ERR_pop() was added in OpenSSL 3.3.

Copyright 2003-2024 The OpenSSL Project Authors. All Rights Reserved.

Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.

okay that’s the whole page, bestie πŸ’– this is the ERR_SET_MARK(3ossl) manual, from OpenSSL 3.5.0, dated 2026-09-25. mwah, bye! 🫢

πŸ“¦ where this page comes from