Deprecated Functions in OpenSSL

Here is a little anecdote about bringing old source code using OpenSSL to recent versions…

foo.c:47:11: warning: ‘ERR_remove_state’ is deprecated [-Wdeprecated-declarations]
/usr/include/openssl/err.h:248:1: note: declared here
DEPRECATEDIN_1_0_0(void ERR_remove_state(unsigned long pid))

Hm, okay, ERR_remove_state is deprecated. Let me check the OpenSSL man pages…

ERR_remove_state is deprecated and has been replaced by ERR_remove_thread_state.

Ah, well, that seems easy to replace with ERR_remove_thread_state!


foo.c:47:11: warning: ‘ERR_remove_thread_state’ is deprecated [-Wdeprecated-declarations]
/usr/include/openssl/err.h:247:1: note: declared here
DEPRECATEDIN_1_1_0(void ERR_remove_thread_state(void *))

(╯°□°)╯︵ ┻━┻

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.