ERR_REMOVE_STATE(3ossl)

πŸ“¦ version 3.5.0, in opensuse-leap 16.0

πŸ’– 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 by tid.
  • 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 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