1=pod 2 3=head1 NAME 4 5ERR_set_mark, ERR_clear_last_mark, ERR_pop_to_mark, ERR_count_to_mark, ERR_pop - 6set mark, clear mark, pop errors until mark and pop last error 7 8=head1 SYNOPSIS 9 10 #include <openssl/err.h> 11 12 int ERR_set_mark(void); 13 int ERR_pop_to_mark(void); 14 int ERR_clear_last_mark(void); 15 int ERR_count_to_mark(void); 16 int ERR_pop(void); 17 18=head1 DESCRIPTION 19 20ERR_set_mark() sets a mark on the current topmost error record if there 21is one. 22 23ERR_pop_to_mark() will pop the top of the error stack until a mark is found. 24The mark is then removed. If there is no mark, the whole stack is removed. 25 26ERR_clear_last_mark() removes the last mark added if there is one. 27 28ERR_count_to_mark() returns the number of entries on the error stack above the 29most recently marked entry, not including that entry. If there is no mark in the 30error stack, the number of entries in the error stack is returned. 31 32ERR_pop() unconditionally pops a single error entry from the top of the error 33stack (which is the entry obtainable via L<ERR_peek_last_error(3)>). 34 35=head1 RETURN VALUES 36 37ERR_set_mark() returns 0 if the error stack is empty, otherwise 1. 38 39ERR_clear_last_mark() and ERR_pop_to_mark() return 0 if there was no mark in the 40error stack, which implies that the stack became empty, otherwise 1. 41 42ERR_count_to_mark() returns the number of error stack entries found above the 43most recent mark, if any, or the total number of error stack entries. 44 45ERR_pop() returns 1 if an error was popped or 0 if the error stack was empty. 46 47=head1 HISTORY 48 49ERR_count_to_mark() was added in OpenSSL 3.2. 50ERR_pop() was added in OpenSSL 3.3. 51 52=head1 COPYRIGHT 53 54Copyright 2003-2024 The OpenSSL Project Authors. All Rights Reserved. 55 56Licensed under the Apache License 2.0 (the "License"). You may not use 57this file except in compliance with the License. You can obtain a copy 58in the file LICENSE in the source distribution or at 59L<https://www.openssl.org/source/license.html>. 60 61=cut 62