Fix various error codes to match functions.
authorDr. Stephen Henson <steve@openssl.org>
Mon, 17 Jul 2006 16:33:31 +0000 (16:33 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Mon, 17 Jul 2006 16:33:31 +0000 (16:33 +0000)
24 files changed:
crypto/asn1/asn1.h
crypto/asn1/asn1_err.c
crypto/asn1/p5_pbev2.c
crypto/dh/dh.h
crypto/dh/dh_ameth.c
crypto/dh/dh_err.c
crypto/dsa/dsa.h
crypto/dsa/dsa_ameth.c
crypto/dsa/dsa_err.c
crypto/ec/ec.h
crypto/ec/ec_ameth.c
crypto/ec/ec_err.c
crypto/evp/evp.h
crypto/evp/evp_err.c
crypto/evp/evp_pbe.c
crypto/evp/pmeth_fn.c
crypto/ocsp/ocsp.h
crypto/ocsp/ocsp_err.c
crypto/ocsp/ocsp_ht.c
crypto/rsa/rsa.h
crypto/rsa/rsa_ameth.c
crypto/rsa/rsa_err.c
crypto/rsa/rsa_sign.c
util/ck_errf.pl

index 02d7829a163dcb49de7659e9965eac34b0ca5866..d2b8329098af2e2e127f21e65930fc99dee0b0f3 100644 (file)
@@ -1151,7 +1151,7 @@ void ERR_load_ASN1_strings(void);
 #define ASN1_F_LONG_C2I                                         166
 #define ASN1_F_OID_MODULE_INIT                          174
 #define ASN1_F_PARSE_TAGGING                            182
-#define ASN1_F_PKCS5_PBE2_SET                           167
+#define ASN1_F_PKCS5_PBE2_SET_IV                        167
 #define ASN1_F_PKCS5_PBE_SET                            202
 #define ASN1_F_X509_CINF_NEW                            168
 #define ASN1_F_X509_CRL_ADD0_REVOKED                    169
index 148455c2d6a52661e01107bfc337254cddb3a3cb..2890b4fa80e1aa67937a629415399d9f4c807bfd 100644 (file)
@@ -167,8 +167,7 @@ static ERR_STRING_DATA ASN1_str_functs[]=
 {ERR_FUNC(ASN1_F_LONG_C2I),    "LONG_C2I"},
 {ERR_FUNC(ASN1_F_OID_MODULE_INIT),     "OID_MODULE_INIT"},
 {ERR_FUNC(ASN1_F_PARSE_TAGGING),       "PARSE_TAGGING"},
-{ERR_FUNC(ASN1_F_PKCS5_PBE2_SET),      "PKCS5_pbe2_set"},
-{ERR_FUNC(ASN1_F_PKCS5_PBE_SET),       "PKCS5_PBE_SET"},
+{ERR_FUNC(ASN1_F_PKCS5_PBE2_SET_IV),   "PKCS5_pbe2_set_iv"},
 {ERR_FUNC(ASN1_F_X509_CINF_NEW),       "X509_CINF_NEW"},
 {ERR_FUNC(ASN1_F_X509_CRL_ADD0_REVOKED),       "X509_CRL_ADD0_REVOKED"},
 {ERR_FUNC(ASN1_F_X509_INFO_NEW),       "X509_INFO_NEW"},
index dac66d8c4f1dd543cad144fb3676e1dd24e70e9a..3c1db8afcc1597697d0c4160b9b1ad25bd9240e0 100644 (file)
@@ -101,7 +101,7 @@ X509_ALGOR *PKCS5_pbe2_set_iv(const EVP_CIPHER *cipher, int iter,
 
        alg_nid = EVP_CIPHER_type(cipher);
        if(alg_nid == NID_undef) {
-               ASN1err(ASN1_F_PKCS5_PBE2_SET,
+               ASN1err(ASN1_F_PKCS5_PBE2_SET_IV,
                                ASN1_R_CIPHER_HAS_NO_OBJECT_IDENTIFIER);
                goto err;
        }
@@ -129,7 +129,7 @@ X509_ALGOR *PKCS5_pbe2_set_iv(const EVP_CIPHER *cipher, int iter,
        /* Dummy cipherinit to just setup the IV, and PRF */
        EVP_CipherInit_ex(&ctx, cipher, NULL, NULL, iv, 0);
        if(EVP_CIPHER_param_to_asn1(&ctx, scheme->parameter) < 0) {
-               ASN1err(ASN1_F_PKCS5_PBE2_SET,
+               ASN1err(ASN1_F_PKCS5_PBE2_SET_IV,
                                        ASN1_R_ERROR_SETTING_CIPHER_PARAMS);
                EVP_CIPHER_CTX_cleanup(&ctx);
                goto err;
@@ -214,7 +214,7 @@ X509_ALGOR *PKCS5_pbe2_set_iv(const EVP_CIPHER *cipher, int iter,
        return ret;
 
        merr:
-       ASN1err(ASN1_F_PKCS5_PBE2_SET,ERR_R_MALLOC_FAILURE);
+       ASN1err(ASN1_F_PKCS5_PBE2_SET_IV,ERR_R_MALLOC_FAILURE);
 
        err:
        PBE2PARAM_free(pbe2);
index 10bf3fe5de8ae2a0566124e0f6ffa84afe70d228..ecd61f36c178ba7fffdc4c9b7ee9ec92e0d8db9d 100644 (file)
@@ -223,7 +223,7 @@ void ERR_load_DH_strings(void);
 
 /* Function codes. */
 #define DH_F_COMPUTE_KEY                                102
-#define DH_F_DHPARAMS_PRINT                             100
+#define DH_F_DO_DH_PRINT                                100
 #define DH_F_DHPARAMS_PRINT_FP                          101
 #define DH_F_DH_BUILTIN_GENPARAMS                       106
 #define DH_F_DH_NEW_METHOD                              105
index 2f2589bc25aec884052c3a5f2903ea58df8fa6fa..0ff0fe7f3bc4d5100d4497808f94285d74733d43 100644 (file)
@@ -381,7 +381,7 @@ static int do_dh_print(BIO *bp, const DH *x, int indent,
        if (0)
                {
 err:
-               DHerr(DH_F_DHPARAMS_PRINT,reason);
+               DHerr(DH_F_DO_DH_PRINT,reason);
                }
        if (m != NULL) OPENSSL_free(m);
        return(ret);
index 2fdfc5516e9aa42bf2753b967ddad8e019a6c089..86d8cdd529d04206823fbd0485e3bc7af7aa0d36 100644 (file)
@@ -71,7 +71,6 @@
 static ERR_STRING_DATA DH_str_functs[]=
        {
 {ERR_FUNC(DH_F_COMPUTE_KEY),   "COMPUTE_KEY"},
-{ERR_FUNC(DH_F_DHPARAMS_PRINT),        "DHparams_print"},
 {ERR_FUNC(DH_F_DHPARAMS_PRINT_FP),     "DHparams_print_fp"},
 {ERR_FUNC(DH_F_DH_BUILTIN_GENPARAMS),  "DH_BUILTIN_GENPARAMS"},
 {ERR_FUNC(DH_F_DH_NEW_METHOD), "DH_new_method"},
@@ -80,6 +79,7 @@ static ERR_STRING_DATA DH_str_functs[]=
 {ERR_FUNC(DH_F_DH_PRIV_ENCODE),        "DH_PRIV_ENCODE"},
 {ERR_FUNC(DH_F_DH_PUB_DECODE), "DH_PUB_DECODE"},
 {ERR_FUNC(DH_F_DH_PUB_ENCODE), "DH_PUB_ENCODE"},
+{ERR_FUNC(DH_F_DO_DH_PRINT),   "DO_DH_PRINT"},
 {ERR_FUNC(DH_F_GENERATE_KEY),  "GENERATE_KEY"},
 {ERR_FUNC(DH_F_GENERATE_PARAMETERS),   "GENERATE_PARAMETERS"},
 {ERR_FUNC(DH_F_PKEY_DH_DERIVE),        "PKEY_DH_DERIVE"},
index c4d440d51c2eec1790ef7e3e23aa693f261103bf..8023bb40b090759a3b780a43d0a59b8cbc17e406 100644 (file)
@@ -261,13 +261,13 @@ void ERR_load_DSA_strings(void);
 
 /* Function codes. */
 #define DSA_F_D2I_DSA_SIG                               110
+#define DSA_F_DO_DSA_PRINT                              104
 #define DSA_F_DSAPARAMS_PRINT                           100
 #define DSA_F_DSAPARAMS_PRINT_FP                        101
 #define DSA_F_DSA_DO_SIGN                               112
 #define DSA_F_DSA_DO_VERIFY                             113
 #define DSA_F_DSA_NEW_METHOD                            103
 #define DSA_F_DSA_PARAM_DECODE                          119
-#define DSA_F_DSA_PRINT                                         104
 #define DSA_F_DSA_PRINT_FP                              105
 #define DSA_F_DSA_PRIV_DECODE                           115
 #define DSA_F_DSA_PRIV_ENCODE                           116
@@ -278,6 +278,7 @@ void ERR_load_DSA_strings(void);
 #define DSA_F_DSA_SIG_NEW                               109
 #define DSA_F_DSA_VERIFY                                108
 #define DSA_F_I2D_DSA_SIG                               111
+#define DSA_F_OLD_DSA_PRIV_DECODE                       122
 #define DSA_F_PKEY_DSA_CTRL                             120
 #define DSA_F_PKEY_DSA_KEYGEN                           121
 #define DSA_F_SIG_CB                                    114
index a54c4f1938b2a826df5faa7b6471bcbd7136e52b..371d5afc1765e2b97b0aaec4dea934f1cf1adb6d 100644 (file)
@@ -443,14 +443,6 @@ int do_dsa_print(BIO *bp, const DSA *x, int off, int ptype)
        else
                ktype = "DSA-Parameters";
 
-#if 0
-       if (x->p == NULL)
-               {
-               DSAerr(DSA_F_DSA_PRINT,DSA_R_MISSING_PARAMETERS);
-               goto err;
-               }
-#endif
-
        update_buflen(x->p, &buf_len);
        update_buflen(x->q, &buf_len);
        update_buflen(x->g, &buf_len);
@@ -460,7 +452,7 @@ int do_dsa_print(BIO *bp, const DSA *x, int off, int ptype)
        m=(unsigned char *)OPENSSL_malloc(buf_len+10);
        if (m == NULL)
                {
-               DSAerr(DSA_F_DSA_PRINT,ERR_R_MALLOC_FAILURE);
+               DSAerr(DSA_F_DO_DSA_PRINT,ERR_R_MALLOC_FAILURE);
                goto err;
                }
 
@@ -528,7 +520,7 @@ static int old_dsa_priv_decode(EVP_PKEY *pkey,
        DSA *dsa;
        if (!(dsa = d2i_DSAPrivateKey (NULL, pder, derlen)))
                {
-               DSAerr(DSA_F_DSA_PRIV_DECODE, ERR_R_DSA_LIB);
+               DSAerr(DSA_F_OLD_DSA_PRIV_DECODE, ERR_R_DSA_LIB);
                return 0;
                }
        EVP_PKEY_assign_DSA(pkey, dsa);
index 8bd6968fa776d314250cbb5a061704831e51bac8..0421d4de60011249bf78baf9aced281b70633bef 100644 (file)
 static ERR_STRING_DATA DSA_str_functs[]=
        {
 {ERR_FUNC(DSA_F_D2I_DSA_SIG),  "d2i_DSA_SIG"},
+{ERR_FUNC(DSA_F_DO_DSA_PRINT), "DO_DSA_PRINT"},
 {ERR_FUNC(DSA_F_DSAPARAMS_PRINT),      "DSAparams_print"},
 {ERR_FUNC(DSA_F_DSAPARAMS_PRINT_FP),   "DSAparams_print_fp"},
 {ERR_FUNC(DSA_F_DSA_DO_SIGN),  "DSA_do_sign"},
 {ERR_FUNC(DSA_F_DSA_DO_VERIFY),        "DSA_do_verify"},
 {ERR_FUNC(DSA_F_DSA_NEW_METHOD),       "DSA_new_method"},
 {ERR_FUNC(DSA_F_DSA_PARAM_DECODE),     "DSA_PARAM_DECODE"},
-{ERR_FUNC(DSA_F_DSA_PRINT),    "DSA_print"},
 {ERR_FUNC(DSA_F_DSA_PRINT_FP), "DSA_print_fp"},
 {ERR_FUNC(DSA_F_DSA_PRIV_DECODE),      "DSA_PRIV_DECODE"},
 {ERR_FUNC(DSA_F_DSA_PRIV_ENCODE),      "DSA_PRIV_ENCODE"},
@@ -88,6 +88,7 @@ static ERR_STRING_DATA DSA_str_functs[]=
 {ERR_FUNC(DSA_F_DSA_SIG_NEW),  "DSA_SIG_new"},
 {ERR_FUNC(DSA_F_DSA_VERIFY),   "DSA_verify"},
 {ERR_FUNC(DSA_F_I2D_DSA_SIG),  "i2d_DSA_SIG"},
+{ERR_FUNC(DSA_F_OLD_DSA_PRIV_DECODE),  "OLD_DSA_PRIV_DECODE"},
 {ERR_FUNC(DSA_F_PKEY_DSA_CTRL),        "PKEY_DSA_CTRL"},
 {ERR_FUNC(DSA_F_PKEY_DSA_KEYGEN),      "PKEY_DSA_KEYGEN"},
 {ERR_FUNC(DSA_F_SIG_CB),       "SIG_CB"},
index 2e575ac6af4577af14c14b5f35746597d2a6d5cc..8da8e34339fc56aec917a16310c67ba77b02e750 100644 (file)
@@ -925,6 +925,7 @@ void ERR_load_EC_strings(void);
 #define EC_F_D2I_ECPARAMETERS                           144
 #define EC_F_D2I_ECPKPARAMETERS                                 145
 #define EC_F_D2I_ECPRIVATEKEY                           146
+#define EC_F_DO_EC_KEY_PRINT                            221
 #define EC_F_ECKEY_PARAM2TYPE                           196
 #define EC_F_ECKEY_PARAM_DECODE                                 212
 #define EC_F_ECKEY_PRIV_DECODE                          213
@@ -1035,6 +1036,7 @@ void ERR_load_EC_strings(void);
 #define EC_F_I2D_ECPRIVATEKEY                           192
 #define EC_F_I2O_ECPUBLICKEY                            151
 #define EC_F_O2I_ECPUBLICKEY                            152
+#define EC_F_OLD_EC_PRIV_DECODE                                 222
 #define EC_F_PKEY_EC_CTRL                               197
 #define EC_F_PKEY_EC_CTRL_STR                           198
 #define EC_F_PKEY_EC_DERIVE                             217
index ba611646fd51bb9642bf43fcf37fedc3c15b20e0..e52a347c86e91db43a7ab2092c49a29573203d70 100644 (file)
@@ -503,7 +503,7 @@ static int do_EC_KEY_print(BIO *bp, const EC_KEY *x, int off, int ktype)
        ret=1;
 err:
        if (!ret)
-               ECerr(EC_F_EC_KEY_PRINT, reason);
+               ECerr(EC_F_DO_EC_KEY_PRINT, reason);
        if (pub_key) 
                BN_free(pub_key);
        if (order)
@@ -558,7 +558,7 @@ static int old_ec_priv_decode(EVP_PKEY *pkey,
        EC_KEY *ec;
        if (!(ec = d2i_ECPrivateKey (NULL, pder, derlen)))
                {
-               ECerr(EC_F_ECKEY_PRIV_DECODE, EC_R_DECODE_ERROR);
+               ECerr(EC_F_OLD_EC_PRIV_DECODE, EC_R_DECODE_ERROR);
                return 0;
                }
        EVP_PKEY_assign_EC_KEY(pkey, ec);
index a414d9efeafe6b609b891dc42dffb3b4f3135b45..8633760fdefc1f9435bad24ebf134c4a8291dddb 100644 (file)
@@ -74,6 +74,7 @@ static ERR_STRING_DATA EC_str_functs[]=
 {ERR_FUNC(EC_F_D2I_ECPARAMETERS),      "d2i_ECParameters"},
 {ERR_FUNC(EC_F_D2I_ECPKPARAMETERS),    "d2i_ECPKParameters"},
 {ERR_FUNC(EC_F_D2I_ECPRIVATEKEY),      "d2i_ECPrivateKey"},
+{ERR_FUNC(EC_F_DO_EC_KEY_PRINT),       "DO_EC_KEY_PRINT"},
 {ERR_FUNC(EC_F_ECKEY_PARAM2TYPE),      "ECKEY_PARAM2TYPE"},
 {ERR_FUNC(EC_F_ECKEY_PARAM_DECODE),    "ECKEY_PARAM_DECODE"},
 {ERR_FUNC(EC_F_ECKEY_PRIV_DECODE),     "ECKEY_PRIV_DECODE"},
@@ -184,6 +185,7 @@ static ERR_STRING_DATA EC_str_functs[]=
 {ERR_FUNC(EC_F_I2D_ECPRIVATEKEY),      "i2d_ECPrivateKey"},
 {ERR_FUNC(EC_F_I2O_ECPUBLICKEY),       "i2o_ECPublicKey"},
 {ERR_FUNC(EC_F_O2I_ECPUBLICKEY),       "o2i_ECPublicKey"},
+{ERR_FUNC(EC_F_OLD_EC_PRIV_DECODE),    "OLD_EC_PRIV_DECODE"},
 {ERR_FUNC(EC_F_PKEY_EC_CTRL),  "PKEY_EC_CTRL"},
 {ERR_FUNC(EC_F_PKEY_EC_CTRL_STR),      "PKEY_EC_CTRL_STR"},
 {ERR_FUNC(EC_F_PKEY_EC_DERIVE),        "PKEY_EC_DERIVE"},
index dea6a40431d8b94b2c3232f1c78fedf46468a1a4..585cb17d1db14a05e35f781788203277d0acb144 100644 (file)
@@ -1142,6 +1142,7 @@ void ERR_load_EVP_strings(void);
 #define EVP_F_EVP_MD_CTX_COPY_EX                        110
 #define EVP_F_EVP_OPENINIT                              102
 #define EVP_F_EVP_PBE_ALG_ADD                           115
+#define EVP_F_EVP_PBE_ALG_ADD_TYPE                      160
 #define EVP_F_EVP_PBE_CIPHERINIT                        116
 #define EVP_F_EVP_PKCS82PKEY                            111
 #define EVP_F_EVP_PKCS82PKEY_BROKEN                     136
index 448c9b853e871ad94c27e2f39739917ceebcc9a6..4ead16cba6bebc01a7150e92c630c716322e3630 100644 (file)
@@ -86,6 +86,7 @@ static ERR_STRING_DATA EVP_str_functs[]=
 {ERR_FUNC(EVP_F_EVP_MD_CTX_COPY_EX),   "EVP_MD_CTX_copy_ex"},
 {ERR_FUNC(EVP_F_EVP_OPENINIT), "EVP_OpenInit"},
 {ERR_FUNC(EVP_F_EVP_PBE_ALG_ADD),      "EVP_PBE_alg_add"},
+{ERR_FUNC(EVP_F_EVP_PBE_ALG_ADD_TYPE), "EVP_PBE_alg_add_type"},
 {ERR_FUNC(EVP_F_EVP_PBE_CIPHERINIT),   "EVP_PBE_CipherInit"},
 {ERR_FUNC(EVP_F_EVP_PKCS82PKEY),       "EVP_PKCS82PKEY"},
 {ERR_FUNC(EVP_F_EVP_PKCS82PKEY_BROKEN),        "EVP_PKCS82PKEY_BROKEN"},
index 2d63636888e1dc670a9e4e3c9346194c7b4eabc3..f417b96f71d794e4f19fc489af8210f19c9292ed 100644 (file)
@@ -220,7 +220,7 @@ int EVP_PBE_alg_add_type(int pbe_type, int pbe_nid, int cipher_nid, int md_nid,
                pbe_algs = sk_new(pbe_cmp);
        if (!(pbe_tmp = (EVP_PBE_CTL*) OPENSSL_malloc (sizeof(EVP_PBE_CTL))))
                {
-               EVPerr(EVP_F_EVP_PBE_ALG_ADD,ERR_R_MALLOC_FAILURE);
+               EVPerr(EVP_F_EVP_PBE_ALG_ADD_TYPE,ERR_R_MALLOC_FAILURE);
                return 0;
                }
        pbe_tmp->pbe_type = pbe_type;
index 5e08cedd1460b5ee40b4a9f20513fa3a7b7dc603..d52dc43f077e14e30d764a317f15f704180e2e7a 100644 (file)
@@ -74,7 +74,7 @@
                        } \
                else if (*arglen < pksize) \
                        { \
-                       EVPerr(err, EVP_R_BUFFER_TOO_SMALL); \
+                       EVPerr(err, EVP_R_BUFFER_TOO_SMALL); /*ckerr_ignore*/\
                        return 0; \
                        } \
                }
index 5ac4ac42031668d93a1f3c7f5011d4cc2e510e2d..6643cf53022562e57a1302f194eda3a6b768382e 100644 (file)
@@ -574,6 +574,7 @@ void ERR_load_OCSP_strings(void);
 #define OCSP_F_OCSP_CHECK_ISSUER                        108
 #define OCSP_F_OCSP_CHECK_VALIDITY                      115
 #define OCSP_F_OCSP_MATCH_ISSUERID                      109
+#define OCSP_F_PARSE_HTTP_LINE1                                 118
 #define OCSP_F_OCSP_PARSE_URL                           114
 #define OCSP_F_OCSP_REQUEST_SIGN                        110
 #define OCSP_F_OCSP_REQUEST_VERIFY                      116
index 9837a1d8f4af721a6f4aed655755b2fd7a13c364..df93e454033fb861efecfb79a874b61ec5e46fe2 100644 (file)
@@ -87,6 +87,7 @@ static ERR_STRING_DATA OCSP_str_functs[]=
 {ERR_FUNC(OCSP_F_OCSP_RESPONSE_GET1_BASIC),    "OCSP_response_get1_basic"},
 {ERR_FUNC(OCSP_F_OCSP_SENDREQ_BIO),    "OCSP_sendreq_bio"},
 {ERR_FUNC(OCSP_F_OCSP_SENDREQ_NBIO),   "OCSP_sendreq_nbio"},
+{ERR_FUNC(OCSP_F_PARSE_HTTP_LINE1),    "PARSE_HTTP_LINE1"},
 {ERR_FUNC(OCSP_F_REQUEST_VERIFY),      "REQUEST_VERIFY"},
 {0,NULL}
        };
index 41e3da8198ed86944fb5940219e3c1bfe112e91b..d84cc34b8b9a2c6e0e865771a73f97ade2fa5efc 100644 (file)
@@ -169,7 +169,7 @@ static int parse_http_line1(char *line)
                continue;
        if(!*p)
                {
-               OCSPerr(OCSP_F_OCSP_SENDREQ_NBIO,
+               OCSPerr(OCSP_F_PARSE_HTTP_LINE1,
                                        OCSP_R_SERVER_RESPONSE_PARSE_ERROR);
                return 0;
                }
@@ -180,7 +180,7 @@ static int parse_http_line1(char *line)
 
        if(!*p)
                {
-               OCSPerr(OCSP_F_OCSP_SENDREQ_NBIO,
+               OCSPerr(OCSP_F_PARSE_HTTP_LINE1,
                                        OCSP_R_SERVER_RESPONSE_PARSE_ERROR);
                return 0;
                }
@@ -191,7 +191,7 @@ static int parse_http_line1(char *line)
 
        if(!*q)
                {
-               OCSPerr(OCSP_F_OCSP_SENDREQ_NBIO,
+               OCSPerr(OCSP_F_PARSE_HTTP_LINE1,
                                        OCSP_R_SERVER_RESPONSE_PARSE_ERROR);
                return 0;
                }
@@ -220,7 +220,7 @@ static int parse_http_line1(char *line)
                }
        if(retcode != 200)
                {
-               OCSPerr(OCSP_F_OCSP_SENDREQ_NBIO, OCSP_R_SERVER_RESPONSE_ERROR);
+               OCSPerr(OCSP_F_PARSE_HTTP_LINE1, OCSP_R_SERVER_RESPONSE_ERROR);
                if(!*q)
                        ERR_add_error_data(2, "Code=", p);
                else
index d24e4d7a84c807a71644dbf4ebed8b24b235cbab..31f3792a4cf2c457fa1fcc099b5f136d588dacf2 100644 (file)
@@ -371,7 +371,10 @@ void ERR_load_RSA_strings(void);
 
 /* Function codes. */
 #define RSA_F_CHECK_PADDING_MD                          140
+#define RSA_F_DO_RSA_PRINT                              146
+#define RSA_F_RSA_VERIFY                                119
 #define RSA_F_MEMORY_LOCK                               100
+#define RSA_F_OLD_RSA_PRIV_DECODE                       147
 #define RSA_F_PKEY_RSA_CTRL                             143
 #define RSA_F_PKEY_RSA_CTRL_STR                                 144
 #define RSA_F_PKEY_RSA_SIGN                             142
@@ -412,7 +415,7 @@ void ERR_load_RSA_strings(void);
 #define RSA_F_RSA_SETUP_BLINDING                        136
 #define RSA_F_RSA_SIGN                                  117
 #define RSA_F_RSA_SIGN_ASN1_OCTET_STRING                118
-#define RSA_F_RSA_VERIFY                                119
+#define RSA_F_INT_RSA_VERIFY                            145
 #define RSA_F_RSA_VERIFY_ASN1_OCTET_STRING              120
 #define RSA_F_RSA_VERIFY_PKCS1_PSS                      126
 
index 03785495df2a9d5c8a7b5d4ea18a8f485406ab0f..a1e717f6c98194c1ccbace8e33a77e12028947f5 100644 (file)
@@ -108,7 +108,7 @@ static int old_rsa_priv_decode(EVP_PKEY *pkey,
        RSA *rsa;
        if (!(rsa = d2i_RSAPrivateKey (NULL, pder, derlen)))
                {
-               RSAerr(RSA_F_RSA_PRIV_DECODE, ERR_R_RSA_LIB);
+               RSAerr(RSA_F_OLD_RSA_PRIV_DECODE, ERR_R_RSA_LIB);
                return 0;
                }
        EVP_PKEY_assign_RSA(pkey, rsa);
@@ -200,7 +200,7 @@ static int do_rsa_print(BIO *bp, const RSA *x, int off, int priv)
        m=(unsigned char *)OPENSSL_malloc(buf_len+10);
        if (m == NULL)
                {
-               RSAerr(RSA_F_RSA_PRINT,ERR_R_MALLOC_FAILURE);
+               RSAerr(RSA_F_DO_RSA_PRINT,ERR_R_MALLOC_FAILURE);
                goto err;
                }
 
index 7dcf766c38010ae3a0e26a9959af96d449fc0f09..163b143a73c3e478a9f454d9de68fdd774da1a67 100644 (file)
 static ERR_STRING_DATA RSA_str_functs[]=
        {
 {ERR_FUNC(RSA_F_CHECK_PADDING_MD),     "CHECK_PADDING_MD"},
+{ERR_FUNC(RSA_F_DO_RSA_PRINT), "DO_RSA_PRINT"},
+{ERR_FUNC(RSA_F_INT_RSA_VERIFY),       "INT_RSA_VERIFY"},
 {ERR_FUNC(RSA_F_MEMORY_LOCK),  "MEMORY_LOCK"},
+{ERR_FUNC(RSA_F_OLD_RSA_PRIV_DECODE),  "OLD_RSA_PRIV_DECODE"},
 {ERR_FUNC(RSA_F_PKEY_RSA_CTRL),        "PKEY_RSA_CTRL"},
 {ERR_FUNC(RSA_F_PKEY_RSA_CTRL_STR),    "PKEY_RSA_CTRL_STR"},
 {ERR_FUNC(RSA_F_PKEY_RSA_SIGN),        "PKEY_RSA_SIGN"},
index 52c8c985d065c7a8582e9ef4ce9345250fa17d29..7dae5c84157e12ab0633cad8021923187b2a1f96 100644 (file)
@@ -153,7 +153,7 @@ int int_rsa_verify(int dtype, const unsigned char *m, unsigned int m_len,
 
        if (siglen != (unsigned int)RSA_size(rsa))
                {
-               RSAerr(RSA_F_RSA_VERIFY,RSA_R_WRONG_SIGNATURE_LENGTH);
+               RSAerr(RSA_F_INT_RSA_VERIFY,RSA_R_WRONG_SIGNATURE_LENGTH);
                return(0);
                }
 
@@ -170,11 +170,11 @@ int int_rsa_verify(int dtype, const unsigned char *m, unsigned int m_len,
        s=(unsigned char *)OPENSSL_malloc((unsigned int)siglen);
        if (s == NULL)
                {
-               RSAerr(RSA_F_RSA_VERIFY,ERR_R_MALLOC_FAILURE);
+               RSAerr(RSA_F_INT_RSA_VERIFY,ERR_R_MALLOC_FAILURE);
                goto err;
                }
        if((dtype == NID_md5_sha1) && (m_len != SSL_SIG_LENGTH) ) {
-                       RSAerr(RSA_F_RSA_VERIFY,RSA_R_INVALID_MESSAGE_LENGTH);
+                       RSAerr(RSA_F_INT_RSA_VERIFY,RSA_R_INVALID_MESSAGE_LENGTH);
                        goto err;
        }
        i=RSA_public_decrypt((int)siglen,sigbuf,s,rsa,RSA_PKCS1_PADDING);
@@ -184,7 +184,7 @@ int int_rsa_verify(int dtype, const unsigned char *m, unsigned int m_len,
        /* Special case: SSL signature */
        if(dtype == NID_md5_sha1) {
                if((i != SSL_SIG_LENGTH) || memcmp(s, m, SSL_SIG_LENGTH))
-                               RSAerr(RSA_F_RSA_VERIFY,RSA_R_BAD_SIGNATURE);
+                               RSAerr(RSA_F_INT_RSA_VERIFY,RSA_R_BAD_SIGNATURE);
                else ret = 1;
        } else {
                const unsigned char *p=s;
@@ -213,7 +213,7 @@ int int_rsa_verify(int dtype, const unsigned char *m, unsigned int m_len,
                                }
                        else
                                {
-                               RSAerr(RSA_F_RSA_VERIFY,
+                               RSAerr(RSA_F_INT_RSA_VERIFY,
                                                RSA_R_ALGORITHM_MISMATCH);
                                goto err;
                                }
@@ -223,7 +223,7 @@ int int_rsa_verify(int dtype, const unsigned char *m, unsigned int m_len,
                        const EVP_MD *md;
                        md = EVP_get_digestbynid(dtype);
                        if (md && (EVP_MD_size(md) != sig->digest->length))
-                               RSAerr(RSA_F_RSA_VERIFY,
+                               RSAerr(RSA_F_INT_RSA_VERIFY,
                                                RSA_R_INVALID_DIGEST_LENGTH);
                        else
                                {
@@ -236,7 +236,7 @@ int int_rsa_verify(int dtype, const unsigned char *m, unsigned int m_len,
                else if (((unsigned int)sig->digest->length != m_len) ||
                        (memcmp(m,sig->digest->data,m_len) != 0))
                        {
-                       RSAerr(RSA_F_RSA_VERIFY,RSA_R_BAD_SIGNATURE);
+                       RSAerr(RSA_F_INT_RSA_VERIFY,RSA_R_BAD_SIGNATURE);
                        }
                else
                        ret=1;
index 344b422c3403654cb953c3eb037b1b3f1f43ea84..fd6becc423f0a33149e089fc27adc3b7a7754b8a 100755 (executable)
@@ -20,7 +20,7 @@ foreach $file (@ARGV)
                        $func = $1;
                        $func =~ tr/A-Z/a-z/;
                        }
-               if (/([A-Z0-9]+)err\(([^,]+)/)
+               if (/([A-Z0-9]+)err\(([^,]+)/ && ! /ckerr_ignore/)
                        {
                        $errlib=$1;
                        $n=$2;