summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2017-06-07 15:12:03 -0400
committerRich Salz <rsalz@openssl.org>2017-06-07 15:12:03 -0400
commit52df25cf2e656146cb3b206d8220124f0417d03f (patch)
treea0502334c45d96ad9ab32a855ee5bea28df2191d
parentbe606c013d31847718ceb5d97c567988a771c2e5 (diff)
make error tables const and separate header file
Run perltidy on util/mkerr Change some mkerr flags, write some doc comments Make generated tables "const" when genearting lib-internal ones. Add "state" file for mkerr Renerate error tables and headers Rationalize declaration of ERR_load_XXX_strings Fix out-of-tree build Add -static; sort flags/vars for options. Also tweak code output Moved engines/afalg to engines (from master) Use -static flag Standard engine #include's of errors Don't linewrap err string tables unless necessary Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3392)
-rw-r--r--.gitignore7
-rw-r--r--Configurations/unix-Makefile.tmpl12
-rw-r--r--crypto/asn1/asn1_err.c539
-rw-r--r--crypto/async/async_err.c42
-rw-r--r--crypto/bio/bio_err.c207
-rw-r--r--crypto/bn/bn_err.c162
-rw-r--r--crypto/buffer/buf_err.c24
-rw-r--r--crypto/cms/cms_err.c429
-rw-r--r--crypto/comp/comp_err.c35
-rw-r--r--crypto/conf/conf_err.c102
-rw-r--r--crypto/cpt_err.c57
-rw-r--r--crypto/ct/ct_err.c125
-rw-r--r--crypto/dh/dh_err.c85
-rw-r--r--crypto/dsa/dsa_err.c93
-rw-r--r--crypto/dso/dso_err.c135
-rw-r--r--crypto/ec/ec_err.c506
-rw-r--r--crypto/engine/eng_err.c207
-rw-r--r--crypto/err/err.c89
-rw-r--r--crypto/err/openssl.ec163
-rw-r--r--crypto/err/openssl.txt2461
-rw-r--r--crypto/evp/evp_err.c364
-rw-r--r--crypto/kdf/kdf_err.c30
-rw-r--r--crypto/objects/obj_err.c36
-rw-r--r--crypto/ocsp/ocsp_err.c132
-rw-r--r--crypto/pem/pem_err.c185
-rw-r--r--crypto/pkcs12/pk12err.c142
-rw-r--r--crypto/pkcs7/pkcs7err.c223
-rw-r--r--crypto/rand/rand_err.c22
-rw-r--r--crypto/rsa/rsa_err.c342
-rw-r--r--crypto/ts/ts_err.c264
-rw-r--r--crypto/ui/ui_err.c89
-rw-r--r--crypto/x509/x509_err.c229
-rw-r--r--crypto/x509v3/v3err.c367
-rw-r--r--demos/engines/e_chil.txt12
-rw-r--r--engines/build.info4
-rw-r--r--engines/e_afalg.c4
-rw-r--r--engines/e_afalg.ec4
-rw-r--r--engines/e_afalg.txt18
-rw-r--r--engines/e_afalg_err.c114
-rw-r--r--engines/e_afalg_err.h49
-rw-r--r--engines/e_capi.ec4
-rw-r--r--engines/e_capi.txt50
-rw-r--r--engines/e_capi.txt.old50
-rw-r--r--engines/e_capi_err.c180
-rw-r--r--engines/e_capi_err.h95
-rw-r--r--engines/e_dasync.c1
-rw-r--r--engines/e_dasync.ec4
-rw-r--r--engines/e_dasync.txt12
-rw-r--r--engines/e_dasync.txt.old12
-rw-r--r--engines/e_dasync_err.c91
-rw-r--r--engines/e_dasync_err.h39
-rw-r--r--engines/e_ossltest.c1
-rw-r--r--engines/e_ossltest.ec4
-rw-r--r--engines/e_ossltest.txt3
-rw-r--r--engines/e_ossltest.txt.old3
-rw-r--r--engines/e_ossltest_err.c69
-rw-r--r--engines/e_ossltest_err.h35
-rw-r--r--engines/e_padlock.ec1
-rw-r--r--include/internal/dso.h64
-rw-r--r--include/internal/dsoerr.h81
-rw-r--r--include/openssl/asn1.h225
-rw-r--r--include/openssl/asn1err.h239
-rw-r--r--include/openssl/async.h23
-rw-r--r--include/openssl/asyncerr.h40
-rw-r--r--include/openssl/bio.h97
-rw-r--r--include/openssl/bioerr.h113
-rw-r--r--include/openssl/bn.h77
-rw-r--r--include/openssl/bnerr.h94
-rw-r--r--include/openssl/buffer.h16
-rw-r--r--include/openssl/buffererr.h33
-rw-r--r--include/openssl/cms.h184
-rw-r--r--include/openssl/cmserr.h192
-rw-r--r--include/openssl/comp.h20
-rw-r--r--include/openssl/comperr.h37
-rw-r--r--include/openssl/conf.h49
-rw-r--r--include/openssl/conferr.h65
-rw-r--r--include/openssl/crypto.h27
-rw-r--r--include/openssl/cryptoerr.h44
-rw-r--r--include/openssl/ct.h58
-rw-r--r--include/openssl/cterr.h74
-rw-r--r--include/openssl/dh.h45
-rw-r--r--include/openssl/dherr.h62
-rw-r--r--include/openssl/dsa.h47
-rw-r--r--include/openssl/dsaerr.h64
-rw-r--r--include/openssl/ec.h220
-rw-r--r--include/openssl/ecerr.h237
-rw-r--r--include/openssl/engine.h85
-rw-r--r--include/openssl/engineerr.h102
-rw-r--r--include/openssl/err.h5
-rw-r--r--include/openssl/evp.h150
-rw-r--r--include/openssl/evperr.h167
-rw-r--r--include/openssl/kdf.h19
-rw-r--r--include/openssl/kdferr.h35
-rw-r--r--include/openssl/objects.h22
-rw-r--r--include/openssl/objectserr.h39
-rw-r--r--include/openssl/ocsp.h54
-rw-r--r--include/openssl/ocsperr.h71
-rw-r--r--include/openssl/pem.h85
-rw-r--r--include/openssl/pemerr.h101
-rw-r--r--include/openssl/pkcs12.h61
-rw-r--r--include/openssl/pkcs12err.h76
-rw-r--r--include/openssl/pkcs7.h87
-rw-r--r--include/openssl/pkcs7err.h102
-rw-r--r--include/openssl/rand.h15
-rw-r--r--include/openssl/randerr.h32
-rw-r--r--include/openssl/rsa.h141
-rw-r--r--include/openssl/rsaerr.h157
-rw-r--r--include/openssl/ssl.h626
-rw-r--r--include/openssl/sslerr.h643
-rw-r--r--include/openssl/ts.h111
-rw-r--r--include/openssl/tserr.h126
-rw-r--r--include/openssl/ui.h44
-rw-r--r--include/openssl/uierr.h61
-rw-r--r--include/openssl/x509.h103
-rw-r--r--include/openssl/x509err.h118
-rw-r--r--include/openssl/x509v3.h140
-rw-r--r--include/openssl/x509v3err.h155
-rw-r--r--ssl/ssl_err.c1671
-rw-r--r--util/libcrypto.num1
-rwxr-xr-xutil/mkdef.pl79
-rwxr-xr-x[-rw-r--r--]util/mkerr.pl1255
121 files changed, 10788 insertions, 7242 deletions
diff --git a/.gitignore b/.gitignore
index e613e4d8a0..9c496b2d6d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -30,6 +30,13 @@ Makefile
/openssl/include/opensslconf.h
/util/domd
+# error code files
+/crypto/err/openssl.txt.old
+/engines/e_afalg.txt.old
+/engines/e_capi.txt.old
+/engines/e_dasync.txt.old
+/engines/e_ossltest.txt.old
+
# Executables
/apps/openssl
/test/sha256t
diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl
index 132b83cd2c..1293059a45 100644
--- a/Configurations/unix-Makefile.tmpl
+++ b/Configurations/unix-Makefile.tmpl
@@ -650,14 +650,16 @@ generate_crypto_asn1:
( cd $(SRCDIR); $(PERL) crypto/asn1/charmap.pl \
> crypto/asn1/charmap.h )
+# Set to -force to force a rebuild
+ERROR_REBUILD=
errors:
( cd $(SRCDIR); $(PERL) util/ck_errf.pl -strict */*.c */*/*.c )
- ( cd $(SRCDIR); $(PERL) util/mkerr.pl -recurse -write )
+ ( cd $(SRCDIR); $(PERL) util/mkerr.pl $(ERROR_REBUILD) -internal )
( cd $(SRCDIR)/engines; \
- for e in *.ec; do \
- $(PERL) ../util/mkerr.pl -conf $$e \
- -nostatic -staticloader -write *.c; \
- done )
+ for E in *.ec ; do \
+ $(PERL) ../util/mkerr.pl $(ERROR_REBUILD) -static \
+ -conf $$E `basename $$E .ec`.c ; \
+ done )
ordinals:
( b=`pwd`; cd $(SRCDIR); $(PERL) -I$$b util/mkdef.pl crypto update )
diff --git a/crypto/asn1/asn1_err.c b/crypto/asn1/asn1_err.c
index dd0e99e624..da856b27cf 100644
--- a/crypto/asn1/asn1_err.c
+++ b/crypto/asn1/asn1_err.c
@@ -8,250 +8,312 @@
* https://www.openssl.org/source/license.html
*/
-#include <stdio.h>
#include <openssl/err.h>
-#include <openssl/asn1.h>
+#include <openssl/asn1err.h>
-/* BEGIN ERROR CODES */
#ifndef OPENSSL_NO_ERR
-# define ERR_FUNC(func) ERR_PACK(ERR_LIB_ASN1,func,0)
-# define ERR_REASON(reason) ERR_PACK(ERR_LIB_ASN1,0,reason)
-
-static ERR_STRING_DATA ASN1_str_functs[] = {
- {ERR_FUNC(ASN1_F_A2D_ASN1_OBJECT), "a2d_ASN1_OBJECT"},
- {ERR_FUNC(ASN1_F_A2I_ASN1_INTEGER), "a2i_ASN1_INTEGER"},
- {ERR_FUNC(ASN1_F_A2I_ASN1_STRING), "a2i_ASN1_STRING"},
- {ERR_FUNC(ASN1_F_APPEND_EXP), "append_exp"},
- {ERR_FUNC(ASN1_F_ASN1_B