ERR_REMOVE_STATE(3ossl)

πŸ“¦
version 15.1 Β· 3 versions
, in freebsd 15.1

πŸ’… 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 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