[openssl] master update
Richard Levitte
levitte at openssl.org
Tue Nov 24 16:57:55 UTC 2020
The branch master has been updated
via 273144fa5bdcfd3068601a095f9595b7a2a40ece (commit)
via 14a6c6a4e1eb8127514e6f5319701a1d7c3f5e82 (commit)
via f5a46ed7fe66520c6f1016eb96e96cb241ba229f (commit)
via 9343d3fe3bc5a4a2d6461c640d34a96e950177ad (commit)
from 9524a3089c0d4c3ae553e86f877eef9d6b192b20 (commit)
- Log -----------------------------------------------------------------
commit 273144fa5bdcfd3068601a095f9595b7a2a40ece
Author: Richard Levitte <levitte at openssl.org>
Date: Fri Nov 20 13:41:46 2020 +0100
Add missing ERR_load_KDF_strings(3) to util/missingcrypto111.txt as well.
This partially reverts commit a308acb2c2809cb9ac30e8e987b2bdfb21f096e0.
Reviewed-by: Matt Caswell <matt at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/13390)
commit 14a6c6a4e1eb8127514e6f5319701a1d7c3f5e82
Author: Richard Levitte <levitte at openssl.org>
Date: Thu Nov 12 10:36:47 2020 +0100
ERR: Rebuild all generated error headers and source files
This is the result of 'make errors ERROR_REBUILD=-rebuild'
Reviewed-by: Matt Caswell <matt at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/13390)
commit f5a46ed7fe66520c6f1016eb96e96cb241ba229f
Author: Richard Levitte <levitte at openssl.org>
Date: Thu Nov 12 09:19:24 2020 +0100
Modify the ERR init functions to use the internal ERR string loaders
This deprecates all the ERR_load_ functions, and moves their definition to
separate C source files that can easily be removed when those functions are
finally removed.
This also reduces include/openssl/kdferr.h to include cryptoerr_legacy.h,
moves the declaration of ERR_load_ERR_strings() from include/openssl/err.h
to include/openssl/cryptoerr_legacy.h, and finally removes the declaration
of ERR_load_DSO_strings(), which was entirely internal anyway.
Reviewed-by: Matt Caswell <matt at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/13390)
commit 9343d3fe3bc5a4a2d6461c640d34a96e950177ad
Author: Richard Levitte <levitte at openssl.org>
Date: Thu Nov 12 09:12:41 2020 +0100
ERR: Modify util/mkerr.pl to produce internal err string loaders
This also modifies the .ec L statement to take a third file, which is
the internal header file to declare internal things. This is only
useful for our internal declarations and will not affect engines.
Fixes #10527
Reviewed-by: Matt Caswell <matt at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/13390)
-----------------------------------------------------------------------
Summary of changes:
CHANGES.md | 17 +
Configurations/unix-Makefile.tmpl | 3 +-
NEWS.md | 1 +
crypto/asn1/asn1_err.c | 3 +-
crypto/async/async_err.c | 5 +-
crypto/bio/bio_err.c | 3 +-
crypto/bn/bn_err.c | 5 +-
crypto/buffer/buf_err.c | 5 +-
crypto/cmp/cmp_err.c | 16 +-
crypto/cms/cms_err.c | 16 +-
crypto/comp/comp_err.c | 18 +-
crypto/conf/conf_err.c | 3 +-
crypto/cpt_err.c | 3 +-
crypto/crmf/crmf_err.c | 16 +-
crypto/ct/ct_err.c | 18 +-
crypto/dh/dh_err.c | 16 +-
crypto/dsa/dsa_err.c | 16 +-
crypto/dso/dso_err.c | 4 +-
crypto/ec/ec_err.c | 16 +-
crypto/encode_decode/decoder_err.c | 5 +-
crypto/encode_decode/encoder_err.c | 3 +-
crypto/engine/eng_err.c | 18 +-
crypto/err/build.info | 2 +-
crypto/err/err.c | 6 +-
crypto/err/err_all.c | 140 +++----
crypto/err/err_all_legacy.c | 101 ++++++
crypto/err/openssl.ec | 92 +++--
crypto/err/openssl.txt | 28 --
crypto/ess/ess_err.c | 3 +-
crypto/evp/evp_err.c | 3 +-
crypto/http/http_err.c | 3 +-
crypto/objects/obj_err.c | 3 +-
crypto/ocsp/ocsp_err.c | 16 +-
crypto/pem/pem_err.c | 3 +-
crypto/pkcs12/pk12err.c | 3 +-
crypto/pkcs7/pkcs7err.c | 5 +-
crypto/property/property_err.c | 4 +-
crypto/rand/rand_err.c | 3 +-
crypto/rsa/rsa_err.c | 3 +-
crypto/sm2/sm2_err.c | 15 +-
crypto/store/store_err.c | 3 +-
crypto/ts/ts_err.c | 18 +-
crypto/ui/ui_err.c | 5 +-
crypto/x509/v3err.c | 7 +-
crypto/x509/x509_err.c | 3 +-
engines/e_afalg.txt | 2 +-
engines/e_afalg_err.c | 2 +-
engines/e_afalg_err.h | 7 +-
engines/e_capi.txt | 2 +-
engines/e_capi_err.c | 2 +-
engines/e_capi_err.h | 7 +-
engines/e_dasync.txt | 2 +-
engines/e_dasync_err.c | 2 +-
engines/e_dasync_err.h | 7 +-
engines/e_loader_attic_err.h | 4 +-
engines/e_ossltest.txt | 2 +-
engines/e_ossltest_err.c | 2 +-
engines/e_ossltest_err.h | 7 +-
include/{openssl/decodererr.h => crypto/asn1err.h} | 24 +-
.../{openssl/decodererr.h => crypto/asyncerr.h} | 24 +-
include/{openssl/decodererr.h => crypto/bioerr.h} | 24 +-
include/{openssl/decodererr.h => crypto/bnerr.h} | 24 +-
.../{openssl/decodererr.h => crypto/buffererr.h} | 24 +-
include/{openssl/decodererr.h => crypto/cmperr.h} | 25 +-
include/{openssl/decodererr.h => crypto/cmserr.h} | 25 +-
include/{openssl/decodererr.h => crypto/comperr.h} | 25 +-
include/{openssl/decodererr.h => crypto/conferr.h} | 24 +-
include/{openssl/decodererr.h => crypto/crmferr.h} | 25 +-
.../{openssl/decodererr.h => crypto/cryptoerr.h} | 24 +-
include/{openssl/decodererr.h => crypto/cterr.h} | 25 +-
include/{openssl => crypto}/decodererr.h | 24 +-
include/{openssl/decodererr.h => crypto/dherr.h} | 25 +-
include/{openssl/decodererr.h => crypto/dsaerr.h} | 25 +-
include/{openssl/decodererr.h => crypto/ecerr.h} | 25 +-
.../{openssl/decodererr.h => crypto/encodererr.h} | 24 +-
.../{openssl/decodererr.h => crypto/engineerr.h} | 25 +-
include/crypto/err.h | 1 +
include/{openssl/decodererr.h => crypto/esserr.h} | 24 +-
include/{openssl/decodererr.h => crypto/evperr.h} | 24 +-
include/{openssl/decodererr.h => crypto/httperr.h} | 24 +-
.../{openssl/decodererr.h => crypto/objectserr.h} | 24 +-
include/{openssl/decodererr.h => crypto/ocsperr.h} | 25 +-
include/{openssl/decodererr.h => crypto/pemerr.h} | 24 +-
.../{openssl/decodererr.h => crypto/pkcs12err.h} | 24 +-
.../{openssl/decodererr.h => crypto/pkcs7err.h} | 24 +-
include/{openssl/decodererr.h => crypto/randerr.h} | 24 +-
include/{openssl/decodererr.h => crypto/rsaerr.h} | 24 +-
include/crypto/sm2err.h | 25 +-
.../{openssl/decodererr.h => crypto/storeerr.h} | 24 +-
include/{openssl/decodererr.h => crypto/tserr.h} | 25 +-
include/{openssl/decodererr.h => crypto/uierr.h} | 24 +-
include/{openssl/decodererr.h => crypto/x509err.h} | 24 +-
.../{openssl/decodererr.h => crypto/x509v3err.h} | 24 +-
include/internal/dso.h | 2 -
include/internal/dsoerr.h | 13 +-
include/internal/propertyerr.h | 13 +-
include/openssl/asn1err.h | 5 +-
include/openssl/asyncerr.h | 5 +-
include/openssl/bioerr.h | 5 +-
include/openssl/bnerr.h | 6 +-
include/openssl/buffererr.h | 5 +-
include/openssl/cmperr.h | 11 +-
include/openssl/cmserr.h | 11 +-
include/openssl/comperr.h | 11 +-
include/openssl/conferr.h | 5 +-
include/openssl/crmferr.h | 13 +-
include/openssl/cryptoerr.h | 5 +-
include/openssl/cryptoerr_legacy.h | 81 +++++
include/openssl/cterr.h | 11 +-
include/openssl/decodererr.h | 11 +-
include/openssl/dherr.h | 11 +-
include/openssl/dsaerr.h | 11 +-
include/openssl/ecerr.h | 11 +-
include/openssl/encodererr.h | 9 +-
include/openssl/engineerr.h | 11 +-
include/openssl/err.h.in | 2 +-
include/openssl/esserr.h | 5 +-
include/openssl/evperr.h | 7 +-
include/openssl/httperr.h | 5 +-
include/openssl/kdferr.h | 107 +-----
include/openssl/objectserr.h | 9 +-
include/openssl/ocsperr.h | 11 +-
include/openssl/pemerr.h | 9 +-
include/openssl/pkcs12err.h | 5 +-
include/openssl/pkcs7err.h | 5 +-
include/openssl/randerr.h | 12 +-
include/openssl/rsaerr.h | 5 +-
include/openssl/sslerr.h | 5 +-
include/openssl/sslerr_legacy.h | 36 ++
include/openssl/storeerr.h | 9 +-
include/openssl/tserr.h | 11 +-
include/openssl/uierr.h | 5 +-
include/openssl/x509err.h | 5 +-
include/openssl/x509v3err.h | 7 +-
providers/common/include/prov/providercommonerr.h | 16 +-
providers/common/provider_err.c | 4 +-
ssl/build.info | 2 +-
ssl/ssl_err.c | 3 +-
ssl/ssl_err_legacy.c | 21 ++
ssl/ssl_init.c | 5 +-
include/openssl/decodererr.h => ssl/sslerr.h | 24 +-
util/libcrypto.num | 66 ++--
util/libssl.num | 2 +-
util/missingcrypto.txt | 5 -
util/missingcrypto111.txt | 1 +
util/mkerr.pl | 404 +++++++++++++++------
146 files changed, 1333 insertions(+), 1302 deletions(-)
create mode 100644 crypto/err/err_all_legacy.c
copy include/{openssl/decodererr.h => crypto/asn1err.h} (55%)
copy include/{openssl/decodererr.h => crypto/asyncerr.h} (55%)
copy include/{openssl/decodererr.h => crypto/bioerr.h} (55%)
copy include/{openssl/decodererr.h => crypto/bnerr.h} (55%)
copy include/{openssl/decodererr.h => crypto/buffererr.h} (55%)
copy include/{openssl/decodererr.h => crypto/cmperr.h} (55%)
copy include/{openssl/decodererr.h => crypto/cmserr.h} (55%)
copy include/{openssl/decodererr.h => crypto/comperr.h} (55%)
copy include/{openssl/decodererr.h => crypto/conferr.h} (55%)
copy include/{openssl/decodererr.h => crypto/crmferr.h} (55%)
copy include/{openssl/decodererr.h => crypto/cryptoerr.h} (55%)
copy include/{openssl/decodererr.h => crypto/cterr.h} (55%)
copy include/{openssl => crypto}/decodererr.h (55%)
copy include/{openssl/decodererr.h => crypto/dherr.h} (55%)
copy include/{openssl/decodererr.h => crypto/dsaerr.h} (55%)
copy include/{openssl/decodererr.h => crypto/ecerr.h} (55%)
copy include/{openssl/decodererr.h => crypto/encodererr.h} (55%)
copy include/{openssl/decodererr.h => crypto/engineerr.h} (55%)
copy include/{openssl/decodererr.h => crypto/esserr.h} (55%)
copy include/{openssl/decodererr.h => crypto/evperr.h} (55%)
copy include/{openssl/decodererr.h => crypto/httperr.h} (55%)
copy include/{openssl/decodererr.h => crypto/objectserr.h} (55%)
copy include/{openssl/decodererr.h => crypto/ocsperr.h} (55%)
copy include/{openssl/decodererr.h => crypto/pemerr.h} (55%)
copy include/{openssl/decodererr.h => crypto/pkcs12err.h} (55%)
copy include/{openssl/decodererr.h => crypto/pkcs7err.h} (55%)
copy include/{openssl/decodererr.h => crypto/randerr.h} (55%)
copy include/{openssl/decodererr.h => crypto/rsaerr.h} (55%)
copy include/{openssl/decodererr.h => crypto/storeerr.h} (55%)
copy include/{openssl/decodererr.h => crypto/tserr.h} (55%)
copy include/{openssl/decodererr.h => crypto/uierr.h} (55%)
copy include/{openssl/decodererr.h => crypto/x509err.h} (55%)
copy include/{openssl/decodererr.h => crypto/x509v3err.h} (55%)
create mode 100644 include/openssl/cryptoerr_legacy.h
create mode 100644 include/openssl/sslerr_legacy.h
create mode 100644 ssl/ssl_err_legacy.c
copy include/openssl/decodererr.h => ssl/sslerr.h (55%)
diff --git a/CHANGES.md b/CHANGES.md
index ca4e096ed2..48957676f6 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -23,6 +23,23 @@ OpenSSL 3.0
### Changes between 1.1.1 and 3.0 [xx XXX xxxx]
+ * Deprecated all the libcrypto and libssl error string loading
+ functions: ERR_load_ASN1_strings(), ERR_load_ASYNC_strings(),
+ ERR_load_BIO_strings(), ERR_load_BN_strings(), ERR_load_BUF_strings(),
+ ERR_load_CMS_strings(), ERR_load_COMP_strings(), ERR_load_CONF_strings(),
+ ERR_load_CRYPTO_strings(), ERR_load_CT_strings(), ERR_load_DH_strings(),
+ ERR_load_DSA_strings(), ERR_load_EC_strings(), ERR_load_ENGINE_strings(),
+ ERR_load_ERR_strings(), ERR_load_EVP_strings(), ERR_load_KDF_strings(),
+ ERR_load_OBJ_strings(), ERR_load_OCSP_strings(), ERR_load_PEM_strings(),
+ ERR_load_PKCS12_strings(), ERR_load_PKCS7_strings(), ERR_load_RAND_strings(),
+ ERR_load_RSA_strings(), ERR_load_OSSL_STORE_strings(), ERR_load_TS_strings(),
+ ERR_load_UI_strings(), ERR_load_X509_strings(), ERR_load_X509V3_strings().
+
+ Calling these functions is not necessary since OpenSSL 1.1.0, as OpenSSL
+ now loads error strings automatically.
+
+ *Richard Levitte*
+
* The functions SSL_CTX_set_tmp_dh_callback and SSL_set_tmp_dh_callback, as
well as the macros SSL_CTX_set_tmp_dh() and SSL_set_tmp_dh() have been
deprecated. These are used to set the Diffie-Hellman (DH) parameters that
diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl
index 4fab096121..342e46d24d 100644
--- a/Configurations/unix-Makefile.tmpl
+++ b/Configurations/unix-Makefile.tmpl
@@ -1083,7 +1083,8 @@ errors:
include/openssl/sslerr.h
include/openssl/tls1.h
include/openssl/dtls1.h
- include/openssl/srtp.h );
+ include/openssl/srtp.h
+ include/openssl/sslerr_legacy.h );
my @cryptoheaders_tmpl =
qw( include/internal/dso.h
include/internal/o_dir.h
diff --git a/NEWS.md b/NEWS.md
index 2ba338c745..054a55324f 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -20,6 +20,7 @@ OpenSSL 3.0
### Major changes between OpenSSL 1.1.1 and OpenSSL 3.0 [under development]
+ * Deprecated the `ERR_load_` functions.
* Remove the `RAND_DRBG` API.
* Deprecated the `ENGINE` API.
* Added `OSSL_LIB_CTX`, a libcrypto library context.
diff --git a/crypto/asn1/asn1_err.c b/crypto/asn1/asn1_err.c
index 814cd91373..d202094e27 100644
--- a/crypto/asn1/asn1_err.c
+++ b/crypto/asn1/asn1_err.c
@@ -10,6 +10,7 @@
#include <openssl/err.h>
#include <openssl/asn1err.h>
+#include "crypto/asn1err.h"
#ifndef OPENSSL_NO_ERR
@@ -199,7 +200,7 @@ static const ERR_STRING_DATA ASN1_str_reasons[] = {
#endif
-int ERR_load_ASN1_strings(void)
+int err_load_ASN1_strings_int(void)
{
#ifndef OPENSSL_NO_ERR
if (ERR_reason_error_string(ASN1_str_reasons[0].error) == NULL)
diff --git a/crypto/async/async_err.c b/crypto/async/async_err.c
index 7a06f75265..285a0f2290 100644
--- a/crypto/async/async_err.c
+++ b/crypto/async/async_err.c
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1995-2020 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
@@ -10,6 +10,7 @@
#include <openssl/err.h>
#include <openssl/asyncerr.h>
+#include "crypto/asyncerr.h"
#ifndef OPENSSL_NO_ERR
@@ -26,7 +27,7 @@ static const ERR_STRING_DATA ASYNC_str_reasons[] = {
#endif
-int ERR_load_ASYNC_strings(void)
+int err_load_ASYNC_strings_int(void)
{
#ifndef OPENSSL_NO_ERR
if (ERR_reason_error_string(ASYNC_str_reasons[0].error) == NULL)
diff --git a/crypto/bio/bio_err.c b/crypto/bio/bio_err.c
index afeb67985e..08bf8dc98a 100644
--- a/crypto/bio/bio_err.c
+++ b/crypto/bio/bio_err.c
@@ -10,6 +10,7 @@
#include <openssl/err.h>
#include <openssl/bioerr.h>
+#include "crypto/bioerr.h"
#ifndef OPENSSL_NO_ERR
@@ -76,7 +77,7 @@ static const ERR_STRING_DATA BIO_str_reasons[] = {
#endif
-int ERR_load_BIO_strings(void)
+int err_load_BIO_strings_int(void)
{
#ifndef OPENSSL_NO_ERR
if (ERR_reason_error_string(BIO_str_reasons[0].error) == NULL)
diff --git a/crypto/bn/bn_err.c b/crypto/bn/bn_err.c
index ce0ea3865d..e4ac23e1b6 100644
--- a/crypto/bn/bn_err.c
+++ b/crypto/bn/bn_err.c
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1995-2020 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
@@ -10,6 +10,7 @@
#include <openssl/err.h>
#include <openssl/bnerr.h>
+#include "crypto/bnerr.h"
#ifndef OPENSSL_NO_ERR
@@ -44,7 +45,7 @@ static const ERR_STRING_DATA BN_str_reasons[] = {
#endif
-int ERR_load_BN_strings(void)
+int err_load_BN_strings_int(void)
{
#ifndef OPENSSL_NO_ERR
if (ERR_reason_error_string(BN_str_reasons[0].error) == NULL)
diff --git a/crypto/buffer/buf_err.c b/crypto/buffer/buf_err.c
index 702707bb88..7eee54f321 100644
--- a/crypto/buffer/buf_err.c
+++ b/crypto/buffer/buf_err.c
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1995-2020 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
@@ -10,6 +10,7 @@
#include <openssl/err.h>
#include <openssl/buffererr.h>
+#include "crypto/buffererr.h"
#ifndef OPENSSL_NO_ERR
@@ -19,7 +20,7 @@ static const ERR_STRING_DATA BUF_str_reasons[] = {
#endif
-int ERR_load_BUF_strings(void)
+int err_load_BUF_strings_int(void)
{
#ifndef OPENSSL_NO_ERR
if (ERR_reason_error_string(BUF_str_reasons[0].error) == NULL)
diff --git a/crypto/cmp/cmp_err.c b/crypto/cmp/cmp_err.c
index 260e8386d5..93aed38f9a 100644
--- a/crypto/cmp/cmp_err.c
+++ b/crypto/cmp/cmp_err.c
@@ -10,8 +10,11 @@
#include <openssl/err.h>
#include <openssl/cmperr.h>
+#include "crypto/cmperr.h"
-#ifndef OPENSSL_NO_ERR
+#ifndef OPENSSL_NO_CMP
+
+# ifndef OPENSSL_NO_ERR
static const ERR_STRING_DATA CMP_str_reasons[] = {
{ERR_PACK(ERR_LIB_CMP, 0, CMP_R_ALGORITHM_NOT_SUPPORTED),
@@ -155,13 +158,16 @@ static const ERR_STRING_DATA CMP_str_reasons[] = {
{0, NULL}
};
-#endif
+# endif
-int ERR_load_CMP_strings(void)
+int err_load_CMP_strings_int(void)
{
-#ifndef OPENSSL_NO_ERR
+# ifndef OPENSSL_NO_ERR
if (ERR_reason_error_string(CMP_str_reasons[0].error) == NULL)
ERR_load_strings_const(CMP_str_reasons);
-#endif
+# endif
return 1;
}
+#else
+NON_EMPTY_TRANSLATION_UNIT
+#endif
diff --git a/crypto/cms/cms_err.c b/crypto/cms/cms_err.c
index fdb2b7f5c8..173e1596f6 100644
--- a/crypto/cms/cms_err.c
+++ b/crypto/cms/cms_err.c
@@ -10,8 +10,11 @@
#include <openssl/err.h>
#include <openssl/cmserr.h>
+#include "crypto/cmserr.h"
-#ifndef OPENSSL_NO_ERR
+#ifndef OPENSSL_NO_CMS
+
+# ifndef OPENSSL_NO_ERR
static const ERR_STRING_DATA CMS_str_reasons[] = {
{ERR_PACK(ERR_LIB_CMS, 0, CMS_R_ADD_SIGNER_ERROR), "add signer error"},
@@ -160,13 +163,16 @@ static const ERR_STRING_DATA CMS_str_reasons[] = {
{0, NULL}
};
-#endif
+# endif
-int ERR_load_CMS_strings(void)
+int err_load_CMS_strings_int(void)
{
-#ifndef OPENSSL_NO_ERR
+# ifndef OPENSSL_NO_ERR
if (ERR_reason_error_string(CMS_str_reasons[0].error) == NULL)
ERR_load_strings_const(CMS_str_reasons);
-#endif
+# endif
return 1;
}
+#else
+NON_EMPTY_TRANSLATION_UNIT
+#endif
diff --git a/crypto/comp/comp_err.c b/crypto/comp/comp_err.c
index d4ae0406a3..972e75cdaf 100644
--- a/crypto/comp/comp_err.c
+++ b/crypto/comp/comp_err.c
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1995-2020 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
@@ -10,8 +10,11 @@
#include <openssl/err.h>
#include <openssl/comperr.h>
+#include "crypto/comperr.h"
-#ifndef OPENSSL_NO_ERR
+#ifndef OPENSSL_NO_COMP
+
+# ifndef OPENSSL_NO_ERR
static const ERR_STRING_DATA COMP_str_reasons[] = {
{ERR_PACK(ERR_LIB_COMP, 0, COMP_R_ZLIB_DEFLATE_ERROR),
@@ -23,13 +26,16 @@ static const ERR_STRING_DATA COMP_str_reasons[] = {
{0, NULL}
};
-#endif
+# endif
-int ERR_load_COMP_strings(void)
+int err_load_COMP_strings_int(void)
{
-#ifndef OPENSSL_NO_ERR
+# ifndef OPENSSL_NO_ERR
if (ERR_reason_error_string(COMP_str_reasons[0].error) == NULL)
ERR_load_strings_const(COMP_str_reasons);
-#endif
+# endif
return 1;
}
+#else
+NON_EMPTY_TRANSLATION_UNIT
+#endif
diff --git a/crypto/conf/conf_err.c b/crypto/conf/conf_err.c
index 9c3c2d6878..417ae58efb 100644
--- a/crypto/conf/conf_err.c
+++ b/crypto/conf/conf_err.c
@@ -10,6 +10,7 @@
#include <openssl/err.h>
#include <openssl/conferr.h>
+#include "crypto/conferr.h"
#ifndef OPENSSL_NO_ERR
@@ -60,7 +61,7 @@ static const ERR_STRING_DATA CONF_str_reasons[] = {
#endif
-int ERR_load_CONF_strings(void)
+int err_load_CONF_strings_int(void)
{
#ifndef OPENSSL_NO_ERR
if (ERR_reason_error_string(CONF_str_reasons[0].error) == NULL)
diff --git a/crypto/cpt_err.c b/crypto/cpt_err.c
index 04b6cdb27f..7aa5416720 100644
--- a/crypto/cpt_err.c
+++ b/crypto/cpt_err.c
@@ -10,6 +10,7 @@
#include <openssl/err.h>
#include <openssl/cryptoerr.h>
+#include "crypto/cryptoerr.h"
#ifndef OPENSSL_NO_ERR
@@ -57,7 +58,7 @@ static const ERR_STRING_DATA CRYPTO_str_reasons[] = {
#endif
-int ERR_load_CRYPTO_strings(void)
+int err_load_CRYPTO_strings_int(void)
{
#ifndef OPENSSL_NO_ERR
if (ERR_reason_error_string(CRYPTO_str_reasons[0].error) == NULL)
diff --git a/crypto/crmf/crmf_err.c b/crypto/crmf/crmf_err.c
index 61a1488838..bc7e8558f9 100644
--- a/crypto/crmf/crmf_err.c
+++ b/crypto/crmf/crmf_err.c
@@ -10,8 +10,11 @@
#include <openssl/err.h>
#include <openssl/crmferr.h>
+#include "crypto/crmferr.h"
-#ifndef OPENSSL_NO_ERR
+#ifndef OPENSSL_NO_CRMF
+
+# ifndef OPENSSL_NO_ERR
static const ERR_STRING_DATA CRMF_str_reasons[] = {
{ERR_PACK(ERR_LIB_CRMF, 0, CRMF_R_BAD_PBM_ITERATIONCOUNT),
@@ -56,13 +59,16 @@ static const ERR_STRING_DATA CRMF_str_reasons[] = {
{0, NULL}
};
-#endif
+# endif
-int ERR_load_CRMF_strings(void)
+int err_load_CRMF_strings_int(void)
{
-#ifndef OPENSSL_NO_ERR
+# ifndef OPENSSL_NO_ERR
if (ERR_reason_error_string(CRMF_str_reasons[0].error) == NULL)
ERR_load_strings_const(CRMF_str_reasons);
-#endif
+# endif
return 1;
}
+#else
+NON_EMPTY_TRANSLATION_UNIT
+#endif
diff --git a/crypto/ct/ct_err.c b/crypto/ct/ct_err.c
index f9b9b57b22..d067b713c1 100644
--- a/crypto/ct/ct_err.c
+++ b/crypto/ct/ct_err.c
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1995-2020 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
@@ -10,8 +10,11 @@
#include <openssl/err.h>
#include <openssl/cterr.h>
+#include "crypto/cterr.h"
-#ifndef OPENSSL_NO_ERR
+#ifndef OPENSSL_NO_CT
+
+# ifndef OPENSSL_NO_ERR
static const ERR_STRING_DATA CT_str_reasons[] = {
{ERR_PACK(ERR_LIB_CT, 0, CT_R_BASE64_DECODE_ERROR), "base64 decode error"},
@@ -43,13 +46,16 @@ static const ERR_STRING_DATA CT_str_reasons[] = {
{0, NULL}
};
-#endif
+# endif
-int ERR_load_CT_strings(void)
+int err_load_CT_strings_int(void)
{
-#ifndef OPENSSL_NO_ERR
+# ifndef OPENSSL_NO_ERR
if (ERR_reason_error_string(CT_str_reasons[0].error) == NULL)
ERR_load_strings_const(CT_str_reasons);
-#endif
+# endif
return 1;
}
+#else
+NON_EMPTY_TRANSLATION_UNIT
+#endif
diff --git a/crypto/dh/dh_err.c b/crypto/dh/dh_err.c
index a8243ec987..00a3110964 100644
--- a/crypto/dh/dh_err.c
+++ b/crypto/dh/dh_err.c
@@ -10,8 +10,11 @@
#include <openssl/err.h>
#include <openssl/dherr.h>
+#include "crypto/dherr.h"
-#ifndef OPENSSL_NO_ERR
+#ifndef OPENSSL_NO_DH
+
+# ifndef OPENSSL_NO_ERR
static const ERR_STRING_DATA DH_str_reasons[] = {
{ERR_PACK(ERR_LIB_DH, 0, DH_R_BAD_FFC_PARAMETERS), "bad ffc parameters"},
@@ -56,13 +59,16 @@ static const ERR_STRING_DATA DH_str_reasons[] = {
{0, NULL}
};
-#endif
+# endif
-int ERR_load_DH_strings(void)
+int err_load_DH_strings_int(void)
{
-#ifndef OPENSSL_NO_ERR
+# ifndef OPENSSL_NO_ERR
if (ERR_reason_error_string(DH_str_reasons[0].error) == NULL)
ERR_load_strings_const(DH_str_reasons);
-#endif
+# endif
return 1;
}
+#else
+NON_EMPTY_TRANSLATION_UNIT
+#endif
diff --git a/crypto/dsa/dsa_err.c b/crypto/dsa/dsa_err.c
index 6bf7accacf..99fc0e80fb 100644
--- a/crypto/dsa/dsa_err.c
+++ b/crypto/dsa/dsa_err.c
@@ -10,8 +10,11 @@
#include <openssl/err.h>
#include <openssl/dsaerr.h>
+#include "crypto/dsaerr.h"
-#ifndef OPENSSL_NO_ERR
+#ifndef OPENSSL_NO_DSA
+
+# ifndef OPENSSL_NO_ERR
static const ERR_STRING_DATA DSA_str_reasons[] = {
{ERR_PACK(ERR_LIB_DSA, 0, DSA_R_BAD_FFC_PARAMETERS), "bad ffc parameters"},
@@ -35,13 +38,16 @@ static const ERR_STRING_DATA DSA_str_reasons[] = {
{0, NULL}
};
-#endif
+# endif
-int ERR_load_DSA_strings(void)
+int err_load_DSA_strings_int(void)
{
-#ifndef OPENSSL_NO_ERR
+# ifndef OPENSSL_NO_ERR
if (ERR_reason_error_string(DSA_str_reasons[0].error) == NULL)
ERR_load_strings_const(DSA_str_reasons);
-#endif
+# endif
return 1;
}
+#else
+NON_EMPTY_TRANSLATION_UNIT
+#endif
diff --git a/crypto/dso/dso_err.c b/crypto/dso/dso_err.c
index 8a4d9a812a..c018a16464 100644
--- a/crypto/dso/dso_err.c
+++ b/crypto/dso/dso_err.c
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1995-2020 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
@@ -46,7 +46,7 @@ static const ERR_STRING_DATA DSO_str_reasons[] = {
#endif
-int ERR_load_DSO_strings(void)
+int err_load_DSO_strings_int(void)
{
#ifndef OPENSSL_NO_ERR
if (ERR_reason_error_string(DSO_str_reasons[0].error) == NULL)
diff --git a/crypto/ec/ec_err.c b/crypto/ec/ec_err.c
index 35cf7d158f..108df5695b 100644
--- a/crypto/ec/ec_err.c
+++ b/crypto/ec/ec_err.c
@@ -10,8 +10,11 @@
#include <openssl/err.h>
#include <openssl/ecerr.h>
+#include "crypto/ecerr.h"
-#ifndef OPENSSL_NO_ERR
+#ifndef OPENSSL_NO_EC
+
+# ifndef OPENSSL_NO_ERR
static const ERR_STRING_DATA EC_str_reasons[] = {
{ERR_PACK(ERR_LIB_EC, 0, EC_R_ASN1_ERROR), "asn1 error"},
@@ -114,13 +117,16 @@ static const ERR_STRING_DATA EC_str_reasons[] = {
{0, NULL}
};
-#endif
+# endif
-int ERR_load_EC_strings(void)
+int err_load_EC_strings_int(void)
{
-#ifndef OPENSSL_NO_ERR
+# ifndef OPENSSL_NO_ERR
if (ERR_reason_error_string(EC_str_reasons[0].error) == NULL)
ERR_load_strings_const(EC_str_reasons);
-#endif
+# endif
return 1;
}
+#else
+NON_EMPTY_TRANSLATION_UNIT
+#endif
diff --git a/crypto/encode_decode/decoder_err.c b/crypto/encode_decode/decoder_err.c
index 984f7abeb9..cf68a4c7c5 100644
--- a/crypto/encode_decode/decoder_err.c
+++ b/crypto/encode_decode/decoder_err.c
@@ -10,18 +10,19 @@
#include <openssl/err.h>
#include <openssl/decodererr.h>
+#include "crypto/decodererr.h"
#ifndef OPENSSL_NO_ERR
static const ERR_STRING_DATA OSSL_DECODER_str_reasons[] = {
{ERR_PACK(ERR_LIB_OSSL_DECODER, 0, OSSL_DECODER_R_MISSING_GET_PARAMS),
- "missing get params"},
+ "missing get params"},
{0, NULL}
};
#endif
-int ERR_load_OSSL_DECODER_strings(void)
+int err_load_OSSL_DECODER_strings_int(void)
{
#ifndef OPENSSL_NO_ERR
if (ERR_reason_error_string(OSSL_DECODER_str_reasons[0].error) == NULL)
diff --git a/crypto/encode_decode/encoder_err.c b/crypto/encode_decode/encoder_err.c
index 2c95a2a20e..0b5028769d 100644
--- a/crypto/encode_decode/encoder_err.c
+++ b/crypto/encode_decode/encoder_err.c
@@ -10,6 +10,7 @@
#include <openssl/err.h>
#include <openssl/encodererr.h>
+#include "crypto/encodererr.h"
#ifndef OPENSSL_NO_ERR
@@ -25,7 +26,7 @@ static const ERR_STRING_DATA OSSL_ENCODER_str_reasons[] = {
#endif
-int ERR_load_OSSL_ENCODER_strings(void)
+int err_load_OSSL_ENCODER_strings_int(void)
{
#ifndef OPENSSL_NO_ERR
if (ERR_reason_error_string(OSSL_ENCODER_str_reasons[0].error) == NULL)
diff --git a/crypto/engine/eng_err.c b/crypto/engine/eng_err.c
index c602e0ffe7..1cea06be08 100644
--- a/crypto/engine/eng_err.c
+++ b/crypto/engine/eng_err.c
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1995-2020 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
@@ -10,8 +10,11 @@
#include <openssl/err.h>
#include <openssl/engineerr.h>
+#include "crypto/engineerr.h"
-#ifndef OPENSSL_NO_ERR
+#ifndef OPENSSL_NO_ENGINE
+
+# ifndef OPENSSL_NO_ERR
static const ERR_STRING_DATA ENGINE_str_reasons[] = {
{ERR_PACK(ERR_LIB_ENGINE, 0, ENGINE_R_ALREADY_LOADED), "already loaded"},
@@ -76,13 +79,16 @@ static const ERR_STRING_DATA ENGINE_str_reasons[] = {
{0, NULL}
};
-#endif
+# endif
-int ERR_load_ENGINE_strings(void)
+int err_load_ENGINE_strings_int(void)
{
-#ifndef OPENSSL_NO_ERR
+# ifndef OPENSSL_NO_ERR
if (ERR_reason_error_string(ENGINE_str_reasons[0].error) == NULL)
ERR_load_strings_const(ENGINE_str_reasons);
-#endif
+# endif
return 1;
}
+#else
+NON_EMPTY_TRANSLATION_UNIT
+#endif
diff --git a/crypto/err/build.info b/crypto/err/build.info
index c010ea4cb9..98f8801e34 100644
--- a/crypto/err/build.info
+++ b/crypto/err/build.info
@@ -1,3 +1,3 @@
LIBS=../../libcrypto
SOURCE[../../libcrypto]=\
- err_blocks.c err.c err_all.c err_prn.c
+ err_blocks.c err.c err_all.c err_all_legacy.c err_prn.c
diff --git a/crypto/err/err.c b/crypto/err/err.c
index a66ea63adf..8500fe7988 100644
--- a/crypto/err/err.c
+++ b/crypto/err/err.c
@@ -237,7 +237,7 @@ static int err_load_strings(const ERR_STRING_DATA *str)
return 1;
}
-int ERR_load_ERR_strings(void)
+int err_load_ERR_strings_int(void)
{
#ifndef OPENSSL_NO_ERR
if (!RUN_ONCE(&err_string_init, do_err_strings_init))
@@ -251,7 +251,7 @@ int ERR_load_ERR_strings(void)
int ERR_load_strings(int lib, ERR_STRING_DATA *str)
{
- if (ERR_load_ERR_strings() == 0)
+ if (err_load_ERR_strings_int() == 0)
return 0;
err_patch(lib, str);
@@ -261,7 +261,7 @@ int ERR_load_strings(int lib, ERR_STRING_DATA *str)
int ERR_load_strings_const(const ERR_STRING_DATA *str)
{
- if (ERR_load_ERR_strings() == 0)
+ if (err_load_ERR_strings_int() == 0)
return 0;
err_load_strings(str);
return 1;
diff --git a/crypto/err/err_all.c b/crypto/err/err_all.c
index f16cb6926f..e90928edef 100644
--- a/crypto/err/err_all.c
+++ b/crypto/err/err_all.c
@@ -8,105 +8,107 @@
*/
#include <stdio.h>
-#include "crypto/err.h"
-#include <openssl/asn1err.h>
-#include <openssl/bnerr.h>
-#include <openssl/ecerr.h>
-#include <openssl/buffererr.h>
-#include <openssl/bioerr.h>
-#include <openssl/comperr.h>
-#include <openssl/rsaerr.h>
-#include <openssl/dherr.h>
-#include <openssl/dsaerr.h>
-#include <openssl/evperr.h>
-#include <openssl/objectserr.h>
-#include <openssl/pemerr.h>
-#include <openssl/pkcs7err.h>
-#include <openssl/x509err.h>
-#include <openssl/x509v3err.h>
-#include <openssl/conferr.h>
-#include <openssl/pkcs12err.h>
-#include <openssl/randerr.h>
-#include "internal/dso.h"
-#include <openssl/engineerr.h>
-#include <openssl/uierr.h>
-#include <openssl/httperr.h>
-#include <openssl/ocsperr.h>
#include <openssl/err.h>
-#include <openssl/tserr.h>
-#include <openssl/cmserr.h>
-#include <openssl/crmferr.h>
-#include <openssl/cmperr.h>
-#include <openssl/cterr.h>
-#include <openssl/asyncerr.h>
-#include <openssl/storeerr.h>
-#include <openssl/esserr.h>
+#include "crypto/err.h"
+#include "crypto/cryptoerr.h"
+#include "crypto/asn1err.h"
+#include "crypto/bnerr.h"
+#include "crypto/ecerr.h"
+#include "crypto/buffererr.h"
+#include "crypto/bioerr.h"
+#include "crypto/comperr.h"
+#include "crypto/rsaerr.h"
+#include "crypto/dherr.h"
+#include "crypto/dsaerr.h"
+#include "crypto/evperr.h"
+#include "crypto/objectserr.h"
+#include "crypto/pemerr.h"
+#include "crypto/pkcs7err.h"
+#include "crypto/x509err.h"
+#include "crypto/x509v3err.h"
+#include "crypto/conferr.h"
+#include "crypto/pkcs12err.h"
+#include "crypto/randerr.h"
+#include "internal/dsoerr.h"
+#include "crypto/engineerr.h"
+#include "crypto/uierr.h"
+#include "crypto/httperr.h"
+#include "crypto/ocsperr.h"
+#include "crypto/tserr.h"
+#include "crypto/cmserr.h"
+#include "crypto/crmferr.h"
+#include "crypto/cmperr.h"
+#include "crypto/cterr.h"
+#include "crypto/asyncerr.h"
+#include "crypto/storeerr.h"
+#include "crypto/esserr.h"
#include "internal/propertyerr.h"
#include "prov/providercommonerr.h"
int err_load_crypto_strings_int(void)
{
- if (
+ if (0
#ifndef OPENSSL_NO_ERR
- ERR_load_ERR_strings() == 0 || /* include error strings for SYSerr */
- ERR_load_BN_strings() == 0 ||
+ || err_load_ERR_strings_int() == 0 /* include error strings for SYSerr */
+ || err_load_BN_strings_int() == 0
# ifndef OPENSSL_NO_RSA
- ERR_load_RSA_strings() == 0 ||
+ || err_load_RSA_strings_int() == 0
# endif
# ifndef OPENSSL_NO_DH
- ERR_load_DH_strings() == 0 ||
+ || err_load_DH_strings_int() == 0
# endif
- ERR_load_EVP_strings() == 0 ||
- ERR_load_BUF_strings() == 0 ||
- ERR_load_OBJ_strings() == 0 ||
- ERR_load_PEM_strings() == 0 ||
+ || err_load_EVP_strings_int() == 0
+ || err_load_BUF_strings_int() == 0
+ || err_load_OBJ_strings_int() == 0
+ || err_load_PEM_strings_int() == 0
# ifndef OPENSSL_NO_DSA
- ERR_load_DSA_strings() == 0 ||
+ || err_load_DSA_strings_int() == 0
# endif
- ERR_load_X509_strings() == 0 ||
- ERR_load_ASN1_strings() == 0 ||
- ERR_load_CONF_strings() == 0 ||
- ERR_load_CRYPTO_strings() == 0 ||
+ || err_load_X509_strings_int() == 0
+ || err_load_ASN1_strings_int() == 0
+ || err_load_CONF_strings_int() == 0
+ || err_load_CRYPTO_strings_int() == 0
# ifndef OPENSSL_NO_COMP
- ERR_load_COMP_strings() == 0 ||
+ || err_load_COMP_strings_int() == 0
# endif
# ifndef OPENSSL_NO_EC
- ERR_load_EC_strings() == 0 ||
+ || err_load_EC_strings_int() == 0
# endif
- /* skip ERR_load_SSL_strings() because it is not in this library */
- ERR_load_BIO_strings() == 0 ||
- ERR_load_PKCS7_strings() == 0 ||
- ERR_load_X509V3_strings() == 0 ||
- ERR_load_PKCS12_strings() == 0 ||
- ERR_load_RAND_strings() == 0 ||
- ERR_load_DSO_strings() == 0 ||
+ /* skip err_load_SSL_strings_int() because it is not in this library */
+ || err_load_BIO_strings_int() == 0
+ || err_load_PKCS7_strings_int() == 0
+ || err_load_X509V3_strings_int() == 0
+ || err_load_PKCS12_strings_int() == 0
+ || err_load_RAND_strings_int() == 0
+ || err_load_DSO_strings_int() == 0
# ifndef OPENSSL_NO_TS
- ERR_load_TS_strings() == 0 ||
+ || err_load_TS_strings_int() == 0
# endif
# ifndef OPENSSL_NO_ENGINE
- ERR_load_ENGINE_strings() == 0 ||
+ || err_load_ENGINE_strings_int() == 0
# endif
- ERR_load_HTTP_strings() == 0 ||
+ || err_load_HTTP_strings_int() == 0
# ifndef OPENSSL_NO_OCSP
- ERR_load_OCSP_strings() == 0 ||
+ || err_load_OCSP_strings_int() == 0
# endif
- ERR_load_UI_strings() == 0 ||
+ || err_load_UI_strings_int() == 0
# ifndef OPENSSL_NO_CMS
- ERR_load_CMS_strings() == 0 ||
+ || err_load_CMS_strings_int() == 0
# endif
# ifndef OPENSSL_NO_CRMF
- ERR_load_CRMF_strings() == 0 ||
- ERR_load_CMP_strings() == 0 ||
+ || err_load_CRMF_strings_int() == 0
+ || err_load_CMP_strings_int() == 0
# endif
# ifndef OPENSSL_NO_CT
- ERR_load_CT_strings() == 0 ||
+ || err_load_CT_strings_int() == 0
# endif
- ERR_load_ESS_strings() == 0 ||
- ERR_load_ASYNC_strings() == 0 ||
+ || err_load_ESS_strings_int() == 0
+ || err_load_ASYNC_strings_int() == 0
+ || err_load_OSSL_STORE_strings_int() == 0
+ || err_load_PROP_strings_int() == 0
+ || err_load_PROV_strings_int() == 0
#endif
- ERR_load_OSSL_STORE_strings() == 0 ||
- ERR_load_PROP_strings() == 0 ||
- ERR_load_PROV_strings() == 0)
+ )
return 0;
return 1;
diff --git a/crypto/err/err_all_legacy.c b/crypto/err/err_all_legacy.c
new file mode 100644
index 0000000000..489036fd8b
--- /dev/null
+++ b/crypto/err/err_all_legacy.c
@@ -0,0 +1,101 @@
+/*
+ * Copyright 2020 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
+ */
+
+/* This is the C source file where we include this header directly */
+#include <openssl/cryptoerr_legacy.h>
+
+#ifndef OPENSSL_NO_DEPRECATED_3_0
+
+#include "crypto/err.h"
+#include "crypto/asn1err.h"
+#include "crypto/asyncerr.h"
+#include "crypto/bnerr.h"
+#include "crypto/buffererr.h"
+#include "crypto/bioerr.h"
+#include "crypto/cmserr.h"
+#include "crypto/comperr.h"
+#include "crypto/conferr.h"
+#include "crypto/cryptoerr.h"
+#include "crypto/cterr.h"
+#include "crypto/dherr.h"
+#include "crypto/dsaerr.h"
+#include "internal/dsoerr.h"
+#include "crypto/ecerr.h"
+#include "crypto/engineerr.h"
+#include "crypto/evperr.h"
+#include "crypto/httperr.h"
+#include "crypto/objectserr.h"
+#include "crypto/ocsperr.h"
+#include "crypto/pemerr.h"
+#include "crypto/pkcs12err.h"
+#include "crypto/pkcs7err.h"
+#include "crypto/randerr.h"
+#include "crypto/rsaerr.h"
+#include "crypto/storeerr.h"
+#include "crypto/tserr.h"
+#include "crypto/uierr.h"
+#include "crypto/x509err.h"
+#include "crypto/x509v3err.h"
+
+# define IMPLEMENT_LEGACY_ERR_LOAD(lib) \
+ int ERR_load_##lib##_strings(void) \
+ { \
+ return err_load_##lib##_strings_int(); \
+ }
+
+# ifndef OPENSSL_NO_ERR
+IMPLEMENT_LEGACY_ERR_LOAD(ASN1)
+IMPLEMENT_LEGACY_ERR_LOAD(ASYNC)
+IMPLEMENT_LEGACY_ERR_LOAD(BIO)
+IMPLEMENT_LEGACY_ERR_LOAD(BN)
+IMPLEMENT_LEGACY_ERR_LOAD(BUF)
+# ifndef OPENSSL_NO_CMS
+IMPLEMENT_LEGACY_ERR_LOAD(CMS)
+# endif
+# ifndef OPENSSL_NO_COMP
+IMPLEMENT_LEGACY_ERR_LOAD(COMP)
+# endif
+IMPLEMENT_LEGACY_ERR_LOAD(CONF)
+IMPLEMENT_LEGACY_ERR_LOAD(CRYPTO)
+# ifndef OPENSSL_NO_CT
+IMPLEMENT_LEGACY_ERR_LOAD(CT)
+# endif
+# ifndef OPENSSL_NO_DH
+IMPLEMENT_LEGACY_ERR_LOAD(DH)
+# endif
+# ifndef OPENSSL_NO_DSA
+IMPLEMENT_LEGACY_ERR_LOAD(DSA)
+# endif
+# ifndef OPENSSL_NO_EC
+IMPLEMENT_LEGACY_ERR_LOAD(EC)
+# endif
+# ifndef OPENSSL_NO_ENGINE
+IMPLEMENT_LEGACY_ERR_LOAD(ENGINE)
+# endif
+IMPLEMENT_LEGACY_ERR_LOAD(ERR)
+IMPLEMENT_LEGACY_ERR_LOAD(EVP)
+IMPLEMENT_LEGACY_ERR_LOAD(OBJ)
+# ifndef OPENSSL_NO_OCSP
+IMPLEMENT_LEGACY_ERR_LOAD(OCSP)
+# endif
+IMPLEMENT_LEGACY_ERR_LOAD(PEM)
+IMPLEMENT_LEGACY_ERR_LOAD(PKCS12)
+IMPLEMENT_LEGACY_ERR_LOAD(PKCS7)
+IMPLEMENT_LEGACY_ERR_LOAD(RAND)
+IMPLEMENT_LEGACY_ERR_LOAD(RSA)
+IMPLEMENT_LEGACY_ERR_LOAD(OSSL_STORE)
+# ifndef OPENSSL_NO_TS
+IMPLEMENT_LEGACY_ERR_LOAD(TS)
+# endif
+IMPLEMENT_LEGACY_ERR_LOAD(UI)
+IMPLEMENT_LEGACY_ERR_LOAD(X509)
+IMPLEMENT_LEGACY_ERR_LOAD(X509V3)
+# endif
+
+#endif
diff --git a/crypto/err/openssl.ec b/crypto/err/openssl.ec
index 589ff1094c..f265ca0f5d 100644
--- a/crypto/err/openssl.ec
+++ b/crypto/err/openssl.ec
@@ -1,55 +1,49 @@
# configuration file for util/mkerr.pl
# The INPUT HEADER is scanned for declarations
-# LIBNAME INPUT HEADER ERROR-TABLE FILE
-L ERR NONE NONE
-L FUNC NONE NONE
-L BN include/openssl/bn.h crypto/bn/bn_err.c
-L RSA include/openssl/rsa.h crypto/rsa/rsa_err.c
-L DH include/openssl/dh.h crypto/dh/dh_err.c
-L EVP include/openssl/evp.h crypto/evp/evp_err.c
-L BUF include/openssl/buffer.h crypto/buffer/buf_err.c
-L OBJ include/openssl/objects.h crypto/objects/obj_err.c
-L PEM include/openssl/pem.h crypto/pem/pem_err.c
-L DSA include/openssl/dsa.h crypto/dsa/dsa_err.c
-L X509 include/openssl/x509.h crypto/x509/x509_err.c
-L ASN1 include/openssl/asn1.h crypto/asn1/asn1_err.c
-L CONF include/openssl/conf.h crypto/conf/conf_err.c
-L CRYPTO include/openssl/crypto.h crypto/cpt_err.c
-L EC include/openssl/ec.h crypto/ec/ec_err.c
-L SSL include/openssl/ssl.h ssl/ssl_err.c
-L BIO include/openssl/bio.h crypto/bio/bio_err.c
-L PKCS7 include/openssl/pkcs7.h crypto/pkcs7/pkcs7err.c
-L X509V3 include/openssl/x509v3.h crypto/x509/v3err.c
-L PKCS12 include/openssl/pkcs12.h crypto/pkcs12/pk12err.c
-L RAND include/openssl/rand.h crypto/rand/rand_err.c
-L DSO include/internal/dso.h crypto/dso/dso_err.c
-L ENGINE include/openssl/engine.h crypto/engine/eng_err.c
-L OCSP include/openssl/ocsp.h crypto/ocsp/ocsp_err.c
-L UI include/openssl/ui.h crypto/ui/ui_err.c
-L COMP include/openssl/comp.h crypto/comp/comp_err.c
-L TS include/openssl/ts.h crypto/ts/ts_err.c
-L CMS include/openssl/cms.h crypto/cms/cms_err.c
-L CRMF include/openssl/crmf.h crypto/crmf/crmf_err.c
-L CMP include/openssl/cmp.h crypto/cmp/cmp_err.c
-L CT include/openssl/ct.h crypto/ct/ct_err.c
-L ASYNC include/openssl/async.h crypto/async/async_err.c
-L KDF NONE crypto/kdf/kdf_err.c
-L SM2 include/crypto/sm2.h crypto/sm2/sm2_err.c
-L OSSL_STORE include/openssl/store.h crypto/store/store_err.c
-L ESS include/openssl/ess.h crypto/ess/ess_err.c
-L PROP include/internal/property.h crypto/property/property_err.c
-L PROV providers/common/include/prov/providercommon.h providers/common/provider_err.c
-L OSSL_ENCODER include/openssl/encoder.h crypto/encode_decode/encoder_err.c
-L OSSL_DECODER include/openssl/decoder.h crypto/encode_decode/decoder_err.c
-L HTTP include/openssl/http.h crypto/http/http_err.c
-
-# additional header files to be scanned for function names
-L NONE include/openssl/x509_vfy.h NONE
-L NONE crypto/ec/ec_local.h NONE
-L NONE crypto/cms/cms_local.h NONE
-L NONE crypto/ct/ct_local.h NONE
-L NONE ssl/ssl_local.h NONE
+# LIBNAME PUBLIC HEADER ERROR-TABLE FILE INTERNAL HEADER (if relevant)
+L ERR NONE NONE
+L FUNC NONE NONE
+L BN include/openssl/bnerr.h crypto/bn/bn_err.c include/crypto/bnerr.h
+L RSA include/openssl/rsaerr.h crypto/rsa/rsa_err.c include/crypto/rsaerr.h
+L DH include/openssl/dherr.h crypto/dh/dh_err.c include/crypto/dherr.h
+L EVP include/openssl/evperr.h crypto/evp/evp_err.c include/crypto/evperr.h
+L BUF include/openssl/buffererr.h crypto/buffer/buf_err.c include/crypto/buffererr.h
+L OBJ include/openssl/objectserr.h crypto/objects/obj_err.c include/crypto/objectserr.h
+L PEM include/openssl/pemerr.h crypto/pem/pem_err.c include/crypto/pemerr.h
+L DSA include/openssl/dsaerr.h crypto/dsa/dsa_err.c include/crypto/dsaerr.h
+L X509 include/openssl/x509err.h crypto/x509/x509_err.c include/crypto/x509err.h
+L ASN1 include/openssl/asn1err.h crypto/asn1/asn1_err.c include/crypto/asn1err.h
+L CONF include/openssl/conferr.h crypto/conf/conf_err.c include/crypto/conferr.h
+L CRYPTO include/openssl/cryptoerr.h crypto/cpt_err.c include/crypto/cryptoerr.h
+L EC include/openssl/ecerr.h crypto/ec/ec_err.c include/crypto/ecerr.h
+L SSL include/openssl/sslerr.h ssl/ssl_err.c ssl/sslerr.h
+L BIO include/openssl/bioerr.h crypto/bio/bio_err.c include/crypto/bioerr.h
+L PKCS7 include/openssl/pkcs7err.h crypto/pkcs7/pkcs7err.c include/crypto/pkcs7err.h
+L X509V3 include/openssl/x509v3err.h crypto/x509/v3err.c include/crypto/x509v3err.h
+L PKCS12 include/openssl/pkcs12err.h crypto/pkcs12/pk12err.c include/crypto/pkcs12err.h
+L RAND include/openssl/randerr.h crypto/rand/rand_err.c include/crypto/randerr.h
+L DSO NONE crypto/dso/dso_err.c include/internal/dsoerr.h
+L ENGINE include/openssl/engineerr.h crypto/engine/eng_err.c include/crypto/engineerr.h
+L OCSP include/openssl/ocsperr.h crypto/ocsp/ocsp_err.c include/crypto/ocsperr.h
+L UI include/openssl/uierr.h crypto/ui/ui_err.c include/crypto/uierr.h
+L COMP include/openssl/comperr.h crypto/comp/comp_err.c include/crypto/comperr.h
+L TS include/openssl/tserr.h crypto/ts/ts_err.c include/crypto/tserr.h
+L CMS include/openssl/cmserr.h crypto/cms/cms_err.c include/crypto/cmserr.h
+L CRMF include/openssl/crmferr.h crypto/crmf/crmf_err.c include/crypto/crmferr.h
+L CMP include/openssl/cmperr.h crypto/cmp/cmp_err.c include/crypto/cmperr.h
+L CT include/openssl/cterr.h crypto/ct/ct_err.c include/crypto/cterr.h
+L ASYNC include/openssl/asyncerr.h crypto/async/async_err.c include/crypto/asyncerr.h
+# KDF is only here for conservation purposes
+L KDF NONE NONE NONE
+L SM2 NONE crypto/sm2/sm2_err.c include/crypto/sm2err.h
+L OSSL_STORE include/openssl/storeerr.h crypto/store/store_err.c include/crypto/storeerr.h
+L ESS include/openssl/esserr.h crypto/ess/ess_err.c include/crypto/esserr.h
+L PROP NONE crypto/property/property_err.c include/internal/propertyerr.h
+L PROV NONE providers/common/provider_err.c providers/common/include/prov/providercommonerr.h
+L OSSL_ENCODER include/openssl/encodererr.h crypto/encode_decode/encoder_err.c include/crypto/encodererr.h
+L OSSL_DECODER include/openssl/decodererr.h crypto/encode_decode/decoder_err.c include/crypto/decodererr.h
+L HTTP include/openssl/httperr.h crypto/http/http_err.c include/crypto/httperr.h
# SSL/TLS alerts
R SSL_R_SSLV3_ALERT_UNEXPECTED_MESSAGE 1010
diff --git a/crypto/err/openssl.txt b/crypto/err/openssl.txt
index d8ea2a333f..ca10840cee 100644
--- a/crypto/err/openssl.txt
+++ b/crypto/err/openssl.txt
@@ -2658,34 +2658,6 @@ HTTP_R_STATUS_CODE_UNSUPPORTED:114:status code unsupported
HTTP_R_TLS_NOT_ENABLED:107:tls not enabled
HTTP_R_TOO_MANY_REDIRECTIONS:115:too many redirections
HTTP_R_UNEXPECTED_CONTENT_TYPE:118:unexpected content type
-KDF_R_BAD_ENCODING:122:bad encoding
-KDF_R_BAD_LENGTH:123:bad length
-KDF_R_BOTH_MODE_AND_MODE_INT:127:both mode and mode int
-KDF_R_INVALID_DIGEST:100:invalid digest
-KDF_R_INVALID_ITERATION_COUNT:119:invalid iteration count
-KDF_R_INVALID_KEY_LEN:120:invalid key len
-KDF_R_INVALID_MAC_TYPE:116:invalid mac type
-KDF_R_INVALID_MODE:128:invalid mode
-KDF_R_INVALID_MODE_INT:129:invalid mode int
-KDF_R_MISSING_CEK_ALG:125:missing cek alg
-KDF_R_MISSING_ITERATION_COUNT:109:missing iteration count
-KDF_R_MISSING_KEY:104:missing key
-KDF_R_MISSING_MESSAGE_DIGEST:105:missing message digest
-KDF_R_MISSING_PARAMETER:101:missing parameter
-KDF_R_MISSING_PASS:110:missing pass
-KDF_R_MISSING_SALT:111:missing salt
-KDF_R_MISSING_SECRET:107:missing secret
-KDF_R_MISSING_SEED:106:missing seed
-KDF_R_MISSING_SESSION_ID:113:missing session id
-KDF_R_MISSING_TYPE:114:missing type
-KDF_R_MISSING_XCGHASH:115:missing xcghash
-KDF_R_NOT_SUPPORTED:118:not supported
-KDF_R_UNKNOWN_PARAMETER_TYPE:103:unknown parameter type
-KDF_R_UNSUPPORTED_CEK_ALG:126:unsupported cek alg
-KDF_R_UNSUPPORTED_MAC_TYPE:117:unsupported mac type
-KDF_R_VALUE_ERROR:108:value error
-KDF_R_VALUE_MISSING:102:value missing
-KDF_R_WRONG_OUTPUT_BUFFER_SIZE:112:wrong output buffer size
OBJ_R_OID_EXISTS:102:oid exists
OBJ_R_UNKNOWN_NID:101:unknown nid
OBJ_R_UNKNOWN_OBJECT_NAME:103:unknown object name
diff --git a/crypto/ess/ess_err.c b/crypto/ess/ess_err.c
index 6547645fea..450c07edac 100644
--- a/crypto/ess/ess_err.c
+++ b/crypto/ess/ess_err.c
@@ -10,6 +10,7 @@
#include <openssl/err.h>
#include <openssl/esserr.h>
+#include "crypto/esserr.h"
#ifndef OPENSSL_NO_ERR
@@ -25,7 +26,7 @@ static const ERR_STRING_DATA ESS_str_reasons[] = {
#endif
-int ERR_load_ESS_strings(void)
+int err_load_ESS_strings_int(void)
{
#ifndef OPENSSL_NO_ERR
if (ERR_reason_error_string(ESS_str_reasons[0].error) == NULL)
diff --git a/crypto/evp/evp_err.c b/crypto/evp/evp_err.c
index 52a224a517..3a4253b353 100644
--- a/crypto/evp/evp_err.c
+++ b/crypto/evp/evp_err.c
@@ -10,6 +10,7 @@
#include <openssl/err.h>
#include <openssl/evperr.h>
+#include "crypto/evperr.h"
#ifndef OPENSSL_NO_ERR
@@ -196,7 +197,7 @@ static const ERR_STRING_DATA EVP_str_reasons[] = {
#endif
-int ERR_load_EVP_strings(void)
+int err_load_EVP_strings_int(void)
{
#ifndef OPENSSL_NO_ERR
if (ERR_reason_error_string(EVP_str_reasons[0].error) == NULL)
diff --git a/crypto/http/http_err.c b/crypto/http/http_err.c
index 13779fac84..ec46fb9304 100644
--- a/crypto/http/http_err.c
+++ b/crypto/http/http_err.c
@@ -10,6 +10,7 @@
#include <openssl/err.h>
#include <openssl/httperr.h>
+#include "crypto/httperr.h"
#ifndef OPENSSL_NO_ERR
@@ -64,7 +65,7 @@ static const ERR_STRING_DATA HTTP_str_reasons[] = {
#endif
-int ERR_load_HTTP_strings(void)
+int err_load_HTTP_strings_int(void)
{
#ifndef OPENSSL_NO_ERR
if (ERR_reason_error_string(HTTP_str_reasons[0].error) == NULL)
diff --git a/crypto/objects/obj_err.c b/crypto/objects/obj_err.c
index c55e8ef2d0..ebc46cb44c 100644
--- a/crypto/objects/obj_err.c
+++ b/crypto/objects/obj_err.c
@@ -10,6 +10,7 @@
#include <openssl/err.h>
#include <openssl/objectserr.h>
+#include "crypto/objectserr.h"
#ifndef OPENSSL_NO_ERR
@@ -23,7 +24,7 @@ static const ERR_STRING_DATA OBJ_str_reasons[] = {
#endif
-int ERR_load_OBJ_strings(void)
+int err_load_OBJ_strings_int(void)
{
#ifndef OPENSSL_NO_ERR
if (ERR_reason_error_string(OBJ_str_reasons[0].error) == NULL)
diff --git a/crypto/ocsp/ocsp_err.c b/crypto/ocsp/ocsp_err.c
index 518e0432a3..fd0643c715 100644
--- a/crypto/ocsp/ocsp_err.c
+++ b/crypto/ocsp/ocsp_err.c
@@ -10,8 +10,11 @@
#include <openssl/err.h>
#include <openssl/ocsperr.h>
+#include "crypto/ocsperr.h"
-#ifndef OPENSSL_NO_ERR
+#ifndef OPENSSL_NO_OCSP
+
+# ifndef OPENSSL_NO_ERR
static const ERR_STRING_DATA OCSP_str_reasons[] = {
{ERR_PACK(ERR_LIB_OCSP, 0, OCSP_R_CERTIFICATE_VERIFY_ERROR),
@@ -57,13 +60,16 @@ static const ERR_STRING_DATA OCSP_str_reasons[] = {
{0, NULL}
};
-#endif
+# endif
-int ERR_load_OCSP_strings(void)
+int err_load_OCSP_strings_int(void)
{
-#ifndef OPENSSL_NO_ERR
+# ifndef OPENSSL_NO_ERR
if (ERR_reason_error_string(OCSP_str_reasons[0].error) == NULL)
ERR_load_strings_const(OCSP_str_reasons);
-#endif
+# endif
return 1;
}
+#else
+NON_EMPTY_TRANSLATION_UNIT
+#endif
diff --git a/crypto/pem/pem_err.c b/crypto/pem/pem_err.c
index 132b15cb37..52a1bc611f 100644
--- a/crypto/pem/pem_err.c
+++ b/crypto/pem/pem_err.c
@@ -10,6 +10,7 @@
#include <openssl/err.h>
#include <openssl/pemerr.h>
+#include "crypto/pemerr.h"
#ifndef OPENSSL_NO_ERR
@@ -59,7 +60,7 @@ static const ERR_STRING_DATA PEM_str_reasons[] = {
#endif
-int ERR_load_PEM_strings(void)
+int err_load_PEM_strings_int(void)
{
#ifndef OPENSSL_NO_ERR
if (ERR_reason_error_string(PEM_str_reasons[0].error) == NULL)
diff --git a/crypto/pkcs12/pk12err.c b/crypto/pkcs12/pk12err.c
index ae835c57be..9899e272c1 100644
--- a/crypto/pkcs12/pk12err.c
+++ b/crypto/pkcs12/pk12err.c
@@ -10,6 +10,7 @@
#include <openssl/err.h>
#include <openssl/pkcs12err.h>
+#include "crypto/pkcs12err.h"
#ifndef OPENSSL_NO_ERR
@@ -50,7 +51,7 @@ static const ERR_STRING_DATA PKCS12_str_reasons[] = {
#endif
-int ERR_load_PKCS12_strings(void)
+int err_load_PKCS12_strings_int(void)
{
#ifndef OPENSSL_NO_ERR
if (ERR_reason_error_string(PKCS12_str_reasons[0].error) == NULL)
diff --git a/crypto/pkcs7/pkcs7err.c b/crypto/pkcs7/pkcs7err.c
index f7b87d552a..c2c40b48af 100644
--- a/crypto/pkcs7/pkcs7err.c
+++ b/crypto/pkcs7/pkcs7err.c
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1995-2020 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
@@ -10,6 +10,7 @@
#include <openssl/err.h>
#include <openssl/pkcs7err.h>
+#include "crypto/pkcs7err.h"
#ifndef OPENSSL_NO_ERR
@@ -87,7 +88,7 @@ static const ERR_STRING_DATA PKCS7_str_reasons[] = {
#endif
-int ERR_load_PKCS7_strings(void)
+int err_load_PKCS7_strings_int(void)
{
#ifndef OPENSSL_NO_ERR
if (ERR_reason_error_string(PKCS7_str_reasons[0].error) == NULL)
diff --git a/crypto/property/property_err.c b/crypto/property/property_err.c
index 5f81930190..a7c722feb5 100644
--- a/crypto/property/property_err.c
+++ b/crypto/property/property_err.c
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1995-2020 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
@@ -36,7 +36,7 @@ static const ERR_STRING_DATA PROP_str_reasons[] = {
#endif
-int ERR_load_PROP_strings(void)
+int err_load_PROP_strings_int(void)
{
#ifndef OPENSSL_NO_ERR
if (ERR_reason_error_string(PROP_str_reasons[0].error) == NULL)
diff --git a/crypto/rand/rand_err.c b/crypto/rand/rand_err.c
index be8726192b..32c4c6cbcb 100644
--- a/crypto/rand/rand_err.c
+++ b/crypto/rand/rand_err.c
@@ -10,6 +10,7 @@
#include <openssl/err.h>
#include <openssl/randerr.h>
+#include "crypto/randerr.h"
#ifndef OPENSSL_NO_ERR
@@ -98,7 +99,7 @@ static const ERR_STRING_DATA RAND_str_reasons[] = {
#endif
-int ERR_load_RAND_strings(void)
+int err_load_RAND_strings_int(void)
{
#ifndef OPENSSL_NO_ERR
if (ERR_reason_error_string(RAND_str_reasons[0].error) == NULL)
diff --git a/crypto/rsa/rsa_err.c b/crypto/rsa/rsa_err.c
index 382b8cb7d1..8008092b13 100644
--- a/crypto/rsa/rsa_err.c
+++ b/crypto/rsa/rsa_err.c
@@ -10,6 +10,7 @@
#include <openssl/err.h>
#include <openssl/rsaerr.h>
+#include "crypto/rsaerr.h"
#ifndef OPENSSL_NO_ERR
@@ -152,7 +153,7 @@ static const ERR_STRING_DATA RSA_str_reasons[] = {
#endif
-int ERR_load_RSA_strings(void)
+int err_load_RSA_strings_int(void)
{
#ifndef OPENSSL_NO_ERR
if (ERR_reason_error_string(RSA_str_reasons[0].error) == NULL)
diff --git a/crypto/sm2/sm2_err.c b/crypto/sm2/sm2_err.c
index 387b2f4cff..60509e14d1 100644
--- a/crypto/sm2/sm2_err.c
+++ b/crypto/sm2/sm2_err.c
@@ -11,7 +11,9 @@
#include <openssl/err.h>
#include "crypto/sm2err.h"
-#ifndef OPENSSL_NO_ERR
+#ifndef OPENSSL_NO_SM2
+
+# ifndef OPENSSL_NO_ERR
static const ERR_STRING_DATA SM2_str_reasons[] = {
{ERR_PACK(ERR_LIB_SM2, 0, SM2_R_ASN1_ERROR), "asn1 error"},
@@ -31,13 +33,16 @@ static const ERR_STRING_DATA SM2_str_reasons[] = {
{0, NULL}
};
-#endif
+# endif
-int ERR_load_SM2_strings(void)
+int err_load_SM2_strings_int(void)
{
-#ifndef OPENSSL_NO_ERR
+# ifndef OPENSSL_NO_ERR
if (ERR_reason_error_string(SM2_str_reasons[0].error) == NULL)
ERR_load_strings_const(SM2_str_reasons);
-#endif
+# endif
return 1;
}
+#else
+NON_EMPTY_TRANSLATION_UNIT
+#endif
diff --git a/crypto/store/store_err.c b/crypto/store/store_err.c
index 320934e6c6..ab0a2c6cd2 100644
--- a/crypto/store/store_err.c
+++ b/crypto/store/store_err.c
@@ -10,6 +10,7 @@
#include <openssl/err.h>
#include <openssl/storeerr.h>
+#include "crypto/storeerr.h"
#ifndef OPENSSL_NO_ERR
@@ -62,7 +63,7 @@ static const ERR_STRING_DATA OSSL_STORE_str_reasons[] = {
#endif
-int ERR_load_OSSL_STORE_strings(void)
+int err_load_OSSL_STORE_strings_int(void)
{
#ifndef OPENSSL_NO_ERR
if (ERR_reason_error_string(OSSL_STORE_str_reasons[0].error) == NULL)
diff --git a/crypto/ts/ts_err.c b/crypto/ts/ts_err.c
index e87c492686..3a682c694f 100644
--- a/crypto/ts/ts_err.c
+++ b/crypto/ts/ts_err.c
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1995-2020 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
@@ -10,8 +10,11 @@
#include <openssl/err.h>
#include <openssl/tserr.h>
+#include "crypto/tserr.h"
-#ifndef OPENSSL_NO_ERR
+#ifndef OPENSSL_NO_TS
+
+# ifndef OPENSSL_NO_ERR
static const ERR_STRING_DATA TS_str_reasons[] = {
{ERR_PACK(ERR_LIB_TS, 0, TS_R_BAD_PKCS7_TYPE), "bad pkcs7 type"},
@@ -73,13 +76,16 @@ static const ERR_STRING_DATA TS_str_reasons[] = {
{0, NULL}
};
-#endif
+# endif
-int ERR_load_TS_strings(void)
+int err_load_TS_strings_int(void)
{
-#ifndef OPENSSL_NO_ERR
+# ifndef OPENSSL_NO_ERR
if (ERR_reason_error_string(TS_str_reasons[0].error) == NULL)
ERR_load_strings_const(TS_str_reasons);
-#endif
+# endif
return 1;
}
+#else
+NON_EMPTY_TRANSLATION_UNIT
+#endif
diff --git a/crypto/ui/ui_err.c b/crypto/ui/ui_err.c
index 2b564f71be..83ea371997 100644
--- a/crypto/ui/ui_err.c
+++ b/crypto/ui/ui_err.c
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1995-2020 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
@@ -10,6 +10,7 @@
#include <openssl/err.h>
#include <openssl/uierr.h>
+#include "crypto/uierr.h"
#ifndef OPENSSL_NO_ERR
@@ -36,7 +37,7 @@ static const ERR_STRING_DATA UI_str_reasons[] = {
#endif
-int ERR_load_UI_strings(void)
+int err_load_UI_strings_int(void)
{
#ifndef OPENSSL_NO_ERR
if (ERR_reason_error_string(UI_str_reasons[0].error) == NULL)
diff --git a/crypto/x509/v3err.c b/crypto/x509/v3err.c
index 5124908089..18eb9917cb 100644
--- a/crypto/x509/v3err.c
+++ b/crypto/x509/v3err.c
@@ -10,6 +10,7 @@
#include <openssl/err.h>
#include <openssl/x509v3err.h>
+#include "crypto/x509v3err.h"
#ifndef OPENSSL_NO_ERR
@@ -54,6 +55,8 @@ static const ERR_STRING_DATA X509V3_str_reasons[] = {
"invalid boolean string"},
{ERR_PACK(ERR_LIB_X509V3, 0, X509V3_R_INVALID_CERTIFICATE),
"invalid certificate"},
+ {ERR_PACK(ERR_LIB_X509V3, 0, X509V3_R_INVALID_EMPTY_NAME),
+ "invalid empty name"},
{ERR_PACK(ERR_LIB_X509V3, 0, X509V3_R_INVALID_EXTENSION_STRING),
"invalid extension string"},
{ERR_PACK(ERR_LIB_X509V3, 0, X509V3_R_INVALID_INHERITANCE),
@@ -65,8 +68,6 @@ static const ERR_STRING_DATA X509V3_str_reasons[] = {
{ERR_PACK(ERR_LIB_X509V3, 0, X509V3_R_INVALID_NAME), "invalid name"},
{ERR_PACK(ERR_LIB_X509V3, 0, X509V3_R_INVALID_NULL_ARGUMENT),
"invalid null argument"},
- {ERR_PACK(ERR_LIB_X509V3, 0, X509V3_R_INVALID_EMPTY_NAME),
- "invalid empty name"},
{ERR_PACK(ERR_LIB_X509V3, 0, X509V3_R_INVALID_NULL_VALUE),
"invalid null value"},
{ERR_PACK(ERR_LIB_X509V3, 0, X509V3_R_INVALID_NUMBER), "invalid number"},
@@ -136,7 +137,7 @@ static const ERR_STRING_DATA X509V3_str_reasons[] = {
#endif
-int ERR_load_X509V3_strings(void)
+int err_load_X509V3_strings_int(void)
{
#ifndef OPENSSL_NO_ERR
if (ERR_reason_error_string(X509V3_str_reasons[0].error) == NULL)
diff --git a/crypto/x509/x509_err.c b/crypto/x509/x509_err.c
index 330fed3406..76d57e869c 100644
--- a/crypto/x509/x509_err.c
+++ b/crypto/x509/x509_err.c
@@ -10,6 +10,7 @@
#include <openssl/err.h>
#include <openssl/x509err.h>
+#include "crypto/x509err.h"
#ifndef OPENSSL_NO_ERR
@@ -83,7 +84,7 @@ static const ERR_STRING_DATA X509_str_reasons[] = {
#endif
-int ERR_load_X509_strings(void)
+int err_load_X509_strings_int(void)
{
#ifndef OPENSSL_NO_ERR
if (ERR_reason_error_string(X509_str_reasons[0].error) == NULL)
diff --git a/engines/e_afalg.txt b/engines/e_afalg.txt
index 7de1fe9826..70d2d8b819 100644
--- a/engines/e_afalg.txt
+++ b/engines/e_afalg.txt
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 The OpenSSL Project Authors. All Rights Reserved.
+# Copyright 1999-2020 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
diff --git a/engines/e_afalg_err.c b/engines/e_afalg_err.c
index 4db6d660c9..cc365064ef 100644
--- a/engines/e_afalg_err.c
+++ b/engines/e_afalg_err.c
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1995-2020 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
diff --git a/engines/e_afalg_err.h b/engines/e_afalg_err.h
index 557df5d401..08f2d54da5 100644
--- a/engines/e_afalg_err.h
+++ b/engines/e_afalg_err.h
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1995-2020 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
@@ -8,8 +8,9 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef OSSL_ENGINES_E_AFALG_ERR_H
-# define OSSL_ENGINES_E_AFALG_ERR_H
+#ifndef OSSL_E_AFALG_ERR_H
+# define OSSL_E_AFALG_ERR_H
+# pragma once
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
diff --git a/engines/e_capi.txt b/engines/e_capi.txt
index 303a1ed52f..942a6d9769 100644
--- a/engines/e_capi.txt
+++ b/engines/e_capi.txt
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 The OpenSSL Project Authors. All Rights Reserved.
+# Copyright 1999-2020 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
diff --git a/engines/e_capi_err.c b/engines/e_capi_err.c
index e2b1f7561f..12eb8e0a89 100644
--- a/engines/e_capi_err.c
+++ b/engines/e_capi_err.c
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1995-2020 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
diff --git a/engines/e_capi_err.h b/engines/e_capi_err.h
index c8bd24869a..d075373755 100644
--- a/engines/e_capi_err.h
+++ b/engines/e_capi_err.h
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1995-2020 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
@@ -8,8 +8,9 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef OSSL_ENGINES_E_CAPI_ERR_H
-# define OSSL_ENGINES_E_CAPI_ERR_H
+#ifndef OSSL_E_CAPI_ERR_H
+# define OSSL_E_CAPI_ERR_H
+# pragma once
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
diff --git a/engines/e_dasync.txt b/engines/e_dasync.txt
index 819ff6fefe..c503a7a667 100644
--- a/engines/e_dasync.txt
+++ b/engines/e_dasync.txt
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 The OpenSSL Project Authors. All Rights Reserved.
+# Copyright 1999-2020 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
diff --git a/engines/e_dasync_err.c b/engines/e_dasync_err.c
index a2e6c0dc86..1ee237a54d 100644
--- a/engines/e_dasync_err.c
+++ b/engines/e_dasync_err.c
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1995-2020 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
diff --git a/engines/e_dasync_err.h b/engines/e_dasync_err.h
index 7d2ea7936f..71c8d9916d 100644
--- a/engines/e_dasync_err.h
+++ b/engines/e_dasync_err.h
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1995-2020 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
@@ -8,8 +8,9 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef OSSL_ENGINES_E_DASYNC_ERR_H
-# define OSSL_ENGINES_E_DASYNC_ERR_H
+#ifndef OSSL_E_DASYNC_ERR_H
+# define OSSL_E_DASYNC_ERR_H
+# pragma once
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
diff --git a/engines/e_loader_attic_err.h b/engines/e_loader_attic_err.h
index 115e0ea6f6..6f30ae3d0c 100644
--- a/engines/e_loader_attic_err.h
+++ b/engines/e_loader_attic_err.h
@@ -8,8 +8,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef OPENSSL_ATTICERR_H
-# define OPENSSL_ATTICERR_H
+#ifndef OSSL_E_LOADER_ATTIC_ERR_H
+# define OSSL_E_LOADER_ATTIC_ERR_H
# pragma once
# include <openssl/opensslconf.h>
diff --git a/engines/e_ossltest.txt b/engines/e_ossltest.txt
index f40e60cf21..ab36940699 100644
--- a/engines/e_ossltest.txt
+++ b/engines/e_ossltest.txt
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 The OpenSSL Project Authors. All Rights Reserved.
+# Copyright 1999-2020 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
diff --git a/engines/e_ossltest_err.c b/engines/e_ossltest_err.c
index d9ee80cb83..141fcd1ca9 100644
--- a/engines/e_ossltest_err.c
+++ b/engines/e_ossltest_err.c
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1995-2020 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
diff --git a/engines/e_ossltest_err.h b/engines/e_ossltest_err.h
index 0c23b0c453..1405a30af8 100644
--- a/engines/e_ossltest_err.h
+++ b/engines/e_ossltest_err.h
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1995-2020 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
@@ -8,8 +8,9 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef OSSL_ENGINES_E_OSSLTEST_ERR_H
-# define OSSL_ENGINES_E_OSSLTEST_ERR_H
+#ifndef OSSL_E_OSSLTEST_ERR_H
+# define OSSL_E_OSSLTEST_ERR_H
+# pragma once
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
diff --git a/include/openssl/decodererr.h b/include/crypto/asn1err.h
similarity index 55%
copy from include/openssl/decodererr.h
copy to include/crypto/asn1err.h
index 8da9157814..afd05297a2 100644
--- a/include/openssl/decodererr.h
+++ b/include/crypto/asn1err.h
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2020-2020 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
@@ -8,28 +8,20 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef OPENSSL_OSSL_DECODERERR_H
-# define OPENSSL_OSSL_DECODERERR_H
+#ifndef OSSL_CRYPTO_ASN1ERR_H
+# define OSSL_CRYPTO_ASN1ERR_H
# pragma once
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
-
# ifdef __cplusplus
-extern "C"
+extern "C" {
# endif
-int ERR_load_OSSL_DECODER_strings(void);
-/*
- * OSSL_DECODER function codes.
- */
-# ifndef OPENSSL_NO_DEPRECATED_3_0
-# endif
-
-/*
- * OSSL_DECODER reason codes.
- */
-# define OSSL_DECODER_R_MISSING_GET_PARAMS 100
+int err_load_ASN1_strings_int(void);
+# ifdef __cplusplus
+}
+# endif
#endif
diff --git a/include/openssl/decodererr.h b/include/crypto/asyncerr.h
similarity index 55%
copy from include/openssl/decodererr.h
copy to include/crypto/asyncerr.h
index 8da9157814..71a6ddc59a 100644
--- a/include/openssl/decodererr.h
+++ b/include/crypto/asyncerr.h
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2020-2020 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
@@ -8,28 +8,20 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef OPENSSL_OSSL_DECODERERR_H
-# define OPENSSL_OSSL_DECODERERR_H
+#ifndef OSSL_CRYPTO_ASYNCERR_H
+# define OSSL_CRYPTO_ASYNCERR_H
# pragma once
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
-
# ifdef __cplusplus
-extern "C"
+extern "C" {
# endif
-int ERR_load_OSSL_DECODER_strings(void);
-/*
- * OSSL_DECODER function codes.
- */
-# ifndef OPENSSL_NO_DEPRECATED_3_0
-# endif
-
-/*
- * OSSL_DECODER reason codes.
- */
-# define OSSL_DECODER_R_MISSING_GET_PARAMS 100
+int err_load_ASYNC_strings_int(void);
+# ifdef __cplusplus
+}
+# endif
#endif
diff --git a/include/openssl/decodererr.h b/include/crypto/bioerr.h
similarity index 55%
copy from include/openssl/decodererr.h
copy to include/crypto/bioerr.h
index 8da9157814..3cc57cb281 100644
--- a/include/openssl/decodererr.h
+++ b/include/crypto/bioerr.h
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2020-2020 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
@@ -8,28 +8,20 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef OPENSSL_OSSL_DECODERERR_H
-# define OPENSSL_OSSL_DECODERERR_H
+#ifndef OSSL_CRYPTO_BIOERR_H
+# define OSSL_CRYPTO_BIOERR_H
# pragma once
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
-
# ifdef __cplusplus
-extern "C"
+extern "C" {
# endif
-int ERR_load_OSSL_DECODER_strings(void);
-/*
- * OSSL_DECODER function codes.
- */
-# ifndef OPENSSL_NO_DEPRECATED_3_0
-# endif
-
-/*
- * OSSL_DECODER reason codes.
- */
-# define OSSL_DECODER_R_MISSING_GET_PARAMS 100
+int err_load_BIO_strings_int(void);
+# ifdef __cplusplus
+}
+# endif
#endif
diff --git a/include/openssl/decodererr.h b/include/crypto/bnerr.h
similarity index 55%
copy from include/openssl/decodererr.h
copy to include/crypto/bnerr.h
index 8da9157814..7407a66ab5 100644
--- a/include/openssl/decodererr.h
+++ b/include/crypto/bnerr.h
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2020-2020 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
@@ -8,28 +8,20 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef OPENSSL_OSSL_DECODERERR_H
-# define OPENSSL_OSSL_DECODERERR_H
+#ifndef OSSL_CRYPTO_BNERR_H
+# define OSSL_CRYPTO_BNERR_H
# pragma once
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
-
# ifdef __cplusplus
-extern "C"
+extern "C" {
# endif
-int ERR_load_OSSL_DECODER_strings(void);
-/*
- * OSSL_DECODER function codes.
- */
-# ifndef OPENSSL_NO_DEPRECATED_3_0
-# endif
-
-/*
- * OSSL_DECODER reason codes.
- */
-# define OSSL_DECODER_R_MISSING_GET_PARAMS 100
+int err_load_BN_strings_int(void);
+# ifdef __cplusplus
+}
+# endif
#endif
diff --git a/include/openssl/decodererr.h b/include/crypto/buffererr.h
similarity index 55%
copy from include/openssl/decodererr.h
copy to include/crypto/buffererr.h
index 8da9157814..93ea0dea4b 100644
--- a/include/openssl/decodererr.h
+++ b/include/crypto/buffererr.h
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2020-2020 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
@@ -8,28 +8,20 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef OPENSSL_OSSL_DECODERERR_H
-# define OPENSSL_OSSL_DECODERERR_H
+#ifndef OSSL_CRYPTO_BUFFERERR_H
+# define OSSL_CRYPTO_BUFFERERR_H
# pragma once
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
-
# ifdef __cplusplus
-extern "C"
+extern "C" {
# endif
-int ERR_load_OSSL_DECODER_strings(void);
-/*
- * OSSL_DECODER function codes.
- */
-# ifndef OPENSSL_NO_DEPRECATED_3_0
-# endif
-
-/*
- * OSSL_DECODER reason codes.
- */
-# define OSSL_DECODER_R_MISSING_GET_PARAMS 100
+int err_load_BUF_strings_int(void);
+# ifdef __cplusplus
+}
+# endif
#endif
diff --git a/include/openssl/decodererr.h b/include/crypto/cmperr.h
similarity index 55%
copy from include/openssl/decodererr.h
copy to include/crypto/cmperr.h
index 8da9157814..92dd4154bb 100644
--- a/include/openssl/decodererr.h
+++ b/include/crypto/cmperr.h
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2020-2020 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
@@ -8,28 +8,23 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef OPENSSL_OSSL_DECODERERR_H
-# define OPENSSL_OSSL_DECODERERR_H
+#ifndef OSSL_CRYPTO_CMPERR_H
+# define OSSL_CRYPTO_CMPERR_H
# pragma once
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
-
# ifdef __cplusplus
-extern "C"
+extern "C" {
# endif
-int ERR_load_OSSL_DECODER_strings(void);
-/*
- * OSSL_DECODER function codes.
- */
-# ifndef OPENSSL_NO_DEPRECATED_3_0
-# endif
+# ifndef OPENSSL_NO_CMP
-/*
- * OSSL_DECODER reason codes.
- */
-# define OSSL_DECODER_R_MISSING_GET_PARAMS 100
+int err_load_CMP_strings_int(void);
+# endif
+# ifdef __cplusplus
+}
+# endif
#endif
diff --git a/include/openssl/decodererr.h b/include/crypto/cmserr.h
similarity index 55%
copy from include/openssl/decodererr.h
copy to include/crypto/cmserr.h
index 8da9157814..2aad1e1e0c 100644
--- a/include/openssl/decodererr.h
+++ b/include/crypto/cmserr.h
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2020-2020 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
@@ -8,28 +8,23 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef OPENSSL_OSSL_DECODERERR_H
-# define OPENSSL_OSSL_DECODERERR_H
+#ifndef OSSL_CRYPTO_CMSERR_H
+# define OSSL_CRYPTO_CMSERR_H
# pragma once
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
-
# ifdef __cplusplus
-extern "C"
+extern "C" {
# endif
-int ERR_load_OSSL_DECODER_strings(void);
-/*
- * OSSL_DECODER function codes.
- */
-# ifndef OPENSSL_NO_DEPRECATED_3_0
-# endif
+# ifndef OPENSSL_NO_CMS
-/*
- * OSSL_DECODER reason codes.
- */
-# define OSSL_DECODER_R_MISSING_GET_PARAMS 100
+int err_load_CMS_strings_int(void);
+# endif
+# ifdef __cplusplus
+}
+# endif
#endif
diff --git a/include/openssl/decodererr.h b/include/crypto/comperr.h
similarity index 55%
copy from include/openssl/decodererr.h
copy to include/crypto/comperr.h
index 8da9157814..8b8253cf22 100644
--- a/include/openssl/decodererr.h
+++ b/include/crypto/comperr.h
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2020-2020 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
@@ -8,28 +8,23 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef OPENSSL_OSSL_DECODERERR_H
-# define OPENSSL_OSSL_DECODERERR_H
+#ifndef OSSL_CRYPTO_COMPERR_H
+# define OSSL_CRYPTO_COMPERR_H
# pragma once
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
-
# ifdef __cplusplus
-extern "C"
+extern "C" {
# endif
-int ERR_load_OSSL_DECODER_strings(void);
-/*
- * OSSL_DECODER function codes.
- */
-# ifndef OPENSSL_NO_DEPRECATED_3_0
-# endif
+# ifndef OPENSSL_NO_COMP
-/*
- * OSSL_DECODER reason codes.
- */
-# define OSSL_DECODER_R_MISSING_GET_PARAMS 100
+int err_load_COMP_strings_int(void);
+# endif
+# ifdef __cplusplus
+}
+# endif
#endif
diff --git a/include/openssl/decodererr.h b/include/crypto/conferr.h
similarity index 55%
copy from include/openssl/decodererr.h
copy to include/crypto/conferr.h
index 8da9157814..af35d85a7e 100644
--- a/include/openssl/decodererr.h
+++ b/include/crypto/conferr.h
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2020-2020 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
@@ -8,28 +8,20 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef OPENSSL_OSSL_DECODERERR_H
-# define OPENSSL_OSSL_DECODERERR_H
+#ifndef OSSL_CRYPTO_CONFERR_H
+# define OSSL_CRYPTO_CONFERR_H
# pragma once
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
-
# ifdef __cplusplus
-extern "C"
+extern "C" {
# endif
-int ERR_load_OSSL_DECODER_strings(void);
-/*
- * OSSL_DECODER function codes.
- */
-# ifndef OPENSSL_NO_DEPRECATED_3_0
-# endif
-
-/*
- * OSSL_DECODER reason codes.
- */
-# define OSSL_DECODER_R_MISSING_GET_PARAMS 100
+int err_load_CONF_strings_int(void);
+# ifdef __cplusplus
+}
+# endif
#endif
diff --git a/include/openssl/decodererr.h b/include/crypto/crmferr.h
similarity index 55%
copy from include/openssl/decodererr.h
copy to include/crypto/crmferr.h
index 8da9157814..fa86a6f006 100644
--- a/include/openssl/decodererr.h
+++ b/include/crypto/crmferr.h
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2020-2020 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
@@ -8,28 +8,23 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef OPENSSL_OSSL_DECODERERR_H
-# define OPENSSL_OSSL_DECODERERR_H
+#ifndef OSSL_CRYPTO_CRMFERR_H
+# define OSSL_CRYPTO_CRMFERR_H
# pragma once
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
-
# ifdef __cplusplus
-extern "C"
+extern "C" {
# endif
-int ERR_load_OSSL_DECODER_strings(void);
-/*
- * OSSL_DECODER function codes.
- */
-# ifndef OPENSSL_NO_DEPRECATED_3_0
-# endif
+# ifndef OPENSSL_NO_CRMF
-/*
- * OSSL_DECODER reason codes.
- */
-# define OSSL_DECODER_R_MISSING_GET_PARAMS 100
+int err_load_CRMF_strings_int(void);
+# endif
+# ifdef __cplusplus
+}
+# endif
#endif
diff --git a/include/openssl/decodererr.h b/include/crypto/cryptoerr.h
similarity index 55%
copy from include/openssl/decodererr.h
copy to include/crypto/cryptoerr.h
index 8da9157814..419ca1aac1 100644
--- a/include/openssl/decodererr.h
+++ b/include/crypto/cryptoerr.h
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2020-2020 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
@@ -8,28 +8,20 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef OPENSSL_OSSL_DECODERERR_H
-# define OPENSSL_OSSL_DECODERERR_H
+#ifndef OSSL_CRYPTO_CRYPTOERR_H
+# define OSSL_CRYPTO_CRYPTOERR_H
# pragma once
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
-
# ifdef __cplusplus
-extern "C"
+extern "C" {
# endif
-int ERR_load_OSSL_DECODER_strings(void);
-/*
- * OSSL_DECODER function codes.
- */
-# ifndef OPENSSL_NO_DEPRECATED_3_0
-# endif
-
-/*
- * OSSL_DECODER reason codes.
- */
-# define OSSL_DECODER_R_MISSING_GET_PARAMS 100
+int err_load_CRYPTO_strings_int(void);
+# ifdef __cplusplus
+}
+# endif
#endif
diff --git a/include/openssl/decodererr.h b/include/crypto/cterr.h
similarity index 55%
copy from include/openssl/decodererr.h
copy to include/crypto/cterr.h
index 8da9157814..3860508cdf 100644
--- a/include/openssl/decodererr.h
+++ b/include/crypto/cterr.h
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2020-2020 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
@@ -8,28 +8,23 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef OPENSSL_OSSL_DECODERERR_H
-# define OPENSSL_OSSL_DECODERERR_H
+#ifndef OSSL_CRYPTO_CTERR_H
+# define OSSL_CRYPTO_CTERR_H
# pragma once
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
-
# ifdef __cplusplus
-extern "C"
+extern "C" {
# endif
-int ERR_load_OSSL_DECODER_strings(void);
-/*
- * OSSL_DECODER function codes.
- */
-# ifndef OPENSSL_NO_DEPRECATED_3_0
-# endif
+# ifndef OPENSSL_NO_CT
-/*
- * OSSL_DECODER reason codes.
- */
-# define OSSL_DECODER_R_MISSING_GET_PARAMS 100
+int err_load_CT_strings_int(void);
+# endif
+# ifdef __cplusplus
+}
+# endif
#endif
diff --git a/include/openssl/decodererr.h b/include/crypto/decodererr.h
similarity index 55%
copy from include/openssl/decodererr.h
copy to include/crypto/decodererr.h
index 8da9157814..f4f8b97cf6 100644
--- a/include/openssl/decodererr.h
+++ b/include/crypto/decodererr.h
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2020-2020 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
@@ -8,28 +8,20 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef OPENSSL_OSSL_DECODERERR_H
-# define OPENSSL_OSSL_DECODERERR_H
+#ifndef OSSL_CRYPTO_DECODERERR_H
+# define OSSL_CRYPTO_DECODERERR_H
# pragma once
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
-
# ifdef __cplusplus
-extern "C"
+extern "C" {
# endif
-int ERR_load_OSSL_DECODER_strings(void);
-/*
- * OSSL_DECODER function codes.
- */
-# ifndef OPENSSL_NO_DEPRECATED_3_0
-# endif
-
-/*
- * OSSL_DECODER reason codes.
- */
-# define OSSL_DECODER_R_MISSING_GET_PARAMS 100
+int err_load_OSSL_DECODER_strings_int(void);
+# ifdef __cplusplus
+}
+# endif
#endif
diff --git a/include/openssl/decodererr.h b/include/crypto/dherr.h
similarity index 55%
copy from include/openssl/decodererr.h
copy to include/crypto/dherr.h
index 8da9157814..93de53d2bc 100644
--- a/include/openssl/decodererr.h
+++ b/include/crypto/dherr.h
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2020-2020 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
@@ -8,28 +8,23 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef OPENSSL_OSSL_DECODERERR_H
-# define OPENSSL_OSSL_DECODERERR_H
+#ifndef OSSL_CRYPTO_DHERR_H
+# define OSSL_CRYPTO_DHERR_H
# pragma once
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
-
# ifdef __cplusplus
-extern "C"
+extern "C" {
# endif
-int ERR_load_OSSL_DECODER_strings(void);
-/*
- * OSSL_DECODER function codes.
- */
-# ifndef OPENSSL_NO_DEPRECATED_3_0
-# endif
+# ifndef OPENSSL_NO_DH
-/*
- * OSSL_DECODER reason codes.
- */
-# define OSSL_DECODER_R_MISSING_GET_PARAMS 100
+int err_load_DH_strings_int(void);
+# endif
+# ifdef __cplusplus
+}
+# endif
#endif
diff --git a/include/openssl/decodererr.h b/include/crypto/dsaerr.h
similarity index 55%
copy from include/openssl/decodererr.h
copy to include/crypto/dsaerr.h
index 8da9157814..be4bbb0d60 100644
--- a/include/openssl/decodererr.h
+++ b/include/crypto/dsaerr.h
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2020-2020 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
@@ -8,28 +8,23 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef OPENSSL_OSSL_DECODERERR_H
-# define OPENSSL_OSSL_DECODERERR_H
+#ifndef OSSL_CRYPTO_DSAERR_H
+# define OSSL_CRYPTO_DSAERR_H
# pragma once
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
-
# ifdef __cplusplus
-extern "C"
+extern "C" {
# endif
-int ERR_load_OSSL_DECODER_strings(void);
-/*
- * OSSL_DECODER function codes.
- */
-# ifndef OPENSSL_NO_DEPRECATED_3_0
-# endif
+# ifndef OPENSSL_NO_DSA
-/*
- * OSSL_DECODER reason codes.
- */
-# define OSSL_DECODER_R_MISSING_GET_PARAMS 100
+int err_load_DSA_strings_int(void);
+# endif
+# ifdef __cplusplus
+}
+# endif
#endif
diff --git a/include/openssl/decodererr.h b/include/crypto/ecerr.h
similarity index 55%
copy from include/openssl/decodererr.h
copy to include/crypto/ecerr.h
index 8da9157814..ccf64fd248 100644
--- a/include/openssl/decodererr.h
+++ b/include/crypto/ecerr.h
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2020-2020 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
@@ -8,28 +8,23 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef OPENSSL_OSSL_DECODERERR_H
-# define OPENSSL_OSSL_DECODERERR_H
+#ifndef OSSL_CRYPTO_ECERR_H
+# define OSSL_CRYPTO_ECERR_H
# pragma once
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
-
# ifdef __cplusplus
-extern "C"
+extern "C" {
# endif
-int ERR_load_OSSL_DECODER_strings(void);
-/*
- * OSSL_DECODER function codes.
- */
-# ifndef OPENSSL_NO_DEPRECATED_3_0
-# endif
+# ifndef OPENSSL_NO_EC
-/*
- * OSSL_DECODER reason codes.
- */
-# define OSSL_DECODER_R_MISSING_GET_PARAMS 100
+int err_load_EC_strings_int(void);
+# endif
+# ifdef __cplusplus
+}
+# endif
#endif
diff --git a/include/openssl/decodererr.h b/include/crypto/encodererr.h
similarity index 55%
copy from include/openssl/decodererr.h
copy to include/crypto/encodererr.h
index 8da9157814..656c033245 100644
--- a/include/openssl/decodererr.h
+++ b/include/crypto/encodererr.h
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2020-2020 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
@@ -8,28 +8,20 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef OPENSSL_OSSL_DECODERERR_H
-# define OPENSSL_OSSL_DECODERERR_H
+#ifndef OSSL_CRYPTO_ENCODERERR_H
+# define OSSL_CRYPTO_ENCODERERR_H
# pragma once
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
-
# ifdef __cplusplus
-extern "C"
+extern "C" {
# endif
-int ERR_load_OSSL_DECODER_strings(void);
-/*
- * OSSL_DECODER function codes.
- */
-# ifndef OPENSSL_NO_DEPRECATED_3_0
-# endif
-
-/*
- * OSSL_DECODER reason codes.
- */
-# define OSSL_DECODER_R_MISSING_GET_PARAMS 100
+int err_load_OSSL_ENCODER_strings_int(void);
+# ifdef __cplusplus
+}
+# endif
#endif
diff --git a/include/openssl/decodererr.h b/include/crypto/engineerr.h
similarity index 55%
copy from include/openssl/decodererr.h
copy to include/crypto/engineerr.h
index 8da9157814..ce29b9aab7 100644
--- a/include/openssl/decodererr.h
+++ b/include/crypto/engineerr.h
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2020-2020 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
@@ -8,28 +8,23 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef OPENSSL_OSSL_DECODERERR_H
-# define OPENSSL_OSSL_DECODERERR_H
+#ifndef OSSL_CRYPTO_ENGINEERR_H
+# define OSSL_CRYPTO_ENGINEERR_H
# pragma once
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
-
# ifdef __cplusplus
-extern "C"
+extern "C" {
# endif
-int ERR_load_OSSL_DECODER_strings(void);
-/*
- * OSSL_DECODER function codes.
- */
-# ifndef OPENSSL_NO_DEPRECATED_3_0
-# endif
+# ifndef OPENSSL_NO_ENGINE
-/*
- * OSSL_DECODER reason codes.
- */
-# define OSSL_DECODER_R_MISSING_GET_PARAMS 100
+int err_load_ENGINE_strings_int(void);
+# endif
+# ifdef __cplusplus
+}
+# endif
#endif
diff --git a/include/crypto/err.h b/include/crypto/err.h
index 527f19667d..d4c32bcf67 100644
--- a/include/crypto/err.h
+++ b/include/crypto/err.h
@@ -10,6 +10,7 @@
#ifndef OSSL_CRYPTO_ERR_H
# define OSSL_CRYPTO_ERR_H
+int err_load_ERR_strings_int(void);
int err_load_crypto_strings_int(void);
void err_cleanup(void);
int err_shelve_state(void **);
diff --git a/include/openssl/decodererr.h b/include/crypto/esserr.h
similarity index 55%
copy from include/openssl/decodererr.h
copy to include/crypto/esserr.h
index 8da9157814..91657e6e0b 100644
--- a/include/openssl/decodererr.h
+++ b/include/crypto/esserr.h
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2020-2020 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
@@ -8,28 +8,20 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef OPENSSL_OSSL_DECODERERR_H
-# define OPENSSL_OSSL_DECODERERR_H
+#ifndef OSSL_CRYPTO_ESSERR_H
+# define OSSL_CRYPTO_ESSERR_H
# pragma once
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
-
# ifdef __cplusplus
-extern "C"
+extern "C" {
# endif
-int ERR_load_OSSL_DECODER_strings(void);
-/*
- * OSSL_DECODER function codes.
- */
-# ifndef OPENSSL_NO_DEPRECATED_3_0
-# endif
-
-/*
- * OSSL_DECODER reason codes.
- */
-# define OSSL_DECODER_R_MISSING_GET_PARAMS 100
+int err_load_ESS_strings_int(void);
+# ifdef __cplusplus
+}
+# endif
#endif
diff --git a/include/openssl/decodererr.h b/include/crypto/evperr.h
similarity index 55%
copy from include/openssl/decodererr.h
copy to include/crypto/evperr.h
index 8da9157814..2bfc71ad3c 100644
--- a/include/openssl/decodererr.h
+++ b/include/crypto/evperr.h
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2020-2020 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
@@ -8,28 +8,20 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef OPENSSL_OSSL_DECODERERR_H
-# define OPENSSL_OSSL_DECODERERR_H
+#ifndef OSSL_CRYPTO_EVPERR_H
+# define OSSL_CRYPTO_EVPERR_H
# pragma once
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
-
# ifdef __cplusplus
-extern "C"
+extern "C" {
# endif
-int ERR_load_OSSL_DECODER_strings(void);
-/*
- * OSSL_DECODER function codes.
- */
-# ifndef OPENSSL_NO_DEPRECATED_3_0
-# endif
-
-/*
- * OSSL_DECODER reason codes.
- */
-# define OSSL_DECODER_R_MISSING_GET_PARAMS 100
+int err_load_EVP_strings_int(void);
+# ifdef __cplusplus
+}
+# endif
#endif
diff --git a/include/openssl/decodererr.h b/include/crypto/httperr.h
similarity index 55%
copy from include/openssl/decodererr.h
copy to include/crypto/httperr.h
index 8da9157814..017d01da7d 100644
--- a/include/openssl/decodererr.h
+++ b/include/crypto/httperr.h
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2020-2020 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
@@ -8,28 +8,20 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef OPENSSL_OSSL_DECODERERR_H
-# define OPENSSL_OSSL_DECODERERR_H
+#ifndef OSSL_CRYPTO_HTTPERR_H
+# define OSSL_CRYPTO_HTTPERR_H
# pragma once
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
-
# ifdef __cplusplus
-extern "C"
+extern "C" {
# endif
-int ERR_load_OSSL_DECODER_strings(void);
-/*
- * OSSL_DECODER function codes.
- */
-# ifndef OPENSSL_NO_DEPRECATED_3_0
-# endif
-
-/*
- * OSSL_DECODER reason codes.
- */
-# define OSSL_DECODER_R_MISSING_GET_PARAMS 100
+int err_load_HTTP_strings_int(void);
+# ifdef __cplusplus
+}
+# endif
#endif
diff --git a/include/openssl/decodererr.h b/include/crypto/objectserr.h
similarity index 55%
copy from include/openssl/decodererr.h
copy to include/crypto/objectserr.h
index 8da9157814..1e0e58af25 100644
--- a/include/openssl/decodererr.h
+++ b/include/crypto/objectserr.h
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2020-2020 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
@@ -8,28 +8,20 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef OPENSSL_OSSL_DECODERERR_H
-# define OPENSSL_OSSL_DECODERERR_H
+#ifndef OSSL_CRYPTO_OBJECTSERR_H
+# define OSSL_CRYPTO_OBJECTSERR_H
# pragma once
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
-
# ifdef __cplusplus
-extern "C"
+extern "C" {
# endif
-int ERR_load_OSSL_DECODER_strings(void);
-/*
- * OSSL_DECODER function codes.
- */
-# ifndef OPENSSL_NO_DEPRECATED_3_0
-# endif
-
-/*
- * OSSL_DECODER reason codes.
- */
-# define OSSL_DECODER_R_MISSING_GET_PARAMS 100
+int err_load_OBJ_strings_int(void);
+# ifdef __cplusplus
+}
+# endif
#endif
diff --git a/include/openssl/decodererr.h b/include/crypto/ocsperr.h
similarity index 55%
copy from include/openssl/decodererr.h
copy to include/crypto/ocsperr.h
index 8da9157814..e71b8424b4 100644
--- a/include/openssl/decodererr.h
+++ b/include/crypto/ocsperr.h
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2020-2020 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
@@ -8,28 +8,23 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef OPENSSL_OSSL_DECODERERR_H
-# define OPENSSL_OSSL_DECODERERR_H
+#ifndef OSSL_CRYPTO_OCSPERR_H
+# define OSSL_CRYPTO_OCSPERR_H
# pragma once
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
-
# ifdef __cplusplus
-extern "C"
+extern "C" {
# endif
-int ERR_load_OSSL_DECODER_strings(void);
-/*
- * OSSL_DECODER function codes.
- */
-# ifndef OPENSSL_NO_DEPRECATED_3_0
-# endif
+# ifndef OPENSSL_NO_OCSP
-/*
- * OSSL_DECODER reason codes.
- */
-# define OSSL_DECODER_R_MISSING_GET_PARAMS 100
+int err_load_OCSP_strings_int(void);
+# endif
+# ifdef __cplusplus
+}
+# endif
#endif
diff --git a/include/openssl/decodererr.h b/include/crypto/pemerr.h
similarity index 55%
copy from include/openssl/decodererr.h
copy to include/crypto/pemerr.h
index 8da9157814..202369a964 100644
--- a/include/openssl/decodererr.h
+++ b/include/crypto/pemerr.h
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2020-2020 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
@@ -8,28 +8,20 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef OPENSSL_OSSL_DECODERERR_H
-# define OPENSSL_OSSL_DECODERERR_H
+#ifndef OSSL_CRYPTO_PEMERR_H
+# define OSSL_CRYPTO_PEMERR_H
# pragma once
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
-
# ifdef __cplusplus
-extern "C"
+extern "C" {
# endif
-int ERR_load_OSSL_DECODER_strings(void);
-/*
- * OSSL_DECODER function codes.
- */
-# ifndef OPENSSL_NO_DEPRECATED_3_0
-# endif
-
-/*
- * OSSL_DECODER reason codes.
- */
-# define OSSL_DECODER_R_MISSING_GET_PARAMS 100
+int err_load_PEM_strings_int(void);
+# ifdef __cplusplus
+}
+# endif
#endif
diff --git a/include/openssl/decodererr.h b/include/crypto/pkcs12err.h
similarity index 55%
copy from include/openssl/decodererr.h
copy to include/crypto/pkcs12err.h
index 8da9157814..23d19357ec 100644
--- a/include/openssl/decodererr.h
+++ b/include/crypto/pkcs12err.h
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2020-2020 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
@@ -8,28 +8,20 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef OPENSSL_OSSL_DECODERERR_H
-# define OPENSSL_OSSL_DECODERERR_H
+#ifndef OSSL_CRYPTO_PKCS12ERR_H
+# define OSSL_CRYPTO_PKCS12ERR_H
# pragma once
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
-
# ifdef __cplusplus
-extern "C"
+extern "C" {
# endif
-int ERR_load_OSSL_DECODER_strings(void);
-/*
- * OSSL_DECODER function codes.
- */
-# ifndef OPENSSL_NO_DEPRECATED_3_0
-# endif
-
-/*
- * OSSL_DECODER reason codes.
- */
-# define OSSL_DECODER_R_MISSING_GET_PARAMS 100
+int err_load_PKCS12_strings_int(void);
+# ifdef __cplusplus
+}
+# endif
#endif
diff --git a/include/openssl/decodererr.h b/include/crypto/pkcs7err.h
similarity index 55%
copy from include/openssl/decodererr.h
copy to include/crypto/pkcs7err.h
index 8da9157814..4880a5df93 100644
--- a/include/openssl/decodererr.h
+++ b/include/crypto/pkcs7err.h
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2020-2020 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
@@ -8,28 +8,20 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef OPENSSL_OSSL_DECODERERR_H
-# define OPENSSL_OSSL_DECODERERR_H
+#ifndef OSSL_CRYPTO_PKCS7ERR_H
+# define OSSL_CRYPTO_PKCS7ERR_H
# pragma once
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
-
# ifdef __cplusplus
-extern "C"
+extern "C" {
# endif
-int ERR_load_OSSL_DECODER_strings(void);
-/*
- * OSSL_DECODER function codes.
- */
-# ifndef OPENSSL_NO_DEPRECATED_3_0
-# endif
-
-/*
- * OSSL_DECODER reason codes.
- */
-# define OSSL_DECODER_R_MISSING_GET_PARAMS 100
+int err_load_PKCS7_strings_int(void);
+# ifdef __cplusplus
+}
+# endif
#endif
diff --git a/include/openssl/decodererr.h b/include/crypto/randerr.h
similarity index 55%
copy from include/openssl/decodererr.h
copy to include/crypto/randerr.h
index 8da9157814..63e4f7db54 100644
--- a/include/openssl/decodererr.h
+++ b/include/crypto/randerr.h
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2020-2020 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
@@ -8,28 +8,20 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef OPENSSL_OSSL_DECODERERR_H
-# define OPENSSL_OSSL_DECODERERR_H
+#ifndef OSSL_CRYPTO_RANDERR_H
+# define OSSL_CRYPTO_RANDERR_H
# pragma once
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
-
# ifdef __cplusplus
-extern "C"
+extern "C" {
# endif
-int ERR_load_OSSL_DECODER_strings(void);
-/*
- * OSSL_DECODER function codes.
- */
-# ifndef OPENSSL_NO_DEPRECATED_3_0
-# endif
-
-/*
- * OSSL_DECODER reason codes.
- */
-# define OSSL_DECODER_R_MISSING_GET_PARAMS 100
+int err_load_RAND_strings_int(void);
+# ifdef __cplusplus
+}
+# endif
#endif
diff --git a/include/openssl/decodererr.h b/include/crypto/rsaerr.h
similarity index 55%
copy from include/openssl/decodererr.h
copy to include/crypto/rsaerr.h
index 8da9157814..0c410f0db6 100644
--- a/include/openssl/decodererr.h
+++ b/include/crypto/rsaerr.h
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2020-2020 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
@@ -8,28 +8,20 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef OPENSSL_OSSL_DECODERERR_H
-# define OPENSSL_OSSL_DECODERERR_H
+#ifndef OSSL_CRYPTO_RSAERR_H
+# define OSSL_CRYPTO_RSAERR_H
# pragma once
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
-
# ifdef __cplusplus
-extern "C"
+extern "C" {
# endif
-int ERR_load_OSSL_DECODER_strings(void);
-/*
- * OSSL_DECODER function codes.
- */
-# ifndef OPENSSL_NO_DEPRECATED_3_0
-# endif
-
-/*
- * OSSL_DECODER reason codes.
- */
-# define OSSL_DECODER_R_MISSING_GET_PARAMS 100
+int err_load_RSA_strings_int(void);
+# ifdef __cplusplus
+}
+# endif
#endif
diff --git a/include/crypto/sm2err.h b/include/crypto/sm2err.h
index bbbb0cfecf..c82d92a13b 100644
--- a/include/crypto/sm2err.h
+++ b/include/crypto/sm2err.h
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2020-2020 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
@@ -8,26 +8,25 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef OPENSSL_SM2ERR_H
-# define OPENSSL_SM2ERR_H
+#ifndef OSSL_CRYPTO_SM2ERR_H
+# define OSSL_CRYPTO_SM2ERR_H
+# pragma once
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
-
-# include <openssl/opensslconf.h>
+# ifdef __cplusplus
+extern "C" {
+# endif
# ifndef OPENSSL_NO_SM2
-# ifdef __cplusplus
-extern "C"
-# endif
-int ERR_load_SM2_strings(void);
+int err_load_SM2_strings_int(void);
/*
* SM2 function codes.
*/
-# ifndef OPENSSL_NO_DEPRECATED_3_0
+# ifndef OPENSSL_NO_DEPRECATED_3_0
# define SM2_F_PKEY_SM2_COPY 0
# define SM2_F_PKEY_SM2_CTRL 0
# define SM2_F_PKEY_SM2_CTRL_STR 0
@@ -46,7 +45,7 @@ int ERR_load_SM2_strings(void);
# define SM2_F_SM2_SIG_GEN 0
# define SM2_F_SM2_SIG_VERIFY 0
# define SM2_F_SM2_VERIFY 0
-# endif
+# endif
/*
* SM2 reason codes.
@@ -65,5 +64,9 @@ int ERR_load_SM2_strings(void);
# define SM2_R_NO_PARAMETERS_SET 109
# define SM2_R_USER_ID_TOO_LARGE 106
+# endif
+
+# ifdef __cplusplus
+}
# endif
#endif
diff --git a/include/openssl/decodererr.h b/include/crypto/storeerr.h
similarity index 55%
copy from include/openssl/decodererr.h
copy to include/crypto/storeerr.h
index 8da9157814..133dda2208 100644
--- a/include/openssl/decodererr.h
+++ b/include/crypto/storeerr.h
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2020-2020 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
@@ -8,28 +8,20 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef OPENSSL_OSSL_DECODERERR_H
-# define OPENSSL_OSSL_DECODERERR_H
+#ifndef OSSL_CRYPTO_STOREERR_H
+# define OSSL_CRYPTO_STOREERR_H
# pragma once
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
-
# ifdef __cplusplus
-extern "C"
+extern "C" {
# endif
-int ERR_load_OSSL_DECODER_strings(void);
-/*
- * OSSL_DECODER function codes.
- */
-# ifndef OPENSSL_NO_DEPRECATED_3_0
-# endif
-
-/*
- * OSSL_DECODER reason codes.
- */
-# define OSSL_DECODER_R_MISSING_GET_PARAMS 100
+int err_load_OSSL_STORE_strings_int(void);
+# ifdef __cplusplus
+}
+# endif
#endif
diff --git a/include/openssl/decodererr.h b/include/crypto/tserr.h
similarity index 55%
copy from include/openssl/decodererr.h
copy to include/crypto/tserr.h
index 8da9157814..2cb6dee5c5 100644
--- a/include/openssl/decodererr.h
+++ b/include/crypto/tserr.h
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2020-2020 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
@@ -8,28 +8,23 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef OPENSSL_OSSL_DECODERERR_H
-# define OPENSSL_OSSL_DECODERERR_H
+#ifndef OSSL_CRYPTO_TSERR_H
+# define OSSL_CRYPTO_TSERR_H
# pragma once
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
-
# ifdef __cplusplus
-extern "C"
+extern "C" {
# endif
-int ERR_load_OSSL_DECODER_strings(void);
-/*
- * OSSL_DECODER function codes.
- */
-# ifndef OPENSSL_NO_DEPRECATED_3_0
-# endif
+# ifndef OPENSSL_NO_TS
-/*
- * OSSL_DECODER reason codes.
- */
-# define OSSL_DECODER_R_MISSING_GET_PARAMS 100
+int err_load_TS_strings_int(void);
+# endif
+# ifdef __cplusplus
+}
+# endif
#endif
diff --git a/include/openssl/decodererr.h b/include/crypto/uierr.h
similarity index 55%
copy from include/openssl/decodererr.h
copy to include/crypto/uierr.h
index 8da9157814..733b6f05fd 100644
--- a/include/openssl/decodererr.h
+++ b/include/crypto/uierr.h
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2020-2020 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
@@ -8,28 +8,20 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef OPENSSL_OSSL_DECODERERR_H
-# define OPENSSL_OSSL_DECODERERR_H
+#ifndef OSSL_CRYPTO_UIERR_H
+# define OSSL_CRYPTO_UIERR_H
# pragma once
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
-
# ifdef __cplusplus
-extern "C"
+extern "C" {
# endif
-int ERR_load_OSSL_DECODER_strings(void);
-/*
- * OSSL_DECODER function codes.
- */
-# ifndef OPENSSL_NO_DEPRECATED_3_0
-# endif
-
-/*
- * OSSL_DECODER reason codes.
- */
-# define OSSL_DECODER_R_MISSING_GET_PARAMS 100
+int err_load_UI_strings_int(void);
+# ifdef __cplusplus
+}
+# endif
#endif
diff --git a/include/openssl/decodererr.h b/include/crypto/x509err.h
similarity index 55%
copy from include/openssl/decodererr.h
copy to include/crypto/x509err.h
index 8da9157814..8115629464 100644
--- a/include/openssl/decodererr.h
+++ b/include/crypto/x509err.h
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2020-2020 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
@@ -8,28 +8,20 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef OPENSSL_OSSL_DECODERERR_H
-# define OPENSSL_OSSL_DECODERERR_H
+#ifndef OSSL_CRYPTO_X509ERR_H
+# define OSSL_CRYPTO_X509ERR_H
# pragma once
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
-
# ifdef __cplusplus
-extern "C"
+extern "C" {
# endif
-int ERR_load_OSSL_DECODER_strings(void);
-/*
- * OSSL_DECODER function codes.
- */
-# ifndef OPENSSL_NO_DEPRECATED_3_0
-# endif
-
-/*
- * OSSL_DECODER reason codes.
- */
-# define OSSL_DECODER_R_MISSING_GET_PARAMS 100
+int err_load_X509_strings_int(void);
+# ifdef __cplusplus
+}
+# endif
#endif
diff --git a/include/openssl/decodererr.h b/include/crypto/x509v3err.h
similarity index 55%
copy from include/openssl/decodererr.h
copy to include/crypto/x509v3err.h
index 8da9157814..1ff98b92f3 100644
--- a/include/openssl/decodererr.h
+++ b/include/crypto/x509v3err.h
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2020-2020 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
@@ -8,28 +8,20 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef OPENSSL_OSSL_DECODERERR_H
-# define OPENSSL_OSSL_DECODERERR_H
+#ifndef OSSL_CRYPTO_X509V3ERR_H
+# define OSSL_CRYPTO_X509V3ERR_H
# pragma once
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
-
# ifdef __cplusplus
-extern "C"
+extern "C" {
# endif
-int ERR_load_OSSL_DECODER_strings(void);
-/*
- * OSSL_DECODER function codes.
- */
-# ifndef OPENSSL_NO_DEPRECATED_3_0
-# endif
-
-/*
- * OSSL_DECODER reason codes.
- */
-# define OSSL_DECODER_R_MISSING_GET_PARAMS 100
+int err_load_X509V3_strings_int(void);
+# ifdef __cplusplus
+}
+# endif
#endif
diff --git a/include/internal/dso.h b/include/internal/dso.h
index 76cb3c6e0a..214362f692 100644
--- a/include/internal/dso.h
+++ b/include/internal/dso.h
@@ -160,6 +160,4 @@ DSO *DSO_dsobyaddr(void *addr, int flags);
*/
void *DSO_global_lookup(const char *name);
-int ERR_load_DSO_strings(void);
-
#endif
diff --git a/include/internal/dsoerr.h b/include/internal/dsoerr.h
index ce9c8f0cf3..031e6798d3 100644
--- a/include/internal/dsoerr.h
+++ b/include/internal/dsoerr.h
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2020-2020 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
@@ -10,15 +10,16 @@
#ifndef OSSL_INTERNAL_DSOERR_H
# define OSSL_INTERNAL_DSOERR_H
+# pragma once
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
-
# ifdef __cplusplus
-extern "C"
+extern "C" {
# endif
-int ERR_load_DSO_strings(void);
+
+int err_load_DSO_strings_int(void);
/*
* DSO function codes.
@@ -81,4 +82,8 @@ int ERR_load_DSO_strings(void);
# define DSO_R_UNLOAD_FAILED 107
# define DSO_R_UNSUPPORTED 108
+
+# ifdef __cplusplus
+}
+# endif
#endif
diff --git a/include/internal/propertyerr.h b/include/internal/propertyerr.h
index 52c8fad9d5..b0ec266ded 100644
--- a/include/internal/propertyerr.h
+++ b/include/internal/propertyerr.h
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2020-2020 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
@@ -10,15 +10,16 @@
#ifndef OSSL_INTERNAL_PROPERTYERR_H
# define OSSL_INTERNAL_PROPERTYERR_H
+# pragma once
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
-
# ifdef __cplusplus
-extern "C"
+extern "C" {
# endif
-int ERR_load_PROP_strings(void);
+
+int err_load_PROP_strings_int(void);
/*
* PROP function codes.
@@ -49,4 +50,8 @@ int ERR_load_PROP_strings(void);
# define PROP_R_STRING_TOO_LONG 109
# define PROP_R_TRAILING_CHARACTERS 110
+
+# ifdef __cplusplus
+}
+# endif
#endif
diff --git a/include/openssl/asn1err.h b/include/openssl/asn1err.h
index a29722e868..08281187ef 100644
--- a/include/openssl/asn1err.h
+++ b/include/openssl/asn1err.h
@@ -14,12 +14,9 @@
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
+# include <openssl/cryptoerr_legacy.h>
-# ifdef __cplusplus
-extern "C"
-# endif
-int ERR_load_ASN1_strings(void);
/*
* ASN1 function codes.
diff --git a/include/openssl/asyncerr.h b/include/openssl/asyncerr.h
index 4dcd5495e8..e69ed42433 100644
--- a/include/openssl/asyncerr.h
+++ b/include/openssl/asyncerr.h
@@ -14,12 +14,9 @@
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
+# include <openssl/cryptoerr_legacy.h>
-# ifdef __cplusplus
-extern "C"
-# endif
-int ERR_load_ASYNC_strings(void);
/*
* ASYNC function codes.
diff --git a/include/openssl/bioerr.h b/include/openssl/bioerr.h
index 7c51cceb7e..00a7df227e 100644
--- a/include/openssl/bioerr.h
+++ b/include/openssl/bioerr.h
@@ -14,12 +14,9 @@
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
+# include <openssl/cryptoerr_legacy.h>
-# ifdef __cplusplus
-extern "C"
-# endif
-int ERR_load_BIO_strings(void);
/*
* BIO function codes.
diff --git a/include/openssl/bnerr.h b/include/openssl/bnerr.h
index d5c442a400..59f3e6fae4 100644
--- a/include/openssl/bnerr.h
+++ b/include/openssl/bnerr.h
@@ -14,12 +14,9 @@
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
+# include <openssl/cryptoerr_legacy.h>
-# ifdef __cplusplus
-extern "C"
-# endif
-int ERR_load_BN_strings(void);
/*
* BN function codes.
@@ -46,6 +43,7 @@ int ERR_load_BN_strings(void);
# define BN_F_BN_GENCB_NEW 0
# define BN_F_BN_GENERATE_DSA_NONCE 0
# define BN_F_BN_GENERATE_PRIME_EX 0
+# define BN_F_BN_GENERATE_PRIME_EX2 0
# define BN_F_BN_GF2M_MOD 0
# define BN_F_BN_GF2M_MOD_EXP 0
# define BN_F_BN_GF2M_MOD_MUL 0
diff --git a/include/openssl/buffererr.h b/include/openssl/buffererr.h
index 09364b5365..27222edc32 100644
--- a/include/openssl/buffererr.h
+++ b/include/openssl/buffererr.h
@@ -14,12 +14,9 @@
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
+# include <openssl/cryptoerr_legacy.h>
-# ifdef __cplusplus
-extern "C"
-# endif
-int ERR_load_BUF_strings(void);
/*
* BUF function codes.
diff --git a/include/openssl/cmperr.h b/include/openssl/cmperr.h
index 190e1a96bd..d875f906d7 100644
--- a/include/openssl/cmperr.h
+++ b/include/openssl/cmperr.h
@@ -14,22 +14,17 @@
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
+# include <openssl/cryptoerr_legacy.h>
-# include <openssl/opensslconf.h>
-
# ifndef OPENSSL_NO_CMP
-# ifdef __cplusplus
-extern "C"
-# endif
-int ERR_load_CMP_strings(void);
/*
* CMP function codes.
*/
-# ifndef OPENSSL_NO_DEPRECATED_3_0
-# endif
+# ifndef OPENSSL_NO_DEPRECATED_3_0
+# endif
/*
* CMP reason codes.
diff --git a/include/openssl/cmserr.h b/include/openssl/cmserr.h
index e234ad0126..68e40f880f 100644
--- a/include/openssl/cmserr.h
+++ b/include/openssl/cmserr.h
@@ -14,21 +14,16 @@
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
+# include <openssl/cryptoerr_legacy.h>
-# include <openssl/opensslconf.h>
-
# ifndef OPENSSL_NO_CMS
-# ifdef __cplusplus
-extern "C"
-# endif
-int ERR_load_CMS_strings(void);
/*
* CMS function codes.
*/
-# ifndef OPENSSL_NO_DEPRECATED_3_0
+# ifndef OPENSSL_NO_DEPRECATED_3_0
# define CMS_F_CHECK_CONTENT 0
# define CMS_F_CMS_ADD0_CERT 0
# define CMS_F_CMS_ADD0_RECIPIENT_KEY 0
@@ -121,7 +116,7 @@ int ERR_load_CMS_strings(void);
# define CMS_F_CMS_VERIFY 0
# define CMS_F_ESS_CHECK_SIGNING_CERTS 0
# define CMS_F_KEK_UNWRAP_KEY 0
-# endif
+# endif
/*
* CMS reason codes.
diff --git a/include/openssl/comperr.h b/include/openssl/comperr.h
index 588457450d..7933e372a0 100644
--- a/include/openssl/comperr.h
+++ b/include/openssl/comperr.h
@@ -14,27 +14,22 @@
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
+# include <openssl/cryptoerr_legacy.h>
-# include <openssl/opensslconf.h>
-
# ifndef OPENSSL_NO_COMP
-# ifdef __cplusplus
-extern "C"
-# endif
-int ERR_load_COMP_strings(void);
/*
* COMP function codes.
*/
-# ifndef OPENSSL_NO_DEPRECATED_3_0
+# ifndef OPENSSL_NO_DEPRECATED_3_0
# define COMP_F_BIO_ZLIB_FLUSH 0
# define COMP_F_BIO_ZLIB_NEW 0
# define COMP_F_BIO_ZLIB_READ 0
# define COMP_F_BIO_ZLIB_WRITE 0
# define COMP_F_COMP_CTX_NEW 0
-# endif
+# endif
/*
* COMP reason codes.
diff --git a/include/openssl/conferr.h b/include/openssl/conferr.h
index 80bf53f365..f16d65daa8 100644
--- a/include/openssl/conferr.h
+++ b/include/openssl/conferr.h
@@ -14,12 +14,9 @@
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
+# include <openssl/cryptoerr_legacy.h>
-# ifdef __cplusplus
-extern "C"
-# endif
-int ERR_load_CONF_strings(void);
/*
* CONF function codes.
diff --git a/include/openssl/crmferr.h b/include/openssl/crmferr.h
index a4c194e094..47bf3e41ff 100644
--- a/include/openssl/crmferr.h
+++ b/include/openssl/crmferr.h
@@ -14,21 +14,16 @@
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
+# include <openssl/cryptoerr_legacy.h>
-# include <openssl/opensslconf.h>
-
# ifndef OPENSSL_NO_CRMF
-# ifdef __cplusplus
-extern "C"
-# endif
-int ERR_load_CRMF_strings(void);
/*
* CRMF function codes.
*/
-# ifndef OPENSSL_NO_DEPRECATED_3_0
+# ifndef OPENSSL_NO_DEPRECATED_3_0
# define CRMF_F_CRMF_POPOSIGNINGKEY_INIT 0
# define CRMF_F_OSSL_CRMF_CERTID_GEN 0
# define CRMF_F_OSSL_CRMF_CERTTEMPLATE_FILL 0
@@ -43,12 +38,12 @@ int ERR_load_CRMF_strings(void);
# define CRMF_F_OSSL_CRMF_MSG_PUSH0_REGINFO 0
# define CRMF_F_OSSL_CRMF_MSG_SET0_EXTENSIONS 0
# define CRMF_F_OSSL_CRMF_MSG_SET0_SINGLEPUBINFO 0
+# define CRMF_F_OSSL_CRMF_MSG_SET0_VALIDITY 0
# define CRMF_F_OSSL_CRMF_MSG_SET_CERTREQID 0
# define CRMF_F_OSSL_CRMF_MSG_SET_PKIPUBLICATIONINFO_ACTION 0
-# define CRMF_F_OSSL_CRMF_MSG_SET0_VALIDITY 0
# define CRMF_F_OSSL_CRMF_PBMP_NEW 0
# define CRMF_F_OSSL_CRMF_PBM_NEW 0
-# endif
+# endif
/*
* CRMF reason codes.
diff --git a/include/openssl/cryptoerr.h b/include/openssl/cryptoerr.h
index 6add92a9ca..971ae122b9 100644
--- a/include/openssl/cryptoerr.h
+++ b/include/openssl/cryptoerr.h
@@ -14,12 +14,9 @@
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
+# include <openssl/cryptoerr_legacy.h>
-# ifdef __cplusplus
-extern "C"
-# endif
-int ERR_load_CRYPTO_strings(void);
/*
* CRYPTO function codes.
diff --git a/include/openssl/cryptoerr_legacy.h b/include/openssl/cryptoerr_legacy.h
new file mode 100644
index 0000000000..2729afde70
--- /dev/null
+++ b/include/openssl/cryptoerr_legacy.h
@@ -0,0 +1,81 @@
+/*
+ * Copyright 2020 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
+ */
+
+/*
+ * This header file preserves symbols from pre-3.0 OpenSSL.
+ * It should never be included directly, as it's already included
+ * by the public {lib}err.h headers, and since it will go away some
+ * time in the future.
+ */
+
+#ifndef OPENSSL_CRYPTOERR_LEGACY_H
+# define OPENSSL_CRYPTOERR_LEGACY_H
+# pragma once
+
+# include <openssl/macros.h>
+# include <openssl/symhacks.h>
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+# ifndef OPENSSL_NO_DEPRECATED_3_0
+OSSL_DEPRECATEDIN_3_0 int ERR_load_ASN1_strings(void);
+OSSL_DEPRECATEDIN_3_0 int ERR_load_ASYNC_strings(void);
+OSSL_DEPRECATEDIN_3_0 int ERR_load_BIO_strings(void);
+OSSL_DEPRECATEDIN_3_0 int ERR_load_BN_strings(void);
+OSSL_DEPRECATEDIN_3_0 int ERR_load_BUF_strings(void);
+# ifndef OPENSSL_NO_CMS
+OSSL_DEPRECATEDIN_3_0 int ERR_load_CMS_strings(void);
+# endif
+# ifndef OPENSSL_NO_COMP
+OSSL_DEPRECATEDIN_3_0 int ERR_load_COMP_strings(void);
+# endif
+OSSL_DEPRECATEDIN_3_0 int ERR_load_CONF_strings(void);
+OSSL_DEPRECATEDIN_3_0 int ERR_load_CRYPTO_strings(void);
+# ifndef OPENSSL_NO_CT
+OSSL_DEPRECATEDIN_3_0 int ERR_load_CT_strings(void);
+# endif
+# ifndef OPENSSL_NO_DH
+OSSL_DEPRECATEDIN_3_0 int ERR_load_DH_strings(void);
+# endif
+# ifndef OPENSSL_NO_DSA
+OSSL_DEPRECATEDIN_3_0 int ERR_load_DSA_strings(void);
+# endif
+# ifndef OPENSSL_NO_EC
+OSSL_DEPRECATEDIN_3_0 int ERR_load_EC_strings(void);
+# endif
+# ifndef OPENSSL_NO_ENGINE
+OSSL_DEPRECATEDIN_3_0 int ERR_load_ENGINE_strings(void);
+# endif
+OSSL_DEPRECATEDIN_3_0 int ERR_load_ERR_strings(void);
+OSSL_DEPRECATEDIN_3_0 int ERR_load_EVP_strings(void);
+OSSL_DEPRECATEDIN_3_0 int ERR_load_KDF_strings(void);
+OSSL_DEPRECATEDIN_3_0 int ERR_load_OBJ_strings(void);
+# ifndef OPENSSL_NO_OCSP
+OSSL_DEPRECATEDIN_3_0 int ERR_load_OCSP_strings(void);
+# endif
+OSSL_DEPRECATEDIN_3_0 int ERR_load_PEM_strings(void);
+OSSL_DEPRECATEDIN_3_0 int ERR_load_PKCS12_strings(void);
+OSSL_DEPRECATEDIN_3_0 int ERR_load_PKCS7_strings(void);
+OSSL_DEPRECATEDIN_3_0 int ERR_load_RAND_strings(void);
+OSSL_DEPRECATEDIN_3_0 int ERR_load_RSA_strings(void);
+OSSL_DEPRECATEDIN_3_0 int ERR_load_OSSL_STORE_strings(void);
+# ifndef OPENSSL_NO_TS
+OSSL_DEPRECATEDIN_3_0 int ERR_load_TS_strings(void);
+# endif
+OSSL_DEPRECATEDIN_3_0 int ERR_load_UI_strings(void);
+OSSL_DEPRECATEDIN_3_0 int ERR_load_X509_strings(void);
+OSSL_DEPRECATEDIN_3_0 int ERR_load_X509V3_strings(void);
+# endif
+
+# ifdef __cplusplus
+}
+# endif
+#endif
diff --git a/include/openssl/cterr.h b/include/openssl/cterr.h
index ae02edf180..439e8b8363 100644
--- a/include/openssl/cterr.h
+++ b/include/openssl/cterr.h
@@ -14,21 +14,16 @@
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
+# include <openssl/cryptoerr_legacy.h>
-# include <openssl/opensslconf.h>
-
# ifndef OPENSSL_NO_CT
-# ifdef __cplusplus
-extern "C"
-# endif
-int ERR_load_CT_strings(void);
/*
* CT function codes.
*/
-# ifndef OPENSSL_NO_DEPRECATED_3_0
+# ifndef OPENSSL_NO_DEPRECATED_3_0
# define CT_F_CTLOG_NEW 0
# define CT_F_CTLOG_NEW_FROM_BASE64 0
# define CT_F_CTLOG_NEW_FROM_CONF 0
@@ -56,7 +51,7 @@ int ERR_load_CT_strings(void);
# define CT_F_SCT_SET_LOG_ENTRY_TYPE 0
# define CT_F_SCT_SET_SIGNATURE_NID 0
# define CT_F_SCT_SET_VERSION 0
-# endif
+# endif
/*
* CT reason codes.
diff --git a/include/openssl/decodererr.h b/include/openssl/decodererr.h
index 8da9157814..a82fc7bd0d 100644
--- a/include/openssl/decodererr.h
+++ b/include/openssl/decodererr.h
@@ -8,18 +8,15 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef OPENSSL_OSSL_DECODERERR_H
-# define OPENSSL_OSSL_DECODERERR_H
+#ifndef OPENSSL_DECODERERR_H
+# define OPENSSL_DECODERERR_H
# pragma once
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
+# include <openssl/cryptoerr_legacy.h>
-# ifdef __cplusplus
-extern "C"
-# endif
-int ERR_load_OSSL_DECODER_strings(void);
/*
* OSSL_DECODER function codes.
@@ -30,6 +27,6 @@ int ERR_load_OSSL_DECODER_strings(void);
/*
* OSSL_DECODER reason codes.
*/
-# define OSSL_DECODER_R_MISSING_GET_PARAMS 100
+# define OSSL_DECODER_R_MISSING_GET_PARAMS 100
#endif
diff --git a/include/openssl/dherr.h b/include/openssl/dherr.h
index 1b8fb17172..17910ef541 100644
--- a/include/openssl/dherr.h
+++ b/include/openssl/dherr.h
@@ -14,21 +14,16 @@
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
+# include <openssl/cryptoerr_legacy.h>
-# include <openssl/opensslconf.h>
-
# ifndef OPENSSL_NO_DH
-# ifdef __cplusplus
-extern "C"
-# endif
-int ERR_load_DH_strings(void);
/*
* DH function codes.
*/
-# ifndef OPENSSL_NO_DEPRECATED_3_0
+# ifndef OPENSSL_NO_DEPRECATED_3_0
# define DH_F_COMPUTE_KEY 0
# define DH_F_DHPARAMS_PRINT_FP 0
# define DH_F_DH_BUF2KEY 0
@@ -57,7 +52,7 @@ int ERR_load_DH_strings(void);
# define DH_F_PKEY_DH_DERIVE 0
# define DH_F_PKEY_DH_INIT 0
# define DH_F_PKEY_DH_KEYGEN 0
-# endif
+# endif
/*
* DH reason codes.
diff --git a/include/openssl/dsaerr.h b/include/openssl/dsaerr.h
index 271f24a2b5..0c60171263 100644
--- a/include/openssl/dsaerr.h
+++ b/include/openssl/dsaerr.h
@@ -14,21 +14,16 @@
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
+# include <openssl/cryptoerr_legacy.h>
-# include <openssl/opensslconf.h>
-
# ifndef OPENSSL_NO_DSA
-# ifdef __cplusplus
-extern "C"
-# endif
-int ERR_load_DSA_strings(void);
/*
* DSA function codes.
*/
-# ifndef OPENSSL_NO_DEPRECATED_3_0
+# ifndef OPENSSL_NO_DEPRECATED_3_0
# define DSA_F_DSAPARAMS_PRINT 0
# define DSA_F_DSAPARAMS_PRINT_FP 0
# define DSA_F_DSA_BUILTIN_PARAMGEN 0
@@ -52,7 +47,7 @@ int ERR_load_DSA_strings(void);
# define DSA_F_PKEY_DSA_CTRL 0
# define DSA_F_PKEY_DSA_CTRL_STR 0
# define DSA_F_PKEY_DSA_KEYGEN 0
-# endif
+# endif
/*
* DSA reason codes.
diff --git a/include/openssl/ecerr.h b/include/openssl/ecerr.h
index 60677d8560..64037fd81b 100644
--- a/include/openssl/ecerr.h
+++ b/include/openssl/ecerr.h
@@ -14,21 +14,16 @@
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
+# include <openssl/cryptoerr_legacy.h>
-# include <openssl/opensslconf.h>
-
# ifndef OPENSSL_NO_EC
-# ifdef __cplusplus
-extern "C"
-# endif
-int ERR_load_EC_strings(void);
/*
* EC function codes.
*/
-# ifndef OPENSSL_NO_DEPRECATED_3_0
+# ifndef OPENSSL_NO_DEPRECATED_3_0
# define EC_F_BN_TO_FELEM 0
# define EC_F_D2I_ECPARAMETERS 0
# define EC_F_D2I_ECPKPARAMETERS 0
@@ -219,7 +214,7 @@ int ERR_load_EC_strings(void);
# define EC_F_S390X_PKEY_ECX_KEYGEN25519 0
# define EC_F_S390X_PKEY_ECX_KEYGEN448 0
# define EC_F_VALIDATE_ECX_DERIVE 0
-# endif
+# endif
/*
* EC reason codes.
diff --git a/include/openssl/encodererr.h b/include/openssl/encodererr.h
index e146d6ec92..bef68d3adb 100644
--- a/include/openssl/encodererr.h
+++ b/include/openssl/encodererr.h
@@ -8,18 +8,15 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef OPENSSL_OSSL_ENCODERERR_H
-# define OPENSSL_OSSL_ENCODERERR_H
+#ifndef OPENSSL_ENCODERERR_H
+# define OPENSSL_ENCODERERR_H
# pragma once
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
+# include <openssl/cryptoerr_legacy.h>
-# ifdef __cplusplus
-extern "C"
-# endif
-int ERR_load_OSSL_ENCODER_strings(void);
/*
* OSSL_ENCODER function codes.
diff --git a/include/openssl/engineerr.h b/include/openssl/engineerr.h
index d60f321ccb..718882603d 100644
--- a/include/openssl/engineerr.h
+++ b/include/openssl/engineerr.h
@@ -14,21 +14,16 @@
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
+# include <openssl/cryptoerr_legacy.h>
-# include <openssl/opensslconf.h>
-
# ifndef OPENSSL_NO_ENGINE
-# ifdef __cplusplus
-extern "C"
-# endif
-int ERR_load_ENGINE_strings(void);
/*
* ENGINE function codes.
*/
-# ifndef OPENSSL_NO_DEPRECATED_3_0
+# ifndef OPENSSL_NO_DEPRECATED_3_0
# define ENGINE_F_DIGEST_UPDATE 0
# define ENGINE_F_DYNAMIC_CTRL 0
# define ENGINE_F_DYNAMIC_GET_DATA_CTX 0
@@ -69,7 +64,7 @@ int ERR_load_ENGINE_strings(void);
# define ENGINE_F_INT_ENGINE_CONFIGURE 0
# define ENGINE_F_INT_ENGINE_MODULE_INIT 0
# define ENGINE_F_OSSL_HMAC_INIT 0
-# endif
+# endif
/*
* ENGINE reason codes.
diff --git a/include/openssl/err.h.in b/include/openssl/err.h.in
index 1f2fde8317..c36fe7d1ed 100644
--- a/include/openssl/err.h.in
+++ b/include/openssl/err.h.in
@@ -30,6 +30,7 @@ use OpenSSL::stackhash qw(generate_lhash_macros);
# include <openssl/types.h>
# include <openssl/bio.h>
# include <openssl/lhash.h>
+# include <openssl/cryptoerr_legacy.h>
#ifdef __cplusplus
extern "C" {
@@ -454,7 +455,6 @@ void ERR_add_error_mem_bio(const char *sep, BIO *bio);
int ERR_load_strings(int lib, ERR_STRING_DATA *str);
int ERR_load_strings_const(const ERR_STRING_DATA *str);
int ERR_unload_strings(int lib, ERR_STRING_DATA *str);
-int ERR_load_ERR_strings(void);
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
# define ERR_load_crypto_strings() \
diff --git a/include/openssl/esserr.h b/include/openssl/esserr.h
index ff3c3d3d95..ec69b56dfe 100644
--- a/include/openssl/esserr.h
+++ b/include/openssl/esserr.h
@@ -14,12 +14,9 @@
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
+# include <openssl/cryptoerr_legacy.h>
-# ifdef __cplusplus
-extern "C"
-# endif
-int ERR_load_ESS_strings(void);
/*
* ESS function codes.
diff --git a/include/openssl/evperr.h b/include/openssl/evperr.h
index 1a3f5b6fbd..f98cca3104 100644
--- a/include/openssl/evperr.h
+++ b/include/openssl/evperr.h
@@ -14,12 +14,9 @@
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
+# include <openssl/cryptoerr_legacy.h>
-# ifdef __cplusplus
-extern "C"
-# endif
-int ERR_load_EVP_strings(void);
/*
* EVP function codes.
@@ -72,6 +69,8 @@ int ERR_load_EVP_strings(void);
# define EVP_F_EVP_KEYEXCH_FROM_DISPATCH 0
# define EVP_F_EVP_MAC_CTRL 0
# define EVP_F_EVP_MAC_CTRL_STR 0
+# define EVP_F_EVP_MAC_CTX_DUP 0
+# define EVP_F_EVP_MAC_CTX_NEW 0
# define EVP_F_EVP_MAC_INIT 0
# define EVP_F_EVP_MD_BLOCK_SIZE 0
# define EVP_F_EVP_MD_CTX_COPY_EX 0
diff --git a/include/openssl/httperr.h b/include/openssl/httperr.h
index 7747643bfa..4bf52bacb9 100644
--- a/include/openssl/httperr.h
+++ b/include/openssl/httperr.h
@@ -14,12 +14,9 @@
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
+# include <openssl/cryptoerr_legacy.h>
-# ifdef __cplusplus
-extern "C"
-# endif
-int ERR_load_HTTP_strings(void);
/*
* HTTP function codes.
diff --git a/include/openssl/kdferr.h b/include/openssl/kdferr.h
index 0daec1c2a5..d339871f6a 100644
--- a/include/openssl/kdferr.h
+++ b/include/openssl/kdferr.h
@@ -1,6 +1,5 @@
/*
- * Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2020 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
@@ -8,106 +7,4 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef OPENSSL_KDFERR_H
-# define OPENSSL_KDFERR_H
-# pragma once
-
-# include <openssl/opensslconf.h>
-# include <openssl/symhacks.h>
-
-
-# ifdef __cplusplus
-extern "C"
-# endif
-DEPRECATEDIN_3_0(int ERR_load_KDF_strings(void))
-
-/*
- * KDF function codes.
- */
-# ifndef OPENSSL_NO_DEPRECATED_3_0
-# define KDF_F_HKDF_EXTRACT 0
-# define KDF_F_KDF_HKDF_DERIVE 0
-# define KDF_F_KDF_HKDF_NEW 0
-# define KDF_F_KDF_HKDF_SIZE 0
-# define KDF_F_KDF_MD2CTRL 0
-# define KDF_F_KDF_PBKDF2_CTRL 0
-# define KDF_F_KDF_PBKDF2_CTRL_STR 0
-# define KDF_F_KDF_PBKDF2_DERIVE 0
-# define KDF_F_KDF_PBKDF2_NEW 0
-# define KDF_F_KDF_SCRYPT_CTRL_STR 0
-# define KDF_F_KDF_SCRYPT_CTRL_UINT32 0
-# define KDF_F_KDF_SCRYPT_CTRL_UINT64 0
-# define KDF_F_KDF_SCRYPT_DERIVE 0
-# define KDF_F_KDF_SCRYPT_NEW 0
-# define KDF_F_KDF_SSHKDF_CTRL 0
-# define KDF_F_KDF_SSHKDF_CTRL_STR 0
-# define KDF_F_KDF_SSHKDF_DERIVE 0
-# define KDF_F_KDF_SSHKDF_NEW 0
-# define KDF_F_KDF_TLS1_PRF_CTRL_STR 0
-# define KDF_F_KDF_TLS1_PRF_DERIVE 0
-# define KDF_F_KDF_TLS1_PRF_NEW 0
-# define KDF_F_PBKDF2_DERIVE 0
-# define KDF_F_PBKDF2_SET_MEMBUF 0
-# define KDF_F_PKEY_HKDF_CTRL_STR 0
-# define KDF_F_PKEY_HKDF_DERIVE 0
-# define KDF_F_PKEY_HKDF_INIT 0
-# define KDF_F_PKEY_SCRYPT_CTRL_STR 0
-# define KDF_F_PKEY_SCRYPT_CTRL_UINT64 0
-# define KDF_F_PKEY_SCRYPT_DERIVE 0
-# define KDF_F_PKEY_SCRYPT_INIT 0
-# define KDF_F_PKEY_SCRYPT_SET_MEMBUF 0
-# define KDF_F_PKEY_TLS1_PRF_CTRL_STR 0
-# define KDF_F_PKEY_TLS1_PRF_DERIVE 0
-# define KDF_F_PKEY_TLS1_PRF_INIT 0
-# define KDF_F_SCRYPT_SET_MEMBUF 0
-# define KDF_F_SSKDF_CTRL_STR 0
-# define KDF_F_SSKDF_DERIVE 0
-# define KDF_F_SSKDF_MAC2CTRL 0
-# define KDF_F_SSKDF_NEW 0
-# define KDF_F_SSKDF_SIZE 0
-# define KDF_F_TLS1_PRF_ALG 0
-# define KDF_F_X942KDF_CTRL 0
-# define KDF_F_X942KDF_DERIVE 0
-# define KDF_F_X942KDF_HASH_KDM 0
-# define KDF_F_X942KDF_NEW 0
-# define KDF_F_X942KDF_SIZE 0
-# define KDF_F_X963KDF_DERIVE 0
-# endif
-
-/*
- * KDF reason codes.
- */
-# ifndef OPENSSL_NO_DEPRECATED_3_0
-# define KDF_R_BAD_ENCODING 122
-# define KDF_R_BAD_LENGTH 123
-# define KDF_R_BOTH_MODE_AND_MODE_INT 127
-# define KDF_R_INAVLID_UKM_LEN 124
-# define KDF_R_INVALID_DIGEST 100
-# define KDF_R_INVALID_ITERATION_COUNT 119
-# define KDF_R_INVALID_KEY_LEN 120
-# define KDF_R_INVALID_MAC_TYPE 116
-# define KDF_R_INVALID_MODE 128
-# define KDF_R_INVALID_MODE_INT 129
-# define KDF_R_INVALID_SALT_LEN 121
-# define KDF_R_MISSING_CEK_ALG 125
-# define KDF_R_MISSING_ITERATION_COUNT 109
-# define KDF_R_MISSING_KEY 104
-# define KDF_R_MISSING_MESSAGE_DIGEST 105
-# define KDF_R_MISSING_PARAMETER 101
-# define KDF_R_MISSING_PASS 110
-# define KDF_R_MISSING_SALT 111
-# define KDF_R_MISSING_SECRET 107
-# define KDF_R_MISSING_SEED 106
-# define KDF_R_MISSING_SESSION_ID 113
-# define KDF_R_MISSING_TYPE 114
-# define KDF_R_MISSING_XCGHASH 115
-# define KDF_R_NOT_SUPPORTED 118
-# define KDF_R_UNKNOWN_PARAMETER_TYPE 103
-# define KDF_R_UNSUPPORTED_CEK_ALG 126
-# define KDF_R_UNSUPPORTED_MAC_TYPE 117
-# define KDF_R_VALUE_ERROR 108
-# define KDF_R_VALUE_MISSING 102
-# define KDF_R_WRONG_OUTPUT_BUFFER_SIZE 112
-# endif
-
-#endif
+#include <openssl/cryptoerr_legacy.h>
diff --git a/include/openssl/objectserr.h b/include/openssl/objectserr.h
index f1de77945b..aa61f83115 100644
--- a/include/openssl/objectserr.h
+++ b/include/openssl/objectserr.h
@@ -8,18 +8,15 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef OPENSSL_OBJERR_H
-# define OPENSSL_OBJERR_H
+#ifndef OPENSSL_OBJECTSERR_H
+# define OPENSSL_OBJECTSERR_H
# pragma once
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
+# include <openssl/cryptoerr_legacy.h>
-# ifdef __cplusplus
-extern "C"
-# endif
-int ERR_load_OBJ_strings(void);
/*
* OBJ function codes.
diff --git a/include/openssl/ocsperr.h b/include/openssl/ocsperr.h
index eea82b8a56..fc25908cf9 100644
--- a/include/openssl/ocsperr.h
+++ b/include/openssl/ocsperr.h
@@ -14,21 +14,16 @@
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
+# include <openssl/cryptoerr_legacy.h>
-# include <openssl/opensslconf.h>
-
# ifndef OPENSSL_NO_OCSP
-# ifdef __cplusplus
-extern "C"
-# endif
-int ERR_load_OCSP_strings(void);
/*
* OCSP function codes.
*/
-# ifndef OPENSSL_NO_DEPRECATED_3_0
+# ifndef OPENSSL_NO_DEPRECATED_3_0
# define OCSP_F_D2I_OCSP_NONCE 0
# define OCSP_F_OCSP_BASIC_ADD1_STATUS 0
# define OCSP_F_OCSP_BASIC_SIGN 0
@@ -43,7 +38,7 @@ int ERR_load_OCSP_strings(void);
# define OCSP_F_OCSP_REQUEST_SIGN 0
# define OCSP_F_OCSP_REQUEST_VERIFY 0
# define OCSP_F_OCSP_RESPONSE_GET1_BASIC 0
-# endif
+# endif
/*
* OCSP reason codes.
diff --git a/include/openssl/pemerr.h b/include/openssl/pemerr.h
index a8ad9f2c87..f9b9853431 100644
--- a/include/openssl/pemerr.h
+++ b/include/openssl/pemerr.h
@@ -14,12 +14,9 @@
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
+# include <openssl/cryptoerr_legacy.h>
-# ifdef __cplusplus
-extern "C"
-# endif
-int ERR_load_PEM_strings(void);
/*
* PEM function codes.
@@ -34,17 +31,17 @@ int ERR_load_PEM_strings(void);
# define PEM_F_D2I_PKCS8PRIVATEKEY_FP 0
# define PEM_F_DO_B2I 0
# define PEM_F_DO_B2I_BIO 0
-# define PEM_F_DO_BLOB_HEADER 0
# define PEM_F_DO_I2B 0
# define PEM_F_DO_PK8PKEY 0
# define PEM_F_DO_PK8PKEY_FP 0
# define PEM_F_DO_PVK_BODY 0
-# define PEM_F_DO_PVK_HEADER 0
# define PEM_F_GET_HEADER_AND_DATA 0
# define PEM_F_GET_NAME 0
# define PEM_F_I2B_PVK 0
# define PEM_F_I2B_PVK_BIO 0
# define PEM_F_LOAD_IV 0
+# define PEM_F_OSSL_DO_BLOB_HEADER 0
+# define PEM_F_OSSL_DO_PVK_HEADER 0
# define PEM_F_PEM_ASN1_READ 0
# define PEM_F_PEM_ASN1_READ_BIO 0
# define PEM_F_PEM_ASN1_WRITE 0
diff --git a/include/openssl/pkcs12err.h b/include/openssl/pkcs12err.h
index 60369447de..d5e902e14c 100644
--- a/include/openssl/pkcs12err.h
+++ b/include/openssl/pkcs12err.h
@@ -14,12 +14,9 @@
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
+# include <openssl/cryptoerr_legacy.h>
-# ifdef __cplusplus
-extern "C"
-# endif
-int ERR_load_PKCS12_strings(void);
/*
* PKCS12 function codes.
diff --git a/include/openssl/pkcs7err.h b/include/openssl/pkcs7err.h
index ef06fbbb9f..f212c5f308 100644
--- a/include/openssl/pkcs7err.h
+++ b/include/openssl/pkcs7err.h
@@ -14,12 +14,9 @@
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
+# include <openssl/cryptoerr_legacy.h>
-# ifdef __cplusplus
-extern "C"
-# endif
-int ERR_load_PKCS7_strings(void);
/*
* PKCS7 function codes.
diff --git a/include/openssl/randerr.h b/include/openssl/randerr.h
index ccce5b60ce..34da4ec231 100644
--- a/include/openssl/randerr.h
+++ b/include/openssl/randerr.h
@@ -14,12 +14,9 @@
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
+# include <openssl/cryptoerr_legacy.h>
-# ifdef __cplusplus
-extern "C"
-# endif
-int ERR_load_RAND_strings(void);
/*
* RAND function codes.
@@ -33,17 +30,10 @@ int ERR_load_RAND_strings(void);
# define RAND_F_RAND_BYTES 0
# define RAND_F_RAND_BYTES_EX 0
# define RAND_F_RAND_DRBG_ENABLE_LOCKING 0
-# define RAND_F_RAND_DRBG_GENERATE 0
# define RAND_F_RAND_DRBG_GET_ENTROPY 0
# define RAND_F_RAND_DRBG_GET_NONCE 0
# define RAND_F_RAND_DRBG_INIT_METHOD 0
-# define RAND_F_RAND_DRBG_INSTANTIATE 0
-# define RAND_F_RAND_DRBG_NEW 0
-# define RAND_F_RAND_DRBG_RESEED 0
# define RAND_F_RAND_DRBG_RESTART 0
-# define RAND_F_RAND_DRBG_SET 0
-# define RAND_F_RAND_DRBG_SET_DEFAULTS 0
-# define RAND_F_RAND_DRBG_UNINSTANTIATE 0
# define RAND_F_RAND_LOAD_FILE 0
# define RAND_F_RAND_POOL_ACQUIRE_ENTROPY 0
# define RAND_F_RAND_POOL_ADD 0
diff --git a/include/openssl/rsaerr.h b/include/openssl/rsaerr.h
index 794f433a05..c1b983e2e4 100644
--- a/include/openssl/rsaerr.h
+++ b/include/openssl/rsaerr.h
@@ -14,12 +14,9 @@
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
+# include <openssl/cryptoerr_legacy.h>
-# ifdef __cplusplus
-extern "C"
-# endif
-int ERR_load_RSA_strings(void);
/*
* RSA function codes.
diff --git a/include/openssl/sslerr.h b/include/openssl/sslerr.h
index 56ece0d175..d2721d354c 100644
--- a/include/openssl/sslerr.h
+++ b/include/openssl/sslerr.h
@@ -14,12 +14,9 @@
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
+# include <openssl/sslerr_legacy.h>
-# ifdef __cplusplus
-extern "C"
-# endif
-int ERR_load_SSL_strings(void);
/*
* SSL function codes.
diff --git a/include/openssl/sslerr_legacy.h b/include/openssl/sslerr_legacy.h
new file mode 100644
index 0000000000..1607b4e7dc
--- /dev/null
+++ b/include/openssl/sslerr_legacy.h
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2020 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
+ */
+
+/*
+ * This header file preserves symbols from pre-3.0 OpenSSL.
+ * It should never be included directly, as it's already included
+ * by the public sslerr.h headers, and since it will go away some
+ * time in the future.
+ */
+
+#ifndef OPENSSL_SSLERR_LEGACY_H
+# define OPENSSL_SSLERR_LEGACY_H
+# pragma once
+
+# include <openssl/macros.h>
+# include <openssl/symhacks.h>
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+# ifndef OPENSSL_NO_DEPRECATED_3_0
+OSSL_DEPRECATEDIN_3_0 int ERR_load_SSL_strings(void);
+# endif
+
+# ifdef __cplusplus
+}
+# endif
+#endif
+
diff --git a/include/openssl/storeerr.h b/include/openssl/storeerr.h
index 5213a0b33c..e895e082c7 100644
--- a/include/openssl/storeerr.h
+++ b/include/openssl/storeerr.h
@@ -8,18 +8,15 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef OPENSSL_OSSL_STOREERR_H
-# define OPENSSL_OSSL_STOREERR_H
+#ifndef OPENSSL_STOREERR_H
+# define OPENSSL_STOREERR_H
# pragma once
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
+# include <openssl/cryptoerr_legacy.h>
-# ifdef __cplusplus
-extern "C"
-# endif
-int ERR_load_OSSL_STORE_strings(void);
/*
* OSSL_STORE function codes.
diff --git a/include/openssl/tserr.h b/include/openssl/tserr.h
index d29d3be11b..6e46c45e12 100644
--- a/include/openssl/tserr.h
+++ b/include/openssl/tserr.h
@@ -14,21 +14,16 @@
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
+# include <openssl/cryptoerr_legacy.h>
-# include <openssl/opensslconf.h>
-
# ifndef OPENSSL_NO_TS
-# ifdef __cplusplus
-extern "C"
-# endif
-int ERR_load_TS_strings(void);
/*
* TS function codes.
*/
-# ifndef OPENSSL_NO_DEPRECATED_3_0
+# ifndef OPENSSL_NO_DEPRECATED_3_0
# define TS_F_DEF_SERIAL_CB 0
# define TS_F_DEF_TIME_CB 0
# define TS_F_INT_TS_RESP_VERIFY_TOKEN 0
@@ -80,7 +75,7 @@ int ERR_load_TS_strings(void);
# define TS_F_TS_VERIFY 0
# define TS_F_TS_VERIFY_CERT 0
# define TS_F_TS_VERIFY_CTX_NEW 0
-# endif
+# endif
/*
* TS reason codes.
diff --git a/include/openssl/uierr.h b/include/openssl/uierr.h
index 7240bbbde5..edccfd58bb 100644
--- a/include/openssl/uierr.h
+++ b/include/openssl/uierr.h
@@ -14,12 +14,9 @@
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
+# include <openssl/cryptoerr_legacy.h>
-# ifdef __cplusplus
-extern "C"
-# endif
-int ERR_load_UI_strings(void);
/*
* UI function codes.
diff --git a/include/openssl/x509err.h b/include/openssl/x509err.h
index 94c5c5b75e..10021b6444 100644
--- a/include/openssl/x509err.h
+++ b/include/openssl/x509err.h
@@ -14,12 +14,9 @@
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
+# include <openssl/cryptoerr_legacy.h>
-# ifdef __cplusplus
-extern "C"
-# endif
-int ERR_load_X509_strings(void);
/*
* X509 function codes.
diff --git a/include/openssl/x509v3err.h b/include/openssl/x509v3err.h
index b245a63902..a3324e6e2c 100644
--- a/include/openssl/x509v3err.h
+++ b/include/openssl/x509v3err.h
@@ -14,12 +14,9 @@
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
+# include <openssl/cryptoerr_legacy.h>
-# ifdef __cplusplus
-extern "C"
-# endif
-int ERR_load_X509V3_strings(void);
/*
* X509V3 function codes.
@@ -123,13 +120,13 @@ int ERR_load_X509V3_strings(void);
# define X509V3_R_INVALID_ASRANGE 163
# define X509V3_R_INVALID_BOOLEAN_STRING 104
# define X509V3_R_INVALID_CERTIFICATE 158
+# define X509V3_R_INVALID_EMPTY_NAME 108
# define X509V3_R_INVALID_EXTENSION_STRING 105
# define X509V3_R_INVALID_INHERITANCE 165
# define X509V3_R_INVALID_IPADDRESS 166
# define X509V3_R_INVALID_MULTIPLE_RDNS 161
# define X509V3_R_INVALID_NAME 106
# define X509V3_R_INVALID_NULL_ARGUMENT 107
-# define X509V3_R_INVALID_EMPTY_NAME 108
# define X509V3_R_INVALID_NULL_VALUE 109
# define X509V3_R_INVALID_NUMBER 140
# define X509V3_R_INVALID_NUMBERS 141
diff --git a/providers/common/include/prov/providercommonerr.h b/providers/common/include/prov/providercommonerr.h
index 86a3667641..fd0d7f0380 100644
--- a/providers/common/include/prov/providercommonerr.h
+++ b/providers/common/include/prov/providercommonerr.h
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2020-2020 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
@@ -8,18 +8,18 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef OPENSSL_PROVERR_H
-# define OPENSSL_PROVERR_H
+#ifndef OSSL_PROVIDERCOMMONERR_H
+# define OSSL_PROVIDERCOMMONERR_H
# pragma once
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
-
# ifdef __cplusplus
-extern "C"
+extern "C" {
# endif
-int ERR_load_PROV_strings(void);
+
+int err_load_PROV_strings_int(void);
/*
* PROV function codes.
@@ -178,4 +178,8 @@ int ERR_load_PROV_strings(void);
# define PROV_R_XTS_DATA_UNIT_IS_TOO_LARGE 148
# define PROV_R_XTS_DUPLICATED_KEYS 149
+
+# ifdef __cplusplus
+}
+# endif
#endif
diff --git a/providers/common/provider_err.c b/providers/common/provider_err.c
index 2915330b86..7bf2a55d99 100644
--- a/providers/common/provider_err.c
+++ b/providers/common/provider_err.c
@@ -9,7 +9,7 @@
*/
#include <openssl/err.h>
-#include "prov/providercommonerr.h"
+#include "include/prov/providercommonerr.h"
#ifndef OPENSSL_NO_ERR
@@ -223,7 +223,7 @@ static const ERR_STRING_DATA PROV_str_reasons[] = {
#endif
-int ERR_load_PROV_strings(void)
+int err_load_PROV_strings_int(void)
{
#ifndef OPENSSL_NO_ERR
if (ERR_reason_error_string(PROV_str_reasons[0].error) == NULL)
diff --git a/ssl/build.info b/ssl/build.info
index 4efd9d02cc..703cbaff50 100644
--- a/ssl/build.info
+++ b/ssl/build.info
@@ -30,7 +30,7 @@ SOURCE[../libssl]=\
ssl_lib.c ssl_cert.c ssl_sess.c \
ssl_ciph.c ssl_stat.c ssl_rsa.c \
ssl_asn1.c ssl_txt.c ssl_init.c ssl_conf.c ssl_mcnf.c \
- bio_ssl.c ssl_err.c tls_srp.c t1_trce.c ssl_utst.c \
+ bio_ssl.c ssl_err.c ssl_err_legacy.c tls_srp.c t1_trce.c ssl_utst.c \
record/ssl3_buffer.c record/ssl3_record.c record/dtls1_bitmap.c \
statem/statem.c record/ssl3_record_tls13.c record/tls_pad.c \
tls_depr.c $KTLSSRC
diff --git a/ssl/ssl_err.c b/ssl/ssl_err.c
index 9f47a924f0..39db31bee6 100644
--- a/ssl/ssl_err.c
+++ b/ssl/ssl_err.c
@@ -10,6 +10,7 @@
#include <openssl/err.h>
#include <openssl/sslerr.h>
+#include "sslerr.h"
#ifndef OPENSSL_NO_ERR
@@ -557,7 +558,7 @@ static const ERR_STRING_DATA SSL_str_reasons[] = {
#endif
-int ERR_load_SSL_strings(void)
+int err_load_SSL_strings_int(void)
{
#ifndef OPENSSL_NO_ERR
if (ERR_reason_error_string(SSL_str_reasons[0].error) == NULL)
diff --git a/ssl/ssl_err_legacy.c b/ssl/ssl_err_legacy.c
new file mode 100644
index 0000000000..d1f27c964e
--- /dev/null
+++ b/ssl/ssl_err_legacy.c
@@ -0,0 +1,21 @@
+/*
+ * Copyright 2020 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
+ */
+
+/* This is the C source file where we include this header directly */
+#include <openssl/sslerr_legacy.h>
+#include "sslerr.h"
+
+#ifndef OPENSSL_NO_DEPRECATED_3_0
+int ERR_load_SSL_strings(void)
+{
+ return err_load_SSL_strings_int();
+}
+#else
+NON_EMPTY_TRANSLATION_UNIT
+#endif
diff --git a/ssl/ssl_init.c b/ssl/ssl_init.c
index 73b0ce2b4d..772dc2b474 100644
--- a/ssl/ssl_init.c
+++ b/ssl/ssl_init.c
@@ -14,6 +14,7 @@
#include <openssl/evp.h>
#include <openssl/trace.h>
#include "ssl_local.h"
+#include "sslerr.h"
#include "internal/thread_once.h"
static int stopped;
@@ -53,8 +54,8 @@ DEFINE_RUN_ONCE_STATIC(ossl_init_load_ssl_strings)
* pulling in all the error strings during static linking
*/
#if !defined(OPENSSL_NO_ERR) && !defined(OPENSSL_NO_AUTOERRINIT)
- OSSL_TRACE(INIT, "ossl_init_load_ssl_strings: ERR_load_SSL_strings()\n");
- ERR_load_SSL_strings();
+ OSSL_TRACE(INIT, "ossl_init_load_ssl_strings: err_load_SSL_strings_int()\n");
+ err_load_SSL_strings_int();
ssl_strings_inited = 1;
#endif
return 1;
diff --git a/include/openssl/decodererr.h b/ssl/sslerr.h
similarity index 55%
copy from include/openssl/decodererr.h
copy to ssl/sslerr.h
index 8da9157814..9b496f2c0a 100644
--- a/include/openssl/decodererr.h
+++ b/ssl/sslerr.h
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2020-2020 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
@@ -8,28 +8,20 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef OPENSSL_OSSL_DECODERERR_H
-# define OPENSSL_OSSL_DECODERERR_H
+#ifndef OSSL_SSLERR_H
+# define OSSL_SSLERR_H
# pragma once
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
-
# ifdef __cplusplus
-extern "C"
+extern "C" {
# endif
-int ERR_load_OSSL_DECODER_strings(void);
-/*
- * OSSL_DECODER function codes.
- */
-# ifndef OPENSSL_NO_DEPRECATED_3_0
-# endif
-
-/*
- * OSSL_DECODER reason codes.
- */
-# define OSSL_DECODER_R_MISSING_GET_PARAMS 100
+int err_load_SSL_strings_int(void);
+# ifdef __cplusplus
+}
+# endif
#endif
diff --git a/util/libcrypto.num b/util/libcrypto.num
index 75d98a5fda..404a706fab 100644
--- a/util/libcrypto.num
+++ b/util/libcrypto.num
@@ -150,7 +150,7 @@ i2d_IPAddressFamily 152 3_0_0 EXIST::FUNCTION:RFC3779
ENGINE_get_ctrl_function 153 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0,ENGINE
X509_REVOKED_get_ext_count 154 3_0_0 EXIST::FUNCTION:
BN_is_prime_fasttest_ex 155 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0
-ERR_load_PKCS12_strings 156 3_0_0 EXIST::FUNCTION:
+ERR_load_PKCS12_strings 156 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0
EVP_sha384 157 3_0_0 EXIST::FUNCTION:
i2d_DHparams 158 3_0_0 EXIST::FUNCTION:DH
TS_VERIFY_CTX_set_store 159 3_0_0 EXIST::FUNCTION:TS
@@ -203,7 +203,7 @@ SCT_set_version 206 3_0_0 EXIST::FUNCTION:CT
CMS_add1_ReceiptRequest 207 3_0_0 EXIST::FUNCTION:CMS
d2i_CRL_DIST_POINTS 208 3_0_0 EXIST::FUNCTION:
X509_CRL_INFO_free 209 3_0_0 EXIST::FUNCTION:
-ERR_load_UI_strings 210 3_0_0 EXIST::FUNCTION:
+ERR_load_UI_strings 210 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0
ERR_load_strings 211 3_0_0 EXIST::FUNCTION:
RSA_X931_hash_id 212 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0,RSA
EC_KEY_set_method 213 3_0_0 EXIST::FUNCTION:EC
@@ -416,7 +416,7 @@ RIPEMD160 423 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3
CRYPTO_ocb128_setiv 424 3_0_0 EXIST::FUNCTION:OCB
X509_CRL_digest 425 3_0_0 EXIST::FUNCTION:
EVP_aes_128_cbc_hmac_sha1 426 3_0_0 EXIST::FUNCTION:
-ERR_load_CMS_strings 427 3_0_0 EXIST::FUNCTION:CMS
+ERR_load_CMS_strings 427 3_0_0 EXIST::FUNCTION:CMS,DEPRECATEDIN_3_0
EVP_MD_CTX_md 428 3_0_0 EXIST::FUNCTION:
X509_REVOKED_get_ext 429 3_0_0 EXIST::FUNCTION:
d2i_RSA_PSS_PARAMS 430 3_0_0 EXIST::FUNCTION:RSA
@@ -556,7 +556,7 @@ TLS_FEATURE_new 567 3_0_0 EXIST::FUNCTION:
RSA_get_default_method 568 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0,RSA
CRYPTO_cts128_encrypt_block 569 3_0_0 EXIST::FUNCTION:
ASN1_digest 570 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0
-ERR_load_X509V3_strings 571 3_0_0 EXIST::FUNCTION:
+ERR_load_X509V3_strings 571 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0
EVP_PKEY_meth_get_cleanup 572 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0
d2i_X509 574 3_0_0 EXIST::FUNCTION:
a2i_ASN1_STRING 575 3_0_0 EXIST::FUNCTION:
@@ -564,7 +564,7 @@ EC_GROUP_get_mont_data 576 3_0_0 EXIST::FUNCTION:EC
CMAC_CTX_copy 577 3_0_0 EXIST::FUNCTION:CMAC,DEPRECATEDIN_3_0
EVP_camellia_128_cfb128 579 3_0_0 EXIST::FUNCTION:CAMELLIA
DH_compute_key_padded 580 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0,DH
-ERR_load_CONF_strings 581 3_0_0 EXIST::FUNCTION:
+ERR_load_CONF_strings 581 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0
ESS_ISSUER_SERIAL_dup 582 3_0_0 EXIST::FUNCTION:
BN_GF2m_mod_exp_arr 583 3_0_0 EXIST::FUNCTION:EC2M
ASN1_UTF8STRING_free 584 3_0_0 EXIST::FUNCTION:
@@ -606,7 +606,7 @@ DES_ede3_ofb64_encrypt 620 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3
EC_KEY_METHOD_get_compute_key 621 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0,EC
RC2_cfb64_encrypt 622 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0,RC2
EVP_EncryptFinal_ex 623 3_0_0 EXIST::FUNCTION:
-ERR_load_RSA_strings 624 3_0_0 EXIST::FUNCTION:
+ERR_load_RSA_strings 624 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0
CRYPTO_secure_malloc_done 625 3_0_0 EXIST::FUNCTION:
RSA_OAEP_PARAMS_new 626 3_0_0 EXIST::FUNCTION:RSA
X509_NAME_free 627 3_0_0 EXIST::FUNCTION:
@@ -870,7 +870,7 @@ X509_EXTENSION_set_object 891 3_0_0 EXIST::FUNCTION:
EVP_CIPHER_CTX_get_app_data 892 3_0_0 EXIST::FUNCTION:
CRL_DIST_POINTS_it 893 3_0_0 EXIST::FUNCTION:
DIRECTORYSTRING_new 894 3_0_0 EXIST::FUNCTION:
-ERR_load_ASYNC_strings 895 3_0_0 EXIST::FUNCTION:
+ERR_load_ASYNC_strings 895 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0
EVP_bf_cfb64 896 3_0_0 EXIST::FUNCTION:BF
PKCS7_sign_add_signer 897 3_0_0 EXIST::FUNCTION:
X509_print_ex 898 3_0_0 EXIST::FUNCTION:
@@ -961,7 +961,7 @@ X509_PURPOSE_get_by_id 985 3_0_0 EXIST::FUNCTION:
X509_get1_ocsp 986 3_0_0 EXIST::FUNCTION:
ISSUING_DIST_POINT_free 987 3_0_0 EXIST::FUNCTION:
ASN1_UTCTIME_free 988 3_0_0 EXIST::FUNCTION:
-ERR_load_TS_strings 989 3_0_0 EXIST::FUNCTION:TS
+ERR_load_TS_strings 989 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0,TS
BN_nist_mod_func 990 3_0_0 EXIST::FUNCTION:
OCSP_ONEREQ_new 991 3_0_0 EXIST::FUNCTION:OCSP
DSA_SIG_new 992 3_0_0 EXIST::FUNCTION:DSA
@@ -1048,7 +1048,7 @@ EVP_PKEY_encrypt_old 1074 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_
OPENSSL_LH_free 1075 3_0_0 EXIST::FUNCTION:
DES_is_weak_key 1076 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0,DES
EVP_PKEY_verify 1077 3_0_0 EXIST::FUNCTION:
-ERR_load_BIO_strings 1078 3_0_0 EXIST::FUNCTION:
+ERR_load_BIO_strings 1078 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0
BIO_nread 1079 3_0_0 EXIST::FUNCTION:
PEM_read_bio_RSAPrivateKey 1080 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0,RSA
OBJ_nid2obj 1081 3_0_0 EXIST::FUNCTION:
@@ -1064,7 +1064,7 @@ ENGINE_set_DSA 1090 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_
EC_KEY_METHOD_set_sign 1091 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0,EC
d2i_TS_MSG_IMPRINT 1092 3_0_0 EXIST::FUNCTION:TS
X509_print_ex_fp 1093 3_0_0 EXIST::FUNCTION:STDIO
-ERR_load_PEM_strings 1094 3_0_0 EXIST::FUNCTION:
+ERR_load_PEM_strings 1094 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0
ENGINE_unregister_pkey_asn1_meths 1095 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0,ENGINE
IPAddressFamily_free 1096 3_0_0 EXIST::FUNCTION:RFC3779
UI_method_get_prompt_constructor 1097 3_0_0 EXIST::FUNCTION:
@@ -1398,7 +1398,7 @@ EVP_aes_192_wrap 1430 3_0_0 EXIST::FUNCTION:
OCSP_CERTID_it 1431 3_0_0 EXIST::FUNCTION:OCSP
ENGINE_get_RSA 1432 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0,ENGINE
RAND_get_rand_method 1433 3_0_0 EXIST::FUNCTION:
-ERR_load_DSA_strings 1434 3_0_0 EXIST::FUNCTION:DSA
+ERR_load_DSA_strings 1434 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0,DSA
ASN1_check_infinite_end 1435 3_0_0 EXIST::FUNCTION:
i2d_PKCS7_DIGEST 1436 3_0_0 EXIST::FUNCTION:
ERR_lib_error_string 1437 3_0_0 EXIST::FUNCTION:
@@ -1511,7 +1511,7 @@ BN_is_word 1544 3_0_0 EXIST::FUNCTION:
EVP_CIPHER_key_length 1545 3_0_0 EXIST::FUNCTION:
EVP_CIPHER_asn1_to_param 1546 3_0_0 EXIST::FUNCTION:
OCSP_request_onereq_get0 1547 3_0_0 EXIST::FUNCTION:OCSP
-ERR_load_PKCS7_strings 1548 3_0_0 EXIST::FUNCTION:
+ERR_load_PKCS7_strings 1548 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0
X509_PUBKEY_get 1549 3_0_0 EXIST::FUNCTION:
EC_KEY_free 1550 3_0_0 EXIST::FUNCTION:EC
BIO_read 1551 3_0_0 EXIST::FUNCTION:
@@ -1999,7 +1999,7 @@ ASN1_d2i_fp 2045 3_0_0 EXIST::FUNCTION:STDIO
EVP_DecryptFinal 2046 3_0_0 EXIST::FUNCTION:
ASN1_ENUMERATED_it 2047 3_0_0 EXIST::FUNCTION:
o2i_ECPublicKey 2048 3_0_0 EXIST::FUNCTION:EC
-ERR_load_BUF_strings 2049 3_0_0 EXIST::FUNCTION:
+ERR_load_BUF_strings 2049 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0
PEM_read_bio_RSA_PUBKEY 2050 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0,RSA
OCSP_SINGLERESP_new 2051 3_0_0 EXIST::FUNCTION:OCSP
ASN1_SCTX_free 2052 3_0_0 EXIST::FUNCTION:
@@ -2062,8 +2062,8 @@ ENGINE_register_pkey_meths 2108 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_
ENGINE_load_public_key 2109 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0,ENGINE
ASIdOrRange_it 2110 3_0_0 EXIST::FUNCTION:RFC3779
DHparams_print_fp 2111 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0,DH,STDIO
-ERR_load_CRYPTO_strings 2112 3_0_0 EXIST:!VMS:FUNCTION:
-ERR_load_CRYPTOlib_strings 2112 3_0_0 EXIST:VMS:FUNCTION:
+ERR_load_CRYPTO_strings 2112 3_0_0 EXIST:!VMS:FUNCTION:DEPRECATEDIN_3_0
+ERR_load_CRYPTOlib_strings 2112 3_0_0 EXIST:VMS:FUNCTION:DEPRECATEDIN_3_0
X509_REQ_set_version 2113 3_0_0 EXIST::FUNCTION:
d2i_ASN1_GENERALSTRING 2114 3_0_0 EXIST::FUNCTION:
i2d_ASIdentifiers 2115 3_0_0 EXIST::FUNCTION:RFC3779
@@ -2102,7 +2102,7 @@ X509_NAME_ENTRY_it 2147 3_0_0 EXIST::FUNCTION:
CRYPTO_THREAD_compare_id 2148 3_0_0 EXIST::FUNCTION:
d2i_IPAddressChoice 2149 3_0_0 EXIST::FUNCTION:RFC3779
IPAddressFamily_it 2150 3_0_0 EXIST::FUNCTION:RFC3779
-ERR_load_OCSP_strings 2151 3_0_0 EXIST::FUNCTION:OCSP
+ERR_load_OCSP_strings 2151 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0,OCSP
BIO_push 2152 3_0_0 EXIST::FUNCTION:
ASN1_BMPSTRING_new 2153 3_0_0 EXIST::FUNCTION:
COMP_get_type 2154 3_0_0 EXIST::FUNCTION:COMP
@@ -2171,7 +2171,7 @@ X509_PURPOSE_get_id 2218 3_0_0 EXIST::FUNCTION:
EC_KEY_get_ex_data 2219 3_0_0 EXIST::FUNCTION:EC
EVP_MD_size 2220 3_0_0 EXIST::FUNCTION:
CRYPTO_malloc 2221 3_0_0 EXIST::FUNCTION:
-ERR_load_ASN1_strings 2222 3_0_0 EXIST::FUNCTION:
+ERR_load_ASN1_strings 2222 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0
X509_REQ_get_extension_nids 2223 3_0_0 EXIST::FUNCTION:
TS_REQ_get_ext_by_OBJ 2224 3_0_0 EXIST::FUNCTION:TS
i2d_X509 2225 3_0_0 EXIST::FUNCTION:
@@ -2200,7 +2200,7 @@ TS_TST_INFO_delete_ext 2247 3_0_0 EXIST::FUNCTION:TS
TS_OBJ_print_bio 2248 3_0_0 EXIST::FUNCTION:TS
X509_time_adj_ex 2249 3_0_0 EXIST::FUNCTION:
OCSP_request_add1_cert 2250 3_0_0 EXIST::FUNCTION:OCSP
-ERR_load_X509_strings 2251 3_0_0 EXIST::FUNCTION:
+ERR_load_X509_strings 2251 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0
SHA1_Transform 2252 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0
CMS_signed_get_attr_by_NID 2253 3_0_0 EXIST::FUNCTION:CMS
X509_STORE_CTX_get_by_subject 2254 3_0_0 EXIST::FUNCTION:
@@ -2429,7 +2429,7 @@ EVP_CIPHER_CTX_ctrl 2479 3_0_0 EXIST::FUNCTION:
ASN1_T61STRING_it 2480 3_0_0 EXIST::FUNCTION:
ENGINE_get_prev 2481 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0,ENGINE
OCSP_accept_responses_new 2482 3_0_0 EXIST::FUNCTION:OCSP
-ERR_load_EC_strings 2483 3_0_0 EXIST::FUNCTION:EC
+ERR_load_EC_strings 2483 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0,EC
X509V3_string_free 2484 3_0_0 EXIST::FUNCTION:
EVP_PKEY_meth_set_paramgen 2485 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0
ENGINE_set_load_ssl_client_cert_function 2486 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0,ENGINE
@@ -2583,7 +2583,7 @@ BN_get_rfc2409_prime_1024 2637 3_0_0 EXIST::FUNCTION:
CRYPTO_set_mem_functions 2638 3_0_0 EXIST::FUNCTION:
i2d_ASN1_VISIBLESTRING 2639 3_0_0 EXIST::FUNCTION:
d2i_PBKDF2PARAM 2640 3_0_0 EXIST::FUNCTION:
-ERR_load_COMP_strings 2641 3_0_0 EXIST::FUNCTION:COMP
+ERR_load_COMP_strings 2641 3_0_0 EXIST::FUNCTION:COMP,DEPRECATEDIN_3_0
EVP_PKEY_meth_add0 2642 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0
EVP_rc4_40 2643 3_0_0 EXIST::FUNCTION:RC4
RSA_bits 2645 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0,RSA
@@ -2832,7 +2832,7 @@ CMS_add_simple_smimecap 2893 3_0_0 EXIST::FUNCTION:CMS
IPAddressChoice_free 2894 3_0_0 EXIST::FUNCTION:RFC3779
d2i_X509_AUX 2895 3_0_0 EXIST::FUNCTION:
X509_get_default_cert_area 2896 3_0_0 EXIST::FUNCTION:
-ERR_load_DSO_strings 2897 3_0_0 EXIST::FUNCTION:
+ERR_load_DSO_strings 2897 3_0_0 NOEXIST::FUNCTION:
ASIdentifiers_it 2898 3_0_0 EXIST::FUNCTION:RFC3779
BN_mod_lshift 2899 3_0_0 EXIST::FUNCTION:
ENGINE_get_last 2900 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0,ENGINE
@@ -3001,7 +3001,7 @@ i2a_ASN1_INTEGER 3065 3_0_0 EXIST::FUNCTION:
d2i_TS_RESP 3066 3_0_0 EXIST::FUNCTION:TS
EVP_des_ede_cfb64 3067 3_0_0 EXIST::FUNCTION:DES
d2i_RSAPrivateKey 3068 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0,RSA
-ERR_load_BN_strings 3069 3_0_0 EXIST::FUNCTION:
+ERR_load_BN_strings 3069 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0
BF_encrypt 3070 3_0_0 EXIST::FUNCTION:BF,DEPRECATEDIN_3_0
MD5 3071 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0,MD5
BN_GF2m_arr2poly 3072 3_0_0 EXIST::FUNCTION:EC2M
@@ -3172,7 +3172,7 @@ ESS_CERT_ID_dup 3237 3_0_0 EXIST::FUNCTION:
CMS_SignerInfo_get0_signature 3238 3_0_0 EXIST::FUNCTION:CMS
EVP_PKEY_verify_recover 3239 3_0_0 EXIST::FUNCTION:
i2d_PUBKEY 3240 3_0_0 EXIST::FUNCTION:
-ERR_load_EVP_strings 3241 3_0_0 EXIST::FUNCTION:
+ERR_load_EVP_strings 3241 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0
X509_ATTRIBUTE_set1_data 3242 3_0_0 EXIST::FUNCTION:
d2i_X509_fp 3243 3_0_0 EXIST::FUNCTION:STDIO
MD2_Init 3244 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0,MD2
@@ -3468,7 +3468,7 @@ d2i_BASIC_CONSTRAINTS 3539 3_0_0 EXIST::FUNCTION:
X509_CERT_AUX_new 3540 3_0_0 EXIST::FUNCTION:
ENGINE_register_pkey_asn1_meths 3541 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0,ENGINE
CRYPTO_ocb128_tag 3542 3_0_0 EXIST::FUNCTION:OCB
-ERR_load_OBJ_strings 3544 3_0_0 EXIST::FUNCTION:
+ERR_load_OBJ_strings 3544 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0
BIO_ctrl_get_read_request 3545 3_0_0 EXIST::FUNCTION:
BN_from_montgomery 3546 3_0_0 EXIST::FUNCTION:
DSO_new 3547 3_0_0 EXIST::FUNCTION:
@@ -3489,7 +3489,7 @@ X509_STORE_set1_param 3563 3_0_0 EXIST::FUNCTION:
RAND_file_name 3564 3_0_0 EXIST::FUNCTION:
EVP_CipherInit_ex 3566 3_0_0 EXIST::FUNCTION:
BIO_dgram_sctp_notification_cb 3567 3_0_0 EXIST::FUNCTION:DGRAM,SCTP
-ERR_load_RAND_strings 3568 3_0_0 EXIST::FUNCTION:
+ERR_load_RAND_strings 3568 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0
X509_ATTRIBUTE_it 3569 3_0_0 EXIST::FUNCTION:
X509_ALGOR_it 3570 3_0_0 EXIST::FUNCTION:
OCSP_CRLID_free 3571 3_0_0 EXIST::FUNCTION:OCSP
@@ -3567,7 +3567,7 @@ ASN1_INTEGER_dup 3645 3_0_0 EXIST::FUNCTION:
DSA_print 3646 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0,DSA
X509_REQ_set_extension_nids 3647 3_0_0 EXIST::FUNCTION:
X509_free 3648 3_0_0 EXIST::FUNCTION:
-ERR_load_ERR_strings 3649 3_0_0 EXIST::FUNCTION:
+ERR_load_ERR_strings 3649 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0
ASN1_const_check_infinite_end 3650 3_0_0 EXIST::FUNCTION:
RSA_null_method 3651 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0,RSA
TS_REQ_ext_free 3652 3_0_0 EXIST::FUNCTION:TS
@@ -3582,7 +3582,7 @@ TS_CONF_load_certs 3660 3_0_0 EXIST::FUNCTION:TS
PEM_write_bio_DSAPrivateKey 3661 3_0_0 EXIST::FUNCTION:DSA
CMS_encrypt 3662 3_0_0 EXIST::FUNCTION:CMS
CRYPTO_nistcts128_decrypt 3663 3_0_0 EXIST::FUNCTION:
-ERR_load_DH_strings 3664 3_0_0 EXIST::FUNCTION:DH
+ERR_load_DH_strings 3664 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0,DH
EVP_MD_block_size 3665 3_0_0 EXIST::FUNCTION:
TS_X509_ALGOR_print_bio 3666 3_0_0 EXIST::FUNCTION:TS
d2i_PKCS7_ENVELOPE 3667 3_0_0 EXIST::FUNCTION:
@@ -3732,8 +3732,8 @@ i2d_IPAddressRange 3813 3_0_0 EXIST::FUNCTION:RFC3779
CMS_unsigned_add1_attr_by_txt 3814 3_0_0 EXIST::FUNCTION:CMS
d2i_RSA_PUBKEY 3815 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0,RSA
PKCS12_gen_mac 3816 3_0_0 EXIST::FUNCTION:
-ERR_load_ENGINE_strings 3817 3_0_0 EXIST::FUNCTION:ENGINE
-ERR_load_CT_strings 3818 3_0_0 EXIST::FUNCTION:CT
+ERR_load_ENGINE_strings 3817 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0,ENGINE
+ERR_load_CT_strings 3818 3_0_0 EXIST::FUNCTION:CT,DEPRECATEDIN_3_0
OCSP_ONEREQ_it 3819 3_0_0 EXIST::FUNCTION:OCSP
X509_PURPOSE_get_by_sname 3820 3_0_0 EXIST::FUNCTION:
X509_PURPOSE_set 3821 3_0_0 EXIST::FUNCTION:
@@ -4158,7 +4158,7 @@ OSSL_STORE_register_loader 4246 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_
OSSL_STORE_LOADER_set_error 4247 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0
OSSL_STORE_INFO_get0_PKEY 4248 3_0_0 EXIST::FUNCTION:
OSSL_STORE_INFO_get_type 4249 3_0_0 EXIST::FUNCTION:
-ERR_load_OSSL_STORE_strings 4250 3_0_0 EXIST::FUNCTION:
+ERR_load_OSSL_STORE_strings 4250 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0
OSSL_STORE_LOADER_free 4251 3_0_0 EXIST::FUNCTION:
OSSL_STORE_INFO_get1_PKEY 4252 3_0_0 EXIST::FUNCTION:
OSSL_STORE_INFO_free 4253 3_0_0 EXIST::FUNCTION:
@@ -4431,7 +4431,6 @@ ASYNC_WAIT_CTX_get_callback ? 3_0_0 EXIST::FUNCTION:
ASYNC_WAIT_CTX_set_callback ? 3_0_0 EXIST::FUNCTION:
ASYNC_WAIT_CTX_set_status ? 3_0_0 EXIST::FUNCTION:
ASYNC_WAIT_CTX_get_status ? 3_0_0 EXIST::FUNCTION:
-ERR_load_ESS_strings ? 3_0_0 EXIST::FUNCTION:
EVP_KDF_CTX_free ? 3_0_0 EXIST::FUNCTION:
EVP_KDF_CTX_reset ? 3_0_0 EXIST::FUNCTION:
EVP_KDF_CTX_get_kdf_size ? 3_0_0 EXIST::FUNCTION:
@@ -4526,7 +4525,6 @@ OSSL_CRMF_CERTTEMPLATE_get0_serialNumber ? 3_0_0 EXIST::FUNCTION:CRMF
OSSL_CRMF_CERTTEMPLATE_get0_issuer ? 3_0_0 EXIST::FUNCTION:CRMF
OSSL_CRMF_CERTTEMPLATE_fill ? 3_0_0 EXIST::FUNCTION:CRMF
OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert ? 3_0_0 EXIST::FUNCTION:CRMF
-ERR_load_CRMF_strings ? 3_0_0 EXIST::FUNCTION:CRMF
OSSL_PARAM_locate ? 3_0_0 EXIST::FUNCTION:
OSSL_PARAM_construct_int ? 3_0_0 EXIST::FUNCTION:
OSSL_PARAM_construct_uint ? 3_0_0 EXIST::FUNCTION:
@@ -4607,7 +4605,6 @@ OSSL_CMP_ITAV_get0_value ? 3_0_0 EXIST::FUNCTION:CMP
OSSL_CMP_ITAV_push0_stack_item ? 3_0_0 EXIST::FUNCTION:CMP
OSSL_CMP_ITAV_free ? 3_0_0 EXIST::FUNCTION:CMP
OSSL_CMP_MSG_free ? 3_0_0 EXIST::FUNCTION:CMP
-ERR_load_CMP_strings ? 3_0_0 EXIST::FUNCTION:CMP
EVP_MD_CTX_set_params ? 3_0_0 EXIST::FUNCTION:
EVP_MD_CTX_get_params ? 3_0_0 EXIST::FUNCTION:
BN_CTX_new_ex ? 3_0_0 EXIST::FUNCTION:
@@ -4853,7 +4850,6 @@ OSSL_ENCODER_CTX_set_cipher ? 3_0_0 EXIST::FUNCTION:
OSSL_ENCODER_CTX_set_passphrase ? 3_0_0 EXIST::FUNCTION:
OSSL_ENCODER_CTX_set_pem_password_cb ? 3_0_0 EXIST::FUNCTION:
OSSL_ENCODER_CTX_set_passphrase_ui ? 3_0_0 EXIST::FUNCTION:
-ERR_load_OSSL_ENCODER_strings ? 3_0_0 EXIST::FUNCTION:
PEM_read_X509_PUBKEY ? 3_0_0 EXIST::FUNCTION:STDIO
PEM_write_X509_PUBKEY ? 3_0_0 EXIST::FUNCTION:STDIO
PEM_read_bio_X509_PUBKEY ? 3_0_0 EXIST::FUNCTION:
@@ -4891,7 +4887,6 @@ ASN1_item_verify_ex ? 3_0_0 EXIST::FUNCTION:
BIO_socket_wait ? 3_0_0 EXIST::FUNCTION:SOCK
BIO_wait ? 3_0_0 EXIST::FUNCTION:
BIO_do_connect_retry ? 3_0_0 EXIST::FUNCTION:
-ERR_load_HTTP_strings ? 3_0_0 EXIST::FUNCTION:
OSSL_HTTP_get ? 3_0_0 EXIST::FUNCTION:
OSSL_HTTP_get_asn1 ? 3_0_0 EXIST::FUNCTION:
OSSL_HTTP_post_asn1 ? 3_0_0 EXIST::FUNCTION:
@@ -5134,7 +5129,6 @@ OSSL_DECODER_CTX_set_input_type ? 3_0_0 EXIST::FUNCTION:
OSSL_DECODER_export ? 3_0_0 EXIST::FUNCTION:
OSSL_DECODER_INSTANCE_get_decoder ? 3_0_0 EXIST::FUNCTION:
OSSL_DECODER_INSTANCE_get_decoder_ctx ? 3_0_0 EXIST::FUNCTION:
-ERR_load_OSSL_DECODER_strings ? 3_0_0 EXIST::FUNCTION:
OSSL_DECODER_gettable_params ? 3_0_0 EXIST::FUNCTION:
OSSL_DECODER_get_params ? 3_0_0 EXIST::FUNCTION:
OSSL_DECODER_CTX_new_by_EVP_PKEY ? 3_0_0 EXIST::FUNCTION:
diff --git a/util/libssl.num b/util/libssl.num
index a505e5300b..14430c9bf7 100644
--- a/util/libssl.num
+++ b/util/libssl.num
@@ -145,7 +145,7 @@ SSL_export_keying_material 145 3_0_0 EXIST::FUNCTION:
SSL_callback_ctrl 146 3_0_0 EXIST::FUNCTION:
SSL_set_security_callback 147 3_0_0 EXIST::FUNCTION:
SSL_SRP_CTX_init 148 3_0_0 EXIST::FUNCTION:SRP
-ERR_load_SSL_strings 149 3_0_0 EXIST::FUNCTION:
+ERR_load_SSL_strings 149 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0
SSL_CTX_SRP_CTX_init 150 3_0_0 EXIST::FUNCTION:SRP
SSL_SESSION_set_time 151 3_0_0 EXIST::FUNCTION:
i2d_SSL_SESSION 152 3_0_0 EXIST::FUNCTION:
diff --git a/util/missingcrypto.txt b/util/missingcrypto.txt
index dabce0db49..211a2c5737 100644
--- a/util/missingcrypto.txt
+++ b/util/missingcrypto.txt
@@ -617,7 +617,6 @@ ERR_load_CMP_strings(3)
ERR_load_CMS_strings(3)
ERR_load_COMP_strings(3)
ERR_load_CONF_strings(3)
-ERR_load_CRMF_strings(3)
ERR_load_CRYPTO_strings(3)
ERR_load_CRYPTOlib_strings(3)
ERR_load_CT_strings(3)
@@ -627,14 +626,10 @@ ERR_load_DSO_strings(3)
ERR_load_EC_strings(3)
ERR_load_ENGINE_strings(3)
ERR_load_ERR_strings(3)
-ERR_load_ESS_strings(3)
ERR_load_EVP_strings(3)
-ERR_load_HTTP_strings(3)
ERR_load_KDF_strings(3)
ERR_load_OBJ_strings(3)
ERR_load_OCSP_strings(3)
-ERR_load_OSSL_ENCODER_strings(3)
-ERR_load_OSSL_DECODER_strings(3)
ERR_load_OSSL_STORE_strings(3)
ERR_load_PEM_strings(3)
ERR_load_PKCS12_strings(3)
diff --git a/util/missingcrypto111.txt b/util/missingcrypto111.txt
index a232ed2af0..9e945703dc 100644
--- a/util/missingcrypto111.txt
+++ b/util/missingcrypto111.txt
@@ -620,6 +620,7 @@ ERR_load_EC_strings(3)
ERR_load_ENGINE_strings(3)
ERR_load_ERR_strings(3)
ERR_load_EVP_strings(3)
+ERR_load_KDF_strings(3)
ERR_load_OBJ_strings(3)
ERR_load_OCSP_strings(3)
ERR_load_OSSL_STORE_strings(3)
diff --git a/util/mkerr.pl b/util/mkerr.pl
index 0c7ae7b56d..d7c72af14c 100755
--- a/util/mkerr.pl
+++ b/util/mkerr.pl
@@ -9,6 +9,9 @@
use strict;
use warnings;
+use File::Basename;
+use File::Spec::Functions qw(abs2rel rel2abs);
+
use lib ".";
use configdata;
@@ -124,8 +127,10 @@ if ( $internal ) {
# Data parsed out of the config and state files.
# We always map function-code values to zero, so items marked below with
# an asterisk could eventually be removed. TODO(4.0)
-my %hinc; # lib -> header
-my %libinc; # header -> lib
+my %hpubinc; # lib -> public header
+my %libpubinc; # public header -> lib
+my %hprivinc; # lib -> private header
+my %libprivinc; # private header -> lib
my %cskip; # error_file -> lib
my %errorfile; # lib -> error file name
my %fmax; # lib -> max assigned function code*
@@ -145,21 +150,30 @@ my %strings; # define -> text
open(IN, "$config") || die "Can't open config file $config, $!,";
while ( <IN> ) {
next if /^#/ || /^$/;
- if ( /^L\s+(\S+)\s+(\S+)\s+(\S+)/ ) {
+ if ( /^L\s+(\S+)\s+(\S+)\s+(\S+)(?:\s+(\S+))?\s+$/ ) {
my $lib = $1;
- my $hdr = $2;
+ my $pubhdr = $2;
my $err = $3;
- $hinc{$lib} = $hdr;
- $libinc{$hdr} = $lib;
+ my $privhdr = $4 // 'NONE';
+ $hpubinc{$lib} = $pubhdr;
+ $libpubinc{$pubhdr} = $lib;
+ $hprivinc{$lib} = $privhdr;
+ $libprivinc{$privhdr} = $lib;
$cskip{$err} = $lib;
- next if $err eq 'NONE';
$errorfile{$lib} = $err;
+ next if $err eq 'NONE';
$fmax{$lib} = 100;
$rmax{$lib} = 100;
$fassigned{$lib} = ":";
$rassigned{$lib} = ":";
$fnew{$lib} = 0;
$rnew{$lib} = 0;
+ die "Public header file must be in include/openssl ($pubhdr is not)\n"
+ if ($internal
+ && $pubhdr ne 'NONE'
+ && $pubhdr !~ m|^include/openssl/|);
+ die "Private header file may only be specified with -internal ($privhdr given)\n"
+ unless ($privhdr eq 'NONE' || $internal);
} elsif ( /^R\s+(\S+)\s+(\S+)/ ) {
$rextra{$1} = $2;
$rcodes{$1} = $2;
@@ -211,6 +225,7 @@ if ( ! $reindex && $statefile ) {
$skippedstate++;
next;
}
+ next if $errorfile{$lib} eq 'NONE';
if ( $name =~ /^(?:OSSL_|OPENSSL_)?[A-Z0-9]{2,}_R_/ ) {
die "$lib reason code $code collision at $name\n"
if $rassigned{$lib} =~ /:$code:/;
@@ -252,10 +267,9 @@ if ( ! $reindex && $statefile ) {
}
}
-# Scan each header file and make a list of error codes
-# and function names
+# Scan each public header file and make a list of function codes and names
&phase("Scanning headers");
-while ( ( my $hdr, my $lib ) = each %libinc ) {
+while ( ( my $hdr, my $lib ) = each %libpubinc ) {
next if $hdr eq "NONE";
print STDERR " ." if $debug;
my $line = "";
@@ -386,6 +400,7 @@ foreach my $file ( @source ) {
if ( /(((?:OSSL_|OPENSSL_)?[A-Z0-9]{2,})_F_([A-Z0-9_]+))/ ) {
next unless exists $errorfile{$2};
+ next if $errorfile{$2} eq 'NONE';
next if $1 eq "BIO_F_BUFFER_CTX";
$usedfuncs{$1} = 1;
if ( !exists $fcodes{$1} ) {
@@ -399,6 +414,7 @@ foreach my $file ( @source ) {
}
if ( /(((?:OSSL_|OPENSSL_)?[A-Z0-9]{2,})_R_[A-Z0-9_]+)/ ) {
next unless exists $errorfile{$2};
+ next if $errorfile{$2} eq 'NONE';
$usedreasons{$1} = 1;
if ( !exists $rcodes{$1} ) {
print STDERR " New reason $1\n" if $debug;
@@ -419,7 +435,6 @@ foreach my $lib ( keys %errorfile ) {
next if ! $fnew{$lib} && ! $rnew{$lib} && ! $rebuild;
next if scalar keys %modules > 0 && !$modules{$lib};
next if $nowrite;
- next if $hinc{$lib} eq 'NONE';
print STDERR "$lib: $fnew{$lib} new functions\n" if $fnew{$lib};
print STDERR "$lib: $rnew{$lib} new reasons\n" if $rnew{$lib};
$newstate = 1;
@@ -434,15 +449,32 @@ foreach my $lib ( keys %errorfile ) {
# indent level for innermost preprocessor lines
my $indent = " ";
- # Rewrite the header file
+ # Flag if the sub-library is disablable
+ # There are a few exceptions, where disabling the sub-library
+ # doesn't actually remove the whole sub-library, but rather implements
+ # it with a NULL backend.
+ my $disablable =
+ ($lib ne "SSL" && $lib ne "ASYNC" && $lib ne "DSO"
+ && (grep { $lib eq uc $_ } @disablables, @disablables_int));
- my $hfile = $hinc{$lib};
- $hfile =~ s/.h$/err.h/ if $internal;
- open( OUT, ">$hfile" ) || die "Can't write to $hfile, $!,";
- print OUT <<"EOF";
+ # Rewrite the internal header file if there is one ($internal only!)
+
+ if ($hprivinc{$lib} ne 'NONE') {
+ my $hfile = $hprivinc{$lib};
+ my $guard = $hfile;
+
+ if ($guard =~ m|^include/|) {
+ $guard = $';
+ } else {
+ $guard = basename($guard);
+ }
+ $guard = "OSSL_" . join('_', split(m|[./]|, uc $guard));
+
+ open( OUT, ">$hfile" ) || die "Can't write to $hfile, $!,";
+ print OUT <<"EOF";
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-$YEAR The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2020-$YEAR 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
@@ -450,41 +482,142 @@ foreach my $lib ( keys %errorfile ) {
* https://www.openssl.org/source/license.html
*/
-#ifndef OPENSSL_${lib}ERR_H
-# define OPENSSL_${lib}ERR_H
+#ifndef $guard
+# define $guard
# pragma once
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
+# ifdef __cplusplus
+extern \"C\" {
+# endif
EOF
- if ( $internal ) {
- # Declare the load function because the generate C file
- # includes "fooerr.h" not "foo.h"
- if ($lib ne "SSL" && $lib ne "ASYNC"
- && (grep { $lib eq uc $_ } @disablables, @disablables_int)) {
+ $indent = ' ';
+ if ($disablable) {
print OUT <<"EOF";
-# include <openssl/opensslconf.h>
-
# ifndef OPENSSL_NO_${lib}
EOF
$indent = " ";
}
print OUT <<"EOF";
-#${indent}ifdef __cplusplus
-extern \"C\"
-#${indent}endif
-int ERR_load_${lib}_strings(void);
+int err_load_${lib}_strings_int(void);
EOF
- } else {
+
+ # If this library doesn't have a public header file, we write all
+ # definitions that would end up there here instead
+ if ($hpubinc{$lib} eq 'NONE') {
+ print OUT "\n/*\n * $lib function codes.\n */\n";
+ print OUT "#${indent}ifndef OPENSSL_NO_DEPRECATED_3_0\n";
+ foreach my $i ( @function ) {
+ my $z = 48 - length($i);
+ $z = 0 if $z < 0;
+ if ( $fcodes{$i} eq "X" ) {
+ $fassigned{$lib} =~ m/^:([^:]*):/;
+ my $findcode = $1;
+ $findcode = $fmax{$lib} if !defined $findcode;
+ while ( $fassigned{$lib} =~ m/:$findcode:/ ) {
+ $findcode++;
+ }
+ $fcodes{$i} = $findcode;
+ $fassigned{$lib} .= "$findcode:";
+ print STDERR "New Function code $i\n" if $debug;
+ }
+ printf OUT "#${indent} define $i%s 0\n", " " x $z;
+ }
+ print OUT "#${indent}endif\n";
+
+ print OUT "\n/*\n * $lib reason codes.\n */\n";
+ foreach my $i ( @reasons ) {
+ my $z = 48 - length($i);
+ $z = 0 if $z < 0;
+ if ( $rcodes{$i} eq "X" ) {
+ $rassigned{$lib} =~ m/^:([^:]*):/;
+ my $findcode = $1;
+ $findcode = $rmax{$lib} if !defined $findcode;
+ while ( $rassigned{$lib} =~ m/:$findcode:/ ) {
+ $findcode++;
+ }
+ $rcodes{$i} = $findcode;
+ $rassigned{$lib} .= "$findcode:";
+ print STDERR "New Reason code $i\n" if $debug;
+ }
+ printf OUT "#${indent}define $i%s $rcodes{$i}\n", " " x $z;
+ }
+ print OUT "\n";
+ }
+
+ # This doesn't go all the way down to zero, to allow for the ending
+ # brace for 'extern "C" {'.
+ while (length($indent) > 1) {
+ $indent = substr $indent, 0, -1;
+ print OUT "#${indent}endif\n";
+ }
+
print OUT <<"EOF";
-# define ${lib}err(f, r) ERR_${lib}_error(0, (r), OPENSSL_FILE, OPENSSL_LINE)
+# ifdef __cplusplus
+}
+# endif
+#endif
EOF
- if ( ! $static ) {
+ close OUT;
+ }
+
+ # Rewrite the public header file
+
+ if ($hpubinc{$lib} ne 'NONE') {
+ my $extra_include =
+ $internal
+ ? ($lib ne 'SSL'
+ ? "# include <openssl/cryptoerr_legacy.h>\n"
+ : "# include <openssl/sslerr_legacy.h>\n")
+ : '';
+ my $hfile = $hpubinc{$lib};
+ my $guard = $hfile;
+ $guard =~ s|^include/||;
+ $guard = join('_', split(m|[./]|, uc $guard));
+ $guard = "OSSL_" . $guard unless $internal;
+
+ open( OUT, ">$hfile" ) || die "Can't write to $hfile, $!,";
+ print OUT <<"EOF";
+/*
+ * Generated by util/mkerr.pl DO NOT EDIT
+ * Copyright 1995-$YEAR 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
+ */
+
+#ifndef $guard
+# define $guard
+# pragma once
+
+# include <openssl/opensslconf.h>
+# include <openssl/symhacks.h>
+$extra_include
+
+EOF
+ $indent = ' ';
+ if ( $internal ) {
+ if ($disablable) {
+ print OUT <<"EOF";
+# ifndef OPENSSL_NO_${lib}
+
+EOF
+ $indent .= ' ';
+ }
+ } else {
print OUT <<"EOF";
+# define ${lib}err(f, r) ERR_${lib}_error(0, (r), OPENSSL_FILE, OPENSSL_LINE)
+
+EOF
+ if ( ! $static ) {
+ print OUT <<"EOF";
# ifdef __cplusplus
extern \"C\" {
@@ -496,72 +629,86 @@ void ERR_${lib}_error(int function, int reason, char *file, int line);
}
# endif
EOF
+ }
}
- }
- print OUT "\n/*\n * $lib function codes.\n */\n";
- print OUT "# ifndef OPENSSL_NO_DEPRECATED_3_0\n";
- foreach my $i ( @function ) {
- my $z = 48 - length($i);
- $z = 0 if $z < 0;
- if ( $fcodes{$i} eq "X" ) {
- $fassigned{$lib} =~ m/^:([^:]*):/;
- my $findcode = $1;
- $findcode = $fmax{$lib} if !defined $findcode;
- while ( $fassigned{$lib} =~ m/:$findcode:/ ) {
- $findcode++;
+ print OUT "\n/*\n * $lib function codes.\n */\n";
+ print OUT "#${indent}ifndef OPENSSL_NO_DEPRECATED_3_0\n";
+ foreach my $i ( @function ) {
+ my $z = 48 - length($i);
+ $z = 0 if $z < 0;
+ if ( $fcodes{$i} eq "X" ) {
+ $fassigned{$lib} =~ m/^:([^:]*):/;
+ my $findcode = $1;
+ $findcode = $fmax{$lib} if !defined $findcode;
+ while ( $fassigned{$lib} =~ m/:$findcode:/ ) {
+ $findcode++;
+ }
+ $fcodes{$i} = $findcode;
+ $fassigned{$lib} .= "$findcode:";
+ print STDERR "New Function code $i\n" if $debug;
}
- $fcodes{$i} = $findcode;
- $fassigned{$lib} .= "$findcode:";
- print STDERR "New Function code $i\n" if $debug;
+ printf OUT "#${indent} define $i%s 0\n", " " x $z;
}
- printf OUT "#${indent} define $i%s 0\n", " " x $z;
- }
- print OUT "# endif\n";
-
- print OUT "\n/*\n * $lib reason codes.\n */\n";
- foreach my $i ( @reasons ) {
- my $z = 48 - length($i);
- $z = 0 if $z < 0;
- if ( $rcodes{$i} eq "X" ) {
- $rassigned{$lib} =~ m/^:([^:]*):/;
- my $findcode = $1;
- $findcode = $rmax{$lib} if !defined $findcode;
- while ( $rassigned{$lib} =~ m/:$findcode:/ ) {
- $findcode++;
+ print OUT "#${indent}endif\n";
+
+ print OUT "\n/*\n * $lib reason codes.\n */\n";
+ foreach my $i ( @reasons ) {
+ my $z = 48 - length($i);
+ $z = 0 if $z < 0;
+ if ( $rcodes{$i} eq "X" ) {
+ $rassigned{$lib} =~ m/^:([^:]*):/;
+ my $findcode = $1;
+ $findcode = $rmax{$lib} if !defined $findcode;
+ while ( $rassigned{$lib} =~ m/:$findcode:/ ) {
+ $findcode++;
+ }
+ $rcodes{$i} = $findcode;
+ $rassigned{$lib} .= "$findcode:";
+ print STDERR "New Reason code $i\n" if $debug;
}
- $rcodes{$i} = $findcode;
- $rassigned{$lib} .= "$findcode:";
- print STDERR "New Reason code $i\n" if $debug;
+ printf OUT "#${indent}define $i%s $rcodes{$i}\n", " " x $z;
}
- printf OUT "#${indent}define $i%s $rcodes{$i}\n", " " x $z;
- }
- print OUT "\n";
+ print OUT "\n";
- while (length($indent) > 0) {
- $indent = substr $indent, 0, -1;
- print OUT "#${indent}endif\n";
+ while (length($indent) > 0) {
+ $indent = substr $indent, 0, -1;
+ print OUT "#${indent}endif\n";
+ }
+ close OUT;
}
# Rewrite the C source file containing the error details.
- # First, read any existing reason string definitions:
- my $cfile = $errorfile{$lib};
- my $pack_lib = $internal ? "ERR_LIB_${lib}" : "0";
- my $hincf = $hfile;
- $hincf =~ s|.*include/||;
- if ( $hincf =~ m|^openssl/| ) {
- $hincf = "<${hincf}>";
- } else {
- $hincf = "\"${hincf}\"";
- }
+ if ($errorfile{$lib} ne 'NONE') {
+ # First, read any existing reason string definitions:
+ my $cfile = $errorfile{$lib};
+ my $pack_lib = $internal ? "ERR_LIB_${lib}" : "0";
+ my $hpubincf = $hpubinc{$lib};
+ my $hprivincf = $hprivinc{$lib};
+ my $includes = '';
+ if ($internal) {
+ if ($hpubincf ne 'NONE') {
+ $hpubincf =~ s|^include/||;
+ $includes .= "#include <${hpubincf}>\n";
+ }
+ if ($hprivincf =~ m|^include/|) {
+ $hprivincf = $';
+ } else {
+ $hprivincf = abs2rel(rel2abs($hprivincf),
+ rel2abs(dirname($cfile)));
+ }
+ $includes .= "#include \"${hprivincf}\"\n";
+ } else {
+ $includes .= "#include \"${hpubincf}\"\n";
+ }
- open( OUT, ">$cfile" )
- || die "Can't open $cfile for writing, $!, stopped";
+ open( OUT, ">$cfile" )
+ || die "Can't open $cfile for writing, $!, stopped";
- my $const = $internal ? 'const ' : '';
+ my $const = $internal ? 'const ' : '';
- print OUT <<"EOF";
+ print OUT <<"EOF";
/*
* Generated by util/mkerr.pl DO NOT EDIT
* Copyright 1995-$YEAR The OpenSSL Project Authors. All Rights Reserved.
@@ -573,53 +720,64 @@ EOF
*/
#include <openssl/err.h>
-#include $hincf
+$includes
+EOF
+ $indent = '';
+ if ( $internal ) {
+ if ($disablable) {
+ print OUT <<"EOF";
+#ifndef OPENSSL_NO_${lib}
-#ifndef OPENSSL_NO_ERR
+EOF
+ $indent .= ' ';
+ }
+ }
+ print OUT <<"EOF";
+#${indent}ifndef OPENSSL_NO_ERR
static ${const}ERR_STRING_DATA ${lib}_str_reasons[] = {
EOF
- # Add each reason code.
- foreach my $i ( @reasons ) {
- my $rn;
- if ( exists $strings{$i} ) {
- $rn = $strings{$i};
- $rn = "" if $rn eq '*';
- } else {
- $i =~ /^${lib}_R_(\S+)$/;
- $rn = $1;
- $rn =~ tr/_[A-Z]/ [a-z]/;
- $strings{$i} = $rn;
- }
- my $short = " {ERR_PACK($pack_lib, 0, $i), \"$rn\"},";
- if ( length($short) <= 80 ) {
- print OUT "$short\n";
- } else {
- print OUT " {ERR_PACK($pack_lib, 0, $i),\n \"$rn\"},\n";
+ # Add each reason code.
+ foreach my $i ( @reasons ) {
+ my $rn;
+ if ( exists $strings{$i} ) {
+ $rn = $strings{$i};
+ $rn = "" if $rn eq '*';
+ } else {
+ $i =~ /^${lib}_R_(\S+)$/;
+ $rn = $1;
+ $rn =~ tr/_[A-Z]/ [a-z]/;
+ $strings{$i} = $rn;
+ }
+ my $short = " {ERR_PACK($pack_lib, 0, $i), \"$rn\"},";
+ if ( length($short) <= 80 ) {
+ print OUT "$short\n";
+ } else {
+ print OUT " {ERR_PACK($pack_lib, 0, $i),\n \"$rn\"},\n";
+ }
}
- }
- print OUT <<"EOF";
+ print OUT <<"EOF";
{0, NULL}
};
-#endif
+#${indent}endif
EOF
- if ( $internal ) {
- print OUT <<"EOF";
+ if ( $internal ) {
+ print OUT <<"EOF";
-int ERR_load_${lib}_strings(void)
+int err_load_${lib}_strings_int(void)
{
-#ifndef OPENSSL_NO_ERR
+#${indent}ifndef OPENSSL_NO_ERR
if (ERR_reason_error_string(${lib}_str_reasons[0].error) == NULL)
ERR_load_strings_const(${lib}_str_reasons);
-#endif
+#${indent}endif
return 1;
}
EOF
- } else {
- my $st = $static ? "static " : "";
- print OUT <<"EOF";
+ } else {
+ my $st = $static ? "static " : "";
+ print OUT <<"EOF";
static int lib_code = 0;
static int error_loaded = 0;
@@ -657,9 +815,21 @@ ${st}void ERR_${lib}_error(int function, int reason, char *file, int line)
}
EOF
- }
+ }
- close OUT;
+ while (length($indent) > 1) {
+ $indent = substr $indent, 0, -1;
+ print OUT "#${indent}endif\n";
+ }
+ if ($internal && $disablable) {
+ print OUT <<"EOF";
+#else
+NON_EMPTY_TRANSLATION_UNIT
+#endif
+EOF
+ }
+ close OUT;
+ }
}
&phase("Ending");
More information about the openssl-commits
mailing list