*Tomáš Mráz*
+ * Removed deprecated functions `ERR_get_state()`, `ERR_remove_state()` and
+ `ERR_remove_thread_state()`. The `ERR_STATE` object is now always opaque.
+
+ *Tomáš Mráz*
+
* Added SNMP KDF (EVP_KDF_SNMPKDF) to EVP_KDF
*Barry Fussell and Helen Zhang*
* https://www.openssl.org/source/license.html
*/
-#define OSSL_FORCE_ERR_STATE
-
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
OSSL_ERR_STATE_free(state);
}
-#ifndef OPENSSL_NO_DEPRECATED_1_1_0
-void ERR_remove_thread_state(void *dummy)
-{
-}
-#endif
-
-#ifndef OPENSSL_NO_DEPRECATED_1_0_0
-void ERR_remove_state(unsigned long pid)
-{
-}
-#endif
-
ERR_STATE *ossl_err_get_state_int(void)
{
ERR_STATE *state;
return state;
}
-#ifndef OPENSSL_NO_DEPRECATED_3_0
-ERR_STATE *ERR_get_state(void)
-{
- return ossl_err_get_state_int();
-}
-#endif
-
/*
* err_shelve_state returns the current thread local error state
* and freezes the error module until err_unshelve_state is called.
* https://www.openssl.org/source/license.html
*/
-#define OSSL_FORCE_ERR_STATE
-
#include <string.h>
#include <openssl/err.h>
#include "err_local.h"
#include <string.h>
#include <openssl/err.h>
#include <openssl/e_os2.h>
+#include "internal/err.h"
+
+#define ERR_FLAG_MARK 0x01
+#define ERR_FLAG_CLEAR 0x02
+
+struct err_state_st {
+ int err_flags[ERR_NUM_ERRORS];
+ int err_marks[ERR_NUM_ERRORS];
+ unsigned long err_buffer[ERR_NUM_ERRORS];
+ char *err_data[ERR_NUM_ERRORS];
+ size_t err_data_size[ERR_NUM_ERRORS];
+ int err_data_flags[ERR_NUM_ERRORS];
+ char *err_file[ERR_NUM_ERRORS];
+ int err_line[ERR_NUM_ERRORS];
+ char *err_func[ERR_NUM_ERRORS];
+ int top, bottom;
+};
static ossl_inline void err_get_slot(ERR_STATE *es)
{
* https://www.openssl.org/source/license.html
*/
-#define OSSL_FORCE_ERR_STATE
-
#include <openssl/err.h>
#include "err_local.h"
* https://www.openssl.org/source/license.html
*/
-#define OSSL_FORCE_ERR_STATE
-
#include <stdio.h>
#include "internal/cryptlib.h"
#include <openssl/crypto.h>
* https://www.openssl.org/source/license.html
*/
-#define OSSL_FORCE_ERR_STATE
-
#include <openssl/err.h>
#include "err_local.h"
GENERATE[html/man3/ERR_put_error.html]=man3/ERR_put_error.pod
DEPEND[man/man3/ERR_put_error.3]=man3/ERR_put_error.pod
GENERATE[man/man3/ERR_put_error.3]=man3/ERR_put_error.pod
-DEPEND[html/man3/ERR_remove_state.html]=man3/ERR_remove_state.pod
-GENERATE[html/man3/ERR_remove_state.html]=man3/ERR_remove_state.pod
-DEPEND[man/man3/ERR_remove_state.3]=man3/ERR_remove_state.pod
-GENERATE[man/man3/ERR_remove_state.3]=man3/ERR_remove_state.pod
DEPEND[html/man3/ERR_set_mark.html]=man3/ERR_set_mark.pod
GENERATE[html/man3/ERR_set_mark.html]=man3/ERR_set_mark.pod
DEPEND[man/man3/ERR_set_mark.3]=man3/ERR_set_mark.pod
html/man3/ERR_new.html \
html/man3/ERR_print_errors.html \
html/man3/ERR_put_error.html \
-html/man3/ERR_remove_state.html \
html/man3/ERR_set_mark.html \
html/man3/EVP_ASYM_CIPHER_free.html \
html/man3/EVP_BytesToKey.html \
man/man3/ERR_new.3 \
man/man3/ERR_print_errors.3 \
man/man3/ERR_put_error.3 \
-man/man3/ERR_remove_state.3 \
man/man3/ERR_set_mark.3 \
man/man3/EVP_ASYM_CIPHER_free.3 \
man/man3/EVP_BytesToKey.3 \
+++ /dev/null
-=pod
-
-=head1 NAME
-
-ERR_remove_thread_state, ERR_remove_state - DEPRECATED
-
-=head1 SYNOPSIS
-
-The following function has been deprecated since OpenSSL 1.0.0, and can be
-hidden entirely by defining B<OPENSSL_API_COMPAT> with a suitable version value,
-see L<openssl_user_macros(7)>:
-
- void ERR_remove_state(unsigned long tid);
-
-The following function has been deprecated since OpenSSL 1.1.0, and can be
-hidden entirely by defining B<OPENSSL_API_COMPAT> with a suitable version value,
-see L<openssl_user_macros(7)>:
-
- void ERR_remove_thread_state(void *tid);
-
-=head1 DESCRIPTION
-
-ERR_remove_state() frees the error queue associated with the specified
-thread, identified by B<tid>.
-ERR_remove_thread_state() does the same thing, except the identifier is
-an opaque pointer.
-
-=head1 RETURN VALUES
-
-ERR_remove_state() and ERR_remove_thread_state() return no value.
-
-=head1 SEE ALSO
-
-LL<OPENSSL_init_crypto(3)>
-
-=head1 HISTORY
-
-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.
-
-=head1 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
-L<https://www.openssl.org/source/license.html>.
-
-=cut
=head1 NAME
ASN1_STRING_data,
+BIO_f_reliable,
+ERR_get_state,
+ERR_remove_state,
+ERR_remove_thread_state,
EVP_CIPHER_meth_new,
EVP_CIPHER_meth_dup,
EVP_CIPHER_meth_free,
EVP_PKEY_meth_get_public_check,
EVP_PKEY_meth_get_param_check,
EVP_PKEY_meth_get_digest_custom,
-BIO_f_reliable,
EVP_MD_CTX_update_fn,
EVP_MD_CTX_set_update_fn,
EVP_PKEY_asn1_add0,
=item ASN1_STRING_data (Deprecated in 1.1.1) - see L<ASN1_STRING_get0_data(3)>
+=item BIO_f_reliable (Broken since 3.0.0) - removed without replacement
+
+=item ERR_get_state (Deprecated in 3.0.0) - removed, no use with opaque ERR_STATE
+
+=item ERR_remove_state (Deprecated in 1.0.0) - removed, no-op
+
+=item ERR_remove_thread_state (Deprecated in 1.1.0) - removed, no-op
+
=item EVP_CIPHER_meth_new (Deprecated in 3.0.0) - consult L<ossl-guide-migration(7)>
=item EVP_CIPHER_meth_dup (Deprecated in 3.0.0) - consult L<ossl-guide-migration(7)>
=item EVP_PKEY_meth_get_digest_custom (Deprecated in 3.0.0) - consult L<ossl-guide-migration(7)>
-=item BIO_f_reliable (Broken since 3.0.0) - removed without replacement
-
=item EVP_MD_CTX_update_fn (Deprecated in 3.0.0) - consult L<ossl-guide-migration(7)>
=item EVP_MD_CTX_set_update_fn (Deprecated in 3.0.0) - consult L<ossl-guide-migration(7)>
#define OSSL_INTERNAL_ERR_H
#pragma once
+#define ERR_NUM_ERRORS 16
+
void err_free_strings_int(void);
#endif
#define ERR_TXT_MALLOCED 0x01
#define ERR_TXT_STRING 0x02
-#if !defined(OPENSSL_NO_DEPRECATED_3_0) || defined(OSSL_FORCE_ERR_STATE)
-#define ERR_FLAG_MARK 0x01
-#define ERR_FLAG_CLEAR 0x02
-
-#define ERR_NUM_ERRORS 16
-struct err_state_st {
- int err_flags[ERR_NUM_ERRORS];
- int err_marks[ERR_NUM_ERRORS];
- unsigned long err_buffer[ERR_NUM_ERRORS];
- char *err_data[ERR_NUM_ERRORS];
- size_t err_data_size[ERR_NUM_ERRORS];
- int err_data_flags[ERR_NUM_ERRORS];
- char *err_file[ERR_NUM_ERRORS];
- int err_line[ERR_NUM_ERRORS];
- char *err_func[ERR_NUM_ERRORS];
- int top, bottom;
-};
-#endif
-
/* library */
#define ERR_LIB_NONE 1
#define ERR_LIB_SYS 2
#define ERR_PACK(lib, func, reason) \
((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
-#ifndef OPENSSL_NO_DEPRECATED_3_0
-#define SYS_F_FOPEN 0
-#define SYS_F_CONNECT 0
-#define SYS_F_GETSERVBYNAME 0
-#define SYS_F_SOCKET 0
-#define SYS_F_IOCTLSOCKET 0
-#define SYS_F_BIND 0
-#define SYS_F_LISTEN 0
-#define SYS_F_ACCEPT 0
-#define SYS_F_WSASTARTUP 0
-#define SYS_F_OPENDIR 0
-#define SYS_F_FREAD 0
-#define SYS_F_GETADDRINFO 0
-#define SYS_F_GETNAMEINFO 0
-#define SYS_F_SETSOCKOPT 0
-#define SYS_F_GETSOCKOPT 0
-#define SYS_F_GETSOCKNAME 0
-#define SYS_F_GETHOSTBYNAME 0
-#define SYS_F_FFLUSH 0
-#define SYS_F_OPEN 0
-#define SYS_F_CLOSE 0
-#define SYS_F_IOCTL 0
-#define SYS_F_STAT 0
-#define SYS_F_FCNTL 0
-#define SYS_F_FSTAT 0
-#define SYS_F_SENDFILE 0
-#endif
-
/*
* All ERR_R_ codes must be combined with ERR_RFLAG_COMMON.
*/
while (0) \
continue
#endif
-#ifndef OPENSSL_NO_DEPRECATED_1_1_0
-OSSL_DEPRECATEDIN_1_1_0 void ERR_remove_thread_state(void *);
-#endif
-#ifndef OPENSSL_NO_DEPRECATED_1_0_0
-OSSL_DEPRECATEDIN_1_0_0 void ERR_remove_state(unsigned long pid);
-#endif
-#ifndef OPENSSL_NO_DEPRECATED_3_0
-OSSL_DEPRECATEDIN_3_0 ERR_STATE *ERR_get_state(void);
-#endif
int ERR_get_next_error_library(void);
#include <stdarg.h>
#include "internal/common.h" /* for HAS_PREFIX */
+#include "internal/err.h" /* for ERR_NUM_ERRORS */
#include <openssl/provider.h>
#include <openssl/err.h>
ERR_load_strings ? 4_0_0 EXIST::FUNCTION:
ERR_load_strings_const ? 4_0_0 EXIST::FUNCTION:
ERR_unload_strings ? 4_0_0 EXIST::FUNCTION:
-ERR_remove_thread_state ? 4_0_0 EXIST::FUNCTION:DEPRECATEDIN_1_1_0
-ERR_remove_state ? 4_0_0 EXIST::FUNCTION:DEPRECATEDIN_1_0_0
-ERR_get_state ? 4_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0
ERR_get_next_error_library ? 4_0_0 EXIST::FUNCTION:
ERR_set_mark ? 4_0_0 EXIST::FUNCTION:
ERR_pop_to_mark ? 4_0_0 EXIST::FUNCTION:
ENGINE_unregister_EC(3)
ENGINE_unregister_pkey_asn1_meths(3)
ENGINE_unregister_pkey_meths(3)
-ERR_get_state(3)
ERR_load_ASN1_strings(3)
ERR_load_ASYNC_strings(3)
ERR_load_BIO_strings(3)