1*2c07bb3bSschwarze.\" $OpenBSD: ERR_set_mark.3,v 1.4 2018/03/23 00:09:11 schwarze Exp $ 2f95f7777Sschwarze.\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 38974101aSjmc.\" 4f95f7777Sschwarze.\" This file was written by Richard Levitte <levitte@openssl.org>. 5f95f7777Sschwarze.\" Copyright (c) 2003 The OpenSSL Project. All rights reserved. 6f95f7777Sschwarze.\" 7f95f7777Sschwarze.\" Redistribution and use in source and binary forms, with or without 8f95f7777Sschwarze.\" modification, are permitted provided that the following conditions 9f95f7777Sschwarze.\" are met: 10f95f7777Sschwarze.\" 11f95f7777Sschwarze.\" 1. Redistributions of source code must retain the above copyright 12f95f7777Sschwarze.\" notice, this list of conditions and the following disclaimer. 13f95f7777Sschwarze.\" 14f95f7777Sschwarze.\" 2. Redistributions in binary form must reproduce the above copyright 15f95f7777Sschwarze.\" notice, this list of conditions and the following disclaimer in 16f95f7777Sschwarze.\" the documentation and/or other materials provided with the 17f95f7777Sschwarze.\" distribution. 18f95f7777Sschwarze.\" 19f95f7777Sschwarze.\" 3. All advertising materials mentioning features or use of this 20f95f7777Sschwarze.\" software must display the following acknowledgment: 21f95f7777Sschwarze.\" "This product includes software developed by the OpenSSL Project 22f95f7777Sschwarze.\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" 23f95f7777Sschwarze.\" 24f95f7777Sschwarze.\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to 25f95f7777Sschwarze.\" endorse or promote products derived from this software without 26f95f7777Sschwarze.\" prior written permission. For written permission, please contact 27f95f7777Sschwarze.\" openssl-core@openssl.org. 28f95f7777Sschwarze.\" 29f95f7777Sschwarze.\" 5. Products derived from this software may not be called "OpenSSL" 30f95f7777Sschwarze.\" nor may "OpenSSL" appear in their names without prior written 31f95f7777Sschwarze.\" permission of the OpenSSL Project. 32f95f7777Sschwarze.\" 33f95f7777Sschwarze.\" 6. Redistributions of any form whatsoever must retain the following 34f95f7777Sschwarze.\" acknowledgment: 35f95f7777Sschwarze.\" "This product includes software developed by the OpenSSL Project 36f95f7777Sschwarze.\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" 37f95f7777Sschwarze.\" 38f95f7777Sschwarze.\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY 39f95f7777Sschwarze.\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 40f95f7777Sschwarze.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 41f95f7777Sschwarze.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR 42f95f7777Sschwarze.\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43f95f7777Sschwarze.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 44f95f7777Sschwarze.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 45f95f7777Sschwarze.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 46f95f7777Sschwarze.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 47f95f7777Sschwarze.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 48f95f7777Sschwarze.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 49f95f7777Sschwarze.\" OF THE POSSIBILITY OF SUCH DAMAGE. 50f95f7777Sschwarze.\" 51*2c07bb3bSschwarze.Dd $Mdocdate: March 23 2018 $ 5223a520a8Sschwarze.Dt ERR_SET_MARK 3 5323a520a8Sschwarze.Os 5423a520a8Sschwarze.Sh NAME 5523a520a8Sschwarze.Nm ERR_set_mark , 5623a520a8Sschwarze.Nm ERR_pop_to_mark 5723a520a8Sschwarze.Nd set marks and pop OpenSSL errors until mark 5823a520a8Sschwarze.Sh SYNOPSIS 5923a520a8Sschwarze.In openssl/err.h 6023a520a8Sschwarze.Ft int 6123a520a8Sschwarze.Fn ERR_set_mark void 6223a520a8Sschwarze.Ft int 6323a520a8Sschwarze.Fn ERR_pop_to_mark void 6423a520a8Sschwarze.Sh DESCRIPTION 6523a520a8Sschwarze.Fn ERR_set_mark 6623a520a8Sschwarzesets a mark on the current topmost error record if there is one. 6723a520a8Sschwarze.Pp 6823a520a8Sschwarze.Fn ERR_pop_to_mark 6923a520a8Sschwarzewill pop the top of the error stack until a mark is found. 7023a520a8SschwarzeThe mark is then removed. 7123a520a8SschwarzeIf there is no mark, the whole stack is removed. 7223a520a8Sschwarze.Sh RETURN VALUES 7323a520a8Sschwarze.Fn ERR_set_mark 7423a520a8Sschwarzereturns 0 if the error stack is empty, otherwise 1. 7523a520a8Sschwarze.Pp 7623a520a8Sschwarze.Fn ERR_pop_to_mark 7723a520a8Sschwarzereturns 0 if there was no mark in the error stack, which implies that 7823a520a8Sschwarzethe stack became empty, otherwise 1. 7923a520a8Sschwarze.Sh SEE ALSO 8023a520a8Sschwarze.Xr ERR 3 8123a520a8Sschwarze.Sh HISTORY 8223a520a8Sschwarze.Fn ERR_set_mark 8323a520a8Sschwarzeand 8423a520a8Sschwarze.Fn ERR_pop_to_mark 85*2c07bb3bSschwarzefirst appeared in OpenSSL 0.9.8 and have been available since 86*2c07bb3bSschwarze.Ox 4.5 . 87