ERR_SET_MARK(3ossl)

πŸ“¦ version 15.1, in freebsd 15.1

🌸 NAME 🌸

okay bestie, welcome to the 3ossl manual page for the error-stack mark squad: ERR_set_mark, ERR_clear_last_mark, ERR_pop_to_mark, ERR_count_to_mark, and ERR_pop β€” set mark, clear mark, pop errors until mark and pop last error. πŸ’…βœ¨

πŸ¦‹ SYNOPSIS πŸ¦‹

no cap, here are the exact include and signatures:

#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 ✨

okay so here's the group-chat lore for each one:

  • ERR_set_mark() β€” sets a mark on the current topmost error record if there is one. πŸŽ€
  • ERR_pop_to_mark() β€” pops the top of the error stack until a mark is found. Then the mark is removed. If there is no mark, the whole stack is removed. πŸ˜­πŸ’€
  • 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, it returns the number of entries in the error stack. πŸ”₯
  • 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)). periodt. πŸ‘‘

πŸ’– 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>. 🌸


kisses bestie, this iconic page is from OpenSSL source/version 3.5.6, dated 2026-04-07. πŸ’‹πŸ«Ά no cap, go mark that error stack. ✨

πŸ“¦ where this page comes from