ERR_REMOVE_STATE(3SSL)

🫧 ERR_REMOVE_STATE(3SSL) β€” bestie, these are DEPRECATED 🫧

okay so real talk: this is a page from the 3SSL manual (that's the OpenSSL one, iykyk), and the entire vibe is "these functions are old, please stop using them." not me being dramatic β€” the original literally puts DEPRECATED in the NAME section. πŸ’€


✨ NAME ✨

ERR_remove_thread_state, ERR_remove_state β€” DEPRECATED. that's it. that's the name. they're deprecated bestie, that's the whole personality. πŸ’…


🌸 SYNOPSIS 🌸

okay so here's the thing, there are two functions and both of them are on the deprecated list. not me reading the fine print 😭

first one: 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);

second one: deprecated since OpenSSL 1.1.0, and same deal β€” it can 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);

πŸ¦‹ DESCRIPTION πŸ¦‹

so what did they do? ERR_remove_state() frees the error queue associated with the specified thread, identified by tid. yes, bestie, the whole queue, gone, poof. 🧚

and ERR_remove_thread_state()? literally the same thing, except the identifier is an opaque pointer. that's the plot twist. that's it. πŸŽ€


πŸ’– RETURN VALUES πŸ’–

ERR_remove_state() and ERR_remove_thread_state() return no value. nothing. void. they give you nothing and honestly we love that for them 🫢


πŸ‘‘ SEE ALSO πŸ‘‘

  • LOPENSSL_init_crypto(3)

(i'm not touching that, that's exactly how it's written, character for character, no cap πŸ”₯)


🌈 HISTORY 🌈

  • ERR_remove_state() was deprecated in OpenSSL 1.0.0
  • ERR_remove_thread_state() was deprecated in OpenSSL 1.1.0

and β€” direct quote energy β€” these functions should not be used. periodt. πŸ’…


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>.


🫢 friendly reminder from your girl: deprecated means deprecated, bestie. don't say i didn't warn you ✨

okay that's the whole page!! mwah πŸ’‹ sign-off time: this was 3.5.7, dated 2026-06-09, and it's the ERR_REMOVE_STATE(3SSL) situation in full β€” go forth and not use these functions πŸ¦‹β­

πŸ“¦ where this page comes from