ERR_REMOVE_STATE(3ossl)
π ERR_REMOVE_STATE(3ossl) β like, the whole vibe π
Hey bestie, welcome to the 3ossl corner of the OpenSSL manual universe π¦ this one's a little reunion tour of two functions that are, and I cannot stress this enough, DEPRECATED. Like, they're giving "senior who graduated two years ago but still shows up to the group chat" energy π
β¨ NAME β¨
ERR_remove_thread_state, ERR_remove_state β DEPRECATED π«π
Both of them. Together. As a duo. And yes, the "DEPRECATED" is doing a lot of heavy lifting in that name line, no cap.
π SYNOPSIS π
Okay so, first up β this one has been deprecated since OpenSSL 1.0.0, and it can be hidden 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 this next one has been deprecated since OpenSSL 1.1.0, and it can also be hidden entirely by defining OPENSSL_API_COMPAT with a suitable version value, see openssl_user_macros(7):
void ERR_remove_thread_state(void *tid);
Yeah. OPENSSL_API_COMPAT is the "you're literally not on the guest list" bouncer for these two π«Ά
πΈ DESCRIPTION πΈ
So what do they even do? Okay so:
ERR_remove_state()frees the error queue associated with the specified thread, identified bytid.ERR_remove_thread_state()does the same thing, except the identifier is an opaque pointer.
That's it. That's the whole lore. Same energy, different tid type β unsigned long for one, void * for the other. Sisters, not twins π
β RETURN VALUES β
Big mood: they return no value β¨ both of them. Neither one. Nothing comes back. It's giving void, it's giving "I'm not giving you anything," it's giving absolute silence. π
π¦ SEE ALSO π¦
LOPENSSL_init_crypto(3)β go look at this one instead, bestie, iykyk
π HISTORY π
So the timeline is a little tragic π
ERR_remove_state() was deprecated in OpenSSL 1.0.0 and ERR_remove_thread_state() was deprecated in OpenSSL 1.1.0; these functions and should not be used.
That's right β should not be used. Not "probably don't," not "maybe reconsider." Should not. Consider this your forewarned girly pop moment π¨
π 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>.
And that's the whole page, babe π before the final bell, the fine print: this was OpenSSL 3.5.0, dated 2026-09-25, and yes, it's still ERR_REMOVE_STATE(3ossl) β mwah, slay, stay deprecated, periodt ππ₯
π¦ where this page comes from
- opensuse-leap 16.0: openssl-3-doc 3.5.0-160000.11.1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms