ERR_REMOVE_STATE(3ossl)
π ERR_REMOVE_STATE(3ossl) β the "please stop using these" era
okay bestie, so this is one of those 3ossl manual pages, and honestly? it's giving retirement party π. We're talking about two functions that are DEPRECATED β capital letters, no cap β so buckle up, this is gonna be short but we're gonna make it cute.
β¨ SYNOPSIS β¨
So here's the first one, and listen β this function has been deprecated since OpenSSL 1.0.0, and you can hide it entirely by defining OPENSSL_API_COMPAT with a suitable version value, see openssl_user_macros(7):
void ERR_remove_state(unsigned long tid);
And then the second one, deprecated since OpenSSL 1.1.0, also hideable entirely by defining OPENSSL_API_COMPAT with a suitable version value, see openssl_user_macros(7):
void ERR_remove_thread_state(void *tid);
like, they both got the same escape hatch, they're matching, it's iconic π
πΈ DESCRIPTION πΈ
So ERR_remove_state() frees the error queue associated with the specified thread, identified by tid. That's the whole gig. π§Ή
And ERR_remove_thread_state()? It does the same thing β literally the same thing β except the identifier is an opaque pointer instead. That's the only glow-up here: unsigned long β void *. slay for type safety I guess π
ngl bestie, "frees the error queue associated with the specified thread" is the entire personality of these two, so don't go looking for extra lore. there is none. π«Ά
β RETURN VALUES β
ERR_remove_state() and ERR_remove_thread_state() return no value.
That's it. Nothing. Void. They give you nothing back, and honestly? relatable π
π¦ SEE ALSO π¦
LOPENSSL_init_crypto(3)β go read this one instead, it's the main character now π
π HISTORY π
Okay so the timeline, because I know you love the drama:
ERR_remove_state()was deprecated in OpenSSL 1.0.0 π°οΈERR_remove_thread_state()was deprecated in OpenSSL 1.1.0 π°οΈ
and the page is super clear about the vibe: these functions should not be used. periodt. that's the note. please stop calling them, bestie π
π COPYRIGHT π
Copyright 2000-2018 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>.
(that link is literally written in the manpage so I'm passing it straight to you, no gatekeeping π )
π the cute sign-off π
that was ERR_REMOVE_STATE(3ossl) β manpage number 3.5.6, dated 2026-04-07, brought to you by the fine folks at OpenSSL. go free your error queues (some other way) and stay hydrated, bestie ππβ¨
π¦ where this page comes from
- freebsd 15.1: base 15.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms