summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2019-07-25 21:57:48 +0200
committerRichard Levitte <levitte@openssl.org>2019-09-12 18:33:15 +0200
commit14e275e8fb736be4ea83441b630515f7be97d06b (patch)
tree8a0438dadaaf5bc625d513345f74ec43bf7e623d /include
parent1f86b8228b49938e0e368f361202570d7eab5806 (diff)
Deprecate the public definition of ERR_STATE
The intention is to make it opaque later on. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9462)
Diffstat (limited to 'include')
-rw-r--r--include/openssl/err.h12
-rw-r--r--include/openssl/ossl_typ.h2
2 files changed, 9 insertions, 5 deletions
diff --git a/include/openssl/err.h b/include/openssl/err.h
index 2b4a71a9a4..fc7326b7c9 100644
--- a/include/openssl/err.h
+++ b/include/openssl/err.h
@@ -38,11 +38,12 @@ extern "C" {
# define ERR_TXT_MALLOCED 0x01
# define ERR_TXT_STRING 0x02
-# define ERR_FLAG_MARK 0x01
-# define ERR_FLAG_CLEAR 0x02
+# if !OPENSSL_API_3 || defined(OSSL_FORCE_ERR_STATE)
+# define ERR_FLAG_MARK 0x01
+# define ERR_FLAG_CLEAR 0x02
-# define ERR_NUM_ERRORS 16
-typedef struct err_state_st {
+# define ERR_NUM_ERRORS 16
+struct err_state_st {
int err_flags[ERR_NUM_ERRORS];
unsigned long err_buffer[ERR_NUM_ERRORS];
char *err_data[ERR_NUM_ERRORS];
@@ -52,7 +53,8 @@ typedef struct err_state_st {
int err_line[ERR_NUM_ERRORS];
const char *err_func[ERR_NUM_ERRORS];
int top, bottom;
-} ERR_STATE;
+};
+# endif
/* library */
# define ERR_LIB_NONE 1
diff --git a/include/openssl/ossl_typ.h b/include/openssl/ossl_typ.h
index 530de2d20c..70d9144ba1 100644
--- a/include/openssl/ossl_typ.h
+++ b/include/openssl/ossl_typ.h
@@ -88,6 +88,8 @@ typedef struct bn_gencb_st BN_GENCB;
typedef struct buf_mem_st BUF_MEM;
+typedef struct err_state_st ERR_STATE;
+
typedef struct evp_cipher_st EVP_CIPHER;
typedef struct evp_cipher_ctx_st EVP_CIPHER_CTX;
typedef struct evp_md_st EVP_MD;