diff options
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_BIT_STRING_SET_BIT), "ASN1_BIT_STRING_set_bit"}, - {ERR_FUNC(ASN1_F_ASN1_CB), "asn1_cb"}, - {ERR_FUNC(ASN1_F_ASN1_CHECK_TLEN), "asn1_check_tlen"}, - {ERR_FUNC(ASN1_F_ASN1_COLLECT), "asn1_collect"}, - {ERR_FUNC(ASN1_F_ASN1_D2I_EX_PRIMITIVE), "asn1_d2i_ex_primitive"}, - {ERR_FUNC(ASN1_F_ASN1_D2I_FP), "ASN1_d2i_fp"}, - {ERR_FUNC(ASN1_F_ASN1_D2I_READ_BIO), "asn1_d2i_read_bio"}, - {ERR_FUNC(ASN1_F_ASN1_DIGEST), "ASN1_digest"}, - {ERR_FUNC(ASN1_F_ASN1_DO_ADB), "asn1_do_adb"}, - {ERR_FUNC(ASN1_F_ASN1_DO_LOCK), "asn1_do_lock"}, - {ERR_FUNC(ASN1_F_ASN1_DUP), "ASN1_dup"}, - {ERR_FUNC(ASN1_F_ASN1_EX_C2I), "asn1_ex_c2i"}, - {ERR_FUNC(ASN1_F_ASN1_FIND_END), "asn1_find_end"}, - {ERR_FUNC(ASN1_F_ASN1_GENERALIZEDTIME_ADJ), "ASN1_GENERALIZEDTIME_adj"}, - {ERR_FUNC(ASN1_F_ASN1_GENERATE_V3), "ASN1_generate_v3"}, - {ERR_FUNC(ASN1_F_ASN1_GET_INT64), "asn1_get_int64"}, - {ERR_FUNC(ASN1_F_ASN1_GET_OBJECT), "ASN1_get_object"}, - {ERR_FUNC(ASN1_F_ASN1_GET_UINT64), "asn1_get_uint64"}, - {ERR_FUNC(ASN1_F_ASN1_I2D_BIO), "ASN1_i2d_bio"}, - {ERR_FUNC(ASN1_F_ASN1_I2D_FP), "ASN1_i2d_fp"}, - {ERR_FUNC(ASN1_F_ASN1_ITEM_D2I_FP), "ASN1_item_d2i_fp"}, - {ERR_FUNC(ASN1_F_ASN1_ITEM_DUP), "ASN1_item_dup"}, - {ERR_FUNC(ASN1_F_ASN1_ITEM_EMBED_D2I), "asn1_item_embed_d2i"}, - {ERR_FUNC(ASN1_F_ASN1_ITEM_EMBED_NEW), "asn1_item_embed_new"}, - {ERR_FUNC(ASN1_F_ASN1_ITEM_I2D_BIO), "ASN1_item_i2d_bio"}, - {ERR_FUNC(ASN1_F_ASN1_ITEM_I2D_FP), "ASN1_item_i2d_fp"}, - {ERR_FUNC(ASN1_F_ASN1_ITEM_PACK), "ASN1_item_pack"}, - {ERR_FUNC(ASN1_F_ASN1_ITEM_SIGN), "ASN1_item_sign"}, - {ERR_FUNC(ASN1_F_ASN1_ITEM_SIGN_CTX), "ASN1_item_sign_ctx"}, - {ERR_FUNC(ASN1_F_ASN1_ITEM_UNPACK), "ASN1_item_unpack"}, - {ERR_FUNC(ASN1_F_ASN1_ITEM_VERIFY), "ASN1_item_verify"}, - {ERR_FUNC(ASN1_F_ASN1_MBSTRING_NCOPY), "ASN1_mbstring_ncopy"}, - {ERR_FUNC(ASN1_F_ASN1_OBJECT_NEW), "ASN1_OBJECT_new"}, - {ERR_FUNC(ASN1_F_ASN1_OUTPUT_DATA), "asn1_output_data"}, - {ERR_FUNC(ASN1_F_ASN1_PCTX_NEW), "ASN1_PCTX_new"}, - {ERR_FUNC |