Fix more error codes.
authorBodo Möller <bodo@openssl.org>
Wed, 11 May 2005 03:45:39 +0000 (03:45 +0000)
committerBodo Möller <bodo@openssl.org>
Wed, 11 May 2005 03:45:39 +0000 (03:45 +0000)
(Also improve util/ck_errf.pl script, and occasionally
fix source code formatting.)

79 files changed:
crypto/asn1/asn1.h
crypto/asn1/asn1_err.c
crypto/asn1/t_crl.c
crypto/asn1/t_req.c
crypto/asn1/t_x509.c
crypto/asn1/tasn_dec.c
crypto/asn1/tasn_new.c
crypto/asn1/x_name.c
crypto/bn/bn.h
crypto/bn/bn_blind.c
crypto/bn/bn_err.c
crypto/conf/conf.h
crypto/conf/conf_err.c
crypto/conf/conf_mod.c
crypto/dso/dso.h
crypto/dso/dso_err.c
crypto/dso/dso_win32.c
crypto/ec/ec.h
crypto/engine/eng_cnf.c
crypto/engine/eng_ctrl.c
crypto/engine/eng_dyn.c
crypto/engine/eng_err.c
crypto/engine/eng_init.c
crypto/engine/eng_lib.c
crypto/engine/engine.h
crypto/evp/digest.c
crypto/evp/evp.h
crypto/evp/evp_enc.c
crypto/evp/evp_err.c
crypto/evp/evp_pbe.c
crypto/evp/evp_pkey.c
crypto/ocsp/ocsp.h
crypto/ocsp/ocsp_err.c
crypto/ocsp/ocsp_lib.c
crypto/pem/pem.h
crypto/pem/pem_err.c
crypto/pem/pem_lib.c
crypto/pem/pem_pk8.c
crypto/pem/pem_pkey.c
crypto/pkcs12/p12_add.c
crypto/pkcs12/p12_crpt.c
crypto/pkcs12/p12_decr.c
crypto/pkcs12/p12_init.c
crypto/pkcs12/p12_kiss.c
crypto/pkcs12/p12_mutl.c
crypto/pkcs12/p12_npas.c
crypto/pkcs12/pk12err.c
crypto/pkcs12/pkcs12.h
crypto/pkcs7/pk7_doit.c
crypto/pkcs7/pkcs7.h
crypto/pkcs7/pkcs7err.c
crypto/rsa/rsa.h
crypto/rsa/rsa_eay.c
crypto/rsa/rsa_err.c
crypto/rsa/rsa_gen.c
crypto/rsa/rsa_lib.c
crypto/rsa/rsa_null.c
crypto/rsa/rsa_oaep.c
crypto/store/store.h
crypto/store/str_err.c
crypto/store/str_lib.c
crypto/store/str_mem.c
crypto/x509/x509.h
crypto/x509/x509_att.c
crypto/x509/x509_err.c
crypto/x509/x509_lu.c
crypto/x509/x509_vfy.c
crypto/x509v3/v3_alt.c
crypto/x509v3/v3_conf.c
crypto/x509v3/v3_cpols.c
crypto/x509v3/v3_extku.c
crypto/x509v3/v3_info.c
crypto/x509v3/v3_lib.c
crypto/x509v3/v3_pci.c
crypto/x509v3/v3_skey.c
crypto/x509v3/v3_sxnet.c
crypto/x509v3/v3err.c
crypto/x509v3/x509v3.h
util/ck_errf.pl

index daf12b1..b5fb31b 100644 (file)
@@ -1035,6 +1035,7 @@ void ERR_load_ASN1_strings(void);
 #define ASN1_F_ASN1_DUP                                         111
 #define ASN1_F_ASN1_ENUMERATED_SET                      112
 #define ASN1_F_ASN1_ENUMERATED_TO_BN                    113
+#define ASN1_F_ASN1_EX_C2I                              204
 #define ASN1_F_ASN1_FIND_END                            190
 #define ASN1_F_ASN1_GENERALIZEDTIME_SET                         185
 #define ASN1_F_ASN1_GENERATE_V3                                 178
@@ -1046,10 +1047,10 @@ void ERR_load_ASN1_strings(void);
 #define ASN1_F_ASN1_INTEGER_TO_BN                       119
 #define ASN1_F_ASN1_ITEM_D2I_FP                                 190
 #define ASN1_F_ASN1_ITEM_DUP                            191
+#define ASN1_F_ASN1_ITEM_EX_COMBINE_NEW                         121
 #define ASN1_F_ASN1_ITEM_EX_D2I                                 120
 #define ASN1_F_ASN1_ITEM_I2D_BIO                        192
 #define ASN1_F_ASN1_ITEM_I2D_FP                                 193
-#define ASN1_F_ASN1_ITEM_NEW                            121
 #define ASN1_F_ASN1_ITEM_PACK                           198
 #define ASN1_F_ASN1_ITEM_SIGN                           195
 #define ASN1_F_ASN1_ITEM_UNPACK                                 199
@@ -1065,9 +1066,9 @@ void ERR_load_ASN1_strings(void);
 #define ASN1_F_ASN1_STRING_SET                          186
 #define ASN1_F_ASN1_STRING_TABLE_ADD                    129
 #define ASN1_F_ASN1_STRING_TYPE_NEW                     130
-#define ASN1_F_ASN1_TEMPLATE_D2I                        131
 #define ASN1_F_ASN1_TEMPLATE_EX_D2I                     132
 #define ASN1_F_ASN1_TEMPLATE_NEW                        133
+#define ASN1_F_ASN1_TEMPLATE_NOEXP_D2I                  131
 #define ASN1_F_ASN1_TIME_SET                            175
 #define ASN1_F_ASN1_TYPE_GET_INT_OCTETSTRING            134
 #define ASN1_F_ASN1_TYPE_GET_OCTETSTRING                135
@@ -1100,7 +1101,6 @@ void ERR_load_ASN1_strings(void);
 #define ASN1_F_D2I_RSA_NET_2                            201
 #define ASN1_F_D2I_X509                                         156
 #define ASN1_F_D2I_X509_CINF                            157
-#define ASN1_F_D2I_X509_NAME                            158
 #define ASN1_F_D2I_X509_PKEY                            159
 #define ASN1_F_I2D_ASN1_SET                             188
 #define ASN1_F_I2D_ASN1_TIME                            160
@@ -1118,7 +1118,9 @@ void ERR_load_ASN1_strings(void);
 #define ASN1_F_X509_CINF_NEW                            168
 #define ASN1_F_X509_CRL_ADD0_REVOKED                    169
 #define ASN1_F_X509_INFO_NEW                            170
-#define ASN1_F_X509_NAME_NEW                            171
+#define ASN1_F_X509_NAME_ENCODE                                 203
+#define ASN1_F_X509_NAME_EX_D2I                                 158
+#define ASN1_F_X509_NAME_EX_NEW                                 171
 #define ASN1_F_X509_NEW                                         172
 #define ASN1_F_X509_PKEY_NEW                            173
 
index e6fe7dd..b9df21c 100644 (file)
@@ -88,6 +88,7 @@ static ERR_STRING_DATA ASN1_str_functs[]=
 {ERR_FUNC(ASN1_F_ASN1_DUP),    "ASN1_dup"},
 {ERR_FUNC(ASN1_F_ASN1_ENUMERATED_SET), "ASN1_ENUMERATED_set"},
 {ERR_FUNC(ASN1_F_ASN1_ENUMERATED_TO_BN),       "ASN1_ENUMERATED_to_BN"},
+{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_SET),    "ASN1_GENERALIZEDTIME_set"},
 {ERR_FUNC(ASN1_F_ASN1_GENERATE_V3),    "ASN1_generate_v3"},
@@ -99,10 +100,10 @@ static ERR_STRING_DATA ASN1_str_functs[]=
 {ERR_FUNC(ASN1_F_ASN1_INTEGER_TO_BN),  "ASN1_INTEGER_to_BN"},
 {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_EX_COMBINE_NEW),    "ASN1_ITEM_EX_COMBINE_NEW"},
 {ERR_FUNC(ASN1_F_ASN1_ITEM_EX_D2I),    "ASN1_ITEM_EX_D2I"},
 {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_NEW),       "ASN1_item_new"},
 {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_UNPACK),    "ASN1_item_unpack"},
@@ -118,9 +119,9 @@ static ERR_STRING_DATA ASN1_str_functs[]=
 {ERR_FUNC(ASN1_F_ASN1_STRING_SET),     "ASN1_STRING_set"},
 {ERR_FUNC(ASN1_F_ASN1_STRING_TABLE_ADD),       "ASN1_STRING_TABLE_add"},
 {ERR_FUNC(ASN1_F_ASN1_STRING_TYPE_NEW),        "ASN1_STRING_type_new"},
-{ERR_FUNC(ASN1_F_ASN1_TEMPLATE_D2I),   "ASN1_TEMPLATE_D2I"},
 {ERR_FUNC(ASN1_F_ASN1_TEMPLATE_EX_D2I),        "ASN1_TEMPLATE_EX_D2I"},
 {ERR_FUNC(ASN1_F_ASN1_TEMPLATE_NEW),   "ASN1_TEMPLATE_NEW"},
+{ERR_FUNC(ASN1_F_ASN1_TEMPLATE_NOEXP_D2I),     "ASN1_TEMPLATE_NOEXP_D2I"},
 {ERR_FUNC(ASN1_F_ASN1_TIME_SET),       "ASN1_TIME_set"},
 {ERR_FUNC(ASN1_F_ASN1_TYPE_GET_INT_OCTETSTRING),       "ASN1_TYPE_get_int_octetstring"},
 {ERR_FUNC(ASN1_F_ASN1_TYPE_GET_OCTETSTRING),   "ASN1_TYPE_get_octetstring"},
@@ -153,7 +154,6 @@ static ERR_STRING_DATA ASN1_str_functs[]=
 {ERR_FUNC(ASN1_F_D2I_RSA_NET_2),       "D2I_RSA_NET_2"},
 {ERR_FUNC(ASN1_F_D2I_X509),    "D2I_X509"},
 {ERR_FUNC(ASN1_F_D2I_X509_CINF),       "D2I_X509_CINF"},
-{ERR_FUNC(ASN1_F_D2I_X509_NAME),       "D2I_X509_NAME"},
 {ERR_FUNC(ASN1_F_D2I_X509_PKEY),       "d2i_X509_PKEY"},
 {ERR_FUNC(ASN1_F_I2D_ASN1_SET),        "i2d_ASN1_SET"},
 {ERR_FUNC(ASN1_F_I2D_ASN1_TIME),       "I2D_ASN1_TIME"},
@@ -171,7 +171,9 @@ static ERR_STRING_DATA ASN1_str_functs[]=
 {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"},
-{ERR_FUNC(ASN1_F_X509_NAME_NEW),       "X509_NAME_NEW"},
+{ERR_FUNC(ASN1_F_X509_NAME_ENCODE),    "X509_NAME_ENCODE"},
+{ERR_FUNC(ASN1_F_X509_NAME_EX_D2I),    "X509_NAME_EX_D2I"},
+{ERR_FUNC(ASN1_F_X509_NAME_EX_NEW),    "X509_NAME_EX_NEW"},
 {ERR_FUNC(ASN1_F_X509_NEW),    "X509_NEW"},
 {ERR_FUNC(ASN1_F_X509_PKEY_NEW),       "X509_PKEY_new"},
 {0,NULL}
index f183a11..929b3e5 100644 (file)
@@ -72,7 +72,7 @@ int X509_CRL_print_fp(FILE *fp, X509_CRL *x)
 
         if ((b=BIO_new(BIO_s_file())) == NULL)
                {
-               X509err(X509_F_X509_PRINT_FP,ERR_R_BUF_LIB);
+               X509err(X509_F_X509_CRL_PRINT_FP,ERR_R_BUF_LIB);
                 return(0);
                }
         BIO_set_fp(b,fp,BIO_NOCLOSE);
index 32eef7e..4056cf6 100644 (file)
@@ -276,7 +276,7 @@ get_next:
 
        return(1);
 err:
-       X509err(X509_F_X509_REQ_PRINT,ERR_R_BUF_LIB);
+       X509err(X509_F_X509_REQ_PRINT_EX,ERR_R_BUF_LIB);
        return(0);
        }
 
index 36cef46..4bf5c89 100644 (file)
@@ -86,7 +86,7 @@ int X509_print_ex_fp(FILE *fp, X509 *x, unsigned long nmflag, unsigned long cfla
 
         if ((b=BIO_new(BIO_s_file())) == NULL)
                {
-               X509err(X509_F_X509_PRINT_FP,ERR_R_BUF_LIB);
+               X509err(X509_F_X509_PRINT_EX_FP,ERR_R_BUF_LIB);
                 return(0);
                }
         BIO_set_fp(b,fp,BIO_NOCLOSE);
index 062afd9..2b9c256 100644 (file)
@@ -579,7 +579,7 @@ static int asn1_template_ex_d2i(ASN1_VALUE **val,
                        /* If NDEF we must have an EOC here */
                        if (!asn1_check_eoc(&p, len))
                                {
-                               ASN1err(ASN1_F_ASN1_TEMPLATE_D2I,
+                               ASN1err(ASN1_F_ASN1_TEMPLATE_EX_D2I,
                                                ASN1_R_MISSING_EOC);
                                goto err;
                                }
@@ -590,7 +590,7 @@ static int asn1_template_ex_d2i(ASN1_VALUE **val,
                         * an error */
                        if (len)
                                {
-                               ASN1err(ASN1_F_ASN1_TEMPLATE_D2I,
+                               ASN1err(ASN1_F_ASN1_TEMPLATE_EX_D2I,
                                        ASN1_R_EXPLICIT_LENGTH_MISMATCH);
                                goto err;
                                }
@@ -649,7 +649,7 @@ static int asn1_template_noexp_d2i(ASN1_VALUE **val,
                                        &p, len, sktag, skaclass, opt, ctx);
                if (!ret)
                        {
-                       ASN1err(ASN1_F_ASN1_TEMPLATE_EX_D2I,
+                       ASN1err(ASN1_F_ASN1_TEMPLATE_NOEXP_D2I,
                                                ERR_R_NESTED_ASN1_ERROR);
                        return 0;
                        }
@@ -672,7 +672,7 @@ static int asn1_template_noexp_d2i(ASN1_VALUE **val,
                                
                if (!*val)
                        {
-                       ASN1err(ASN1_F_ASN1_TEMPLATE_EX_D2I,
+                       ASN1err(ASN1_F_ASN1_TEMPLATE_NOEXP_D2I,
                                                ERR_R_MALLOC_FAILURE);
                        goto err;
                        }
@@ -687,7 +687,7 @@ static int asn1_template_noexp_d2i(ASN1_VALUE **val,
                                {
                                if (!sk_eoc)
                                        {
-                                       ASN1err(ASN1_F_ASN1_TEMPLATE_D2I,
+                                       ASN1err(ASN1_F_ASN1_TEMPLATE_NOEXP_D2I,
                                                        ASN1_R_UNEXPECTED_EOC);
                                        goto err;
                                        }
@@ -700,21 +700,21 @@ static int asn1_template_noexp_d2i(ASN1_VALUE **val,
                                                ASN1_ITEM_ptr(tt->item),
                                                -1, 0, 0, ctx))
                                {
-                               ASN1err(ASN1_F_ASN1_TEMPLATE_D2I,
+                               ASN1err(ASN1_F_ASN1_TEMPLATE_NOEXP_D2I,
                                        ERR_R_NESTED_ASN1_ERROR);
                                goto err;
                                }
                        len -= p - q;
                        if (!sk_push((STACK *)*val, (char *)skfield))
                                {
-                               ASN1err(ASN1_F_ASN1_TEMPLATE_D2I,
+                               ASN1err(ASN1_F_ASN1_TEMPLATE_NOEXP_D2I,
                                                ERR_R_MALLOC_FAILURE);
                                goto err;
                                }
                        }
                if (sk_eoc)
                        {
-                       ASN1err(ASN1_F_ASN1_TEMPLATE_D2I, ASN1_R_MISSING_EOC);
+                       ASN1err(ASN1_F_ASN1_TEMPLATE_NOEXP_D2I, ASN1_R_MISSING_EOC);
                        goto err;
                        }
                }
@@ -725,7 +725,7 @@ static int asn1_template_noexp_d2i(ASN1_VALUE **val,
                        ASN1_ITEM_ptr(tt->item), tt->tag, aclass, opt, ctx);
                if (!ret)
                        {
-                       ASN1err(ASN1_F_ASN1_TEMPLATE_D2I,
+                       ASN1err(ASN1_F_ASN1_TEMPLATE_NOEXP_D2I,
                                                ERR_R_NESTED_ASN1_ERROR);
                        goto err;
                        }
@@ -739,7 +739,7 @@ static int asn1_template_noexp_d2i(ASN1_VALUE **val,
                                                        -1, 0, opt, ctx);
                if (!ret)
                        {
-                       ASN1err(ASN1_F_ASN1_TEMPLATE_D2I,
+                       ASN1err(ASN1_F_ASN1_TEMPLATE_NOEXP_D2I,
                                        ERR_R_NESTED_ASN1_ERROR);
                        goto err;
                        }
@@ -944,7 +944,7 @@ int asn1_ex_c2i(ASN1_VALUE **pval, const unsigned char *cont, int len,
                case V_ASN1_NULL:
                if (len)
                        {
-                       ASN1err(ASN1_F_ASN1_D2I_EX_PRIMITIVE,
+                       ASN1err(ASN1_F_ASN1_EX_C2I,
                                                ASN1_R_NULL_IS_WRONG_LENGTH);
                        goto err;
                        }
@@ -954,7 +954,7 @@ int asn1_ex_c2i(ASN1_VALUE **pval, const unsigned char *cont, int len,
                case V_ASN1_BOOLEAN:
                if (len != 1)
                        {
-                       ASN1err(ASN1_F_ASN1_D2I_EX_PRIMITIVE,
+                       ASN1err(ASN1_F_ASN1_EX_C2I,
                                                ASN1_R_BOOLEAN_IS_WRONG_LENGTH);
                        goto err;
                        }
@@ -1006,7 +1006,7 @@ int asn1_ex_c2i(ASN1_VALUE **pval, const unsigned char *cont, int len,
                        stmp = ASN1_STRING_type_new(utype);
                        if (!stmp)
                                {
-                               ASN1err(ASN1_F_ASN1_D2I_EX_PRIMITIVE,
+                               ASN1err(ASN1_F_ASN1_EX_C2I,
                                                        ERR_R_MALLOC_FAILURE);
                                goto err;
                                }
@@ -1030,7 +1030,7 @@ int asn1_ex_c2i(ASN1_VALUE **pval, const unsigned char *cont, int len,
                        {
                        if (!ASN1_STRING_set(stmp, cont, len))
                                {
-                               ASN1err(ASN1_F_ASN1_D2I_EX_PRIMITIVE,
+                               ASN1err(ASN1_F_ASN1_EX_C2I,
                                                        ERR_R_MALLOC_FAILURE);
                                ASN1_STRING_free(stmp); 
                                *pval = NULL;
index 2b9bb99..9216342 100644 (file)
@@ -211,14 +211,14 @@ static int asn1_item_ex_combine_new(ASN1_VALUE **pval, const ASN1_ITEM *it,
        return 1;
 
        memerr:
-       ASN1err(ASN1_F_ASN1_ITEM_NEW, ERR_R_MALLOC_FAILURE);
+       ASN1err(ASN1_F_ASN1_ITEM_EX_COMBINE_NEW, ERR_R_MALLOC_FAILURE);
 #ifdef CRYPTO_MDEBUG
        if (it->sname) CRYPTO_pop_info();
 #endif
        return 0;
 
        auxerr:
-       ASN1err(ASN1_F_ASN1_ITEM_NEW, ASN1_R_AUX_ERROR);
+       ASN1err(ASN1_F_ASN1_ITEM_EX_COMBINE_NEW, ASN1_R_AUX_ERROR);
        ASN1_item_ex_free(pval, it);
 #ifdef CRYPTO_MDEBUG
        if (it->sname) CRYPTO_pop_info();
index b4f12a6..681e5d1 100644 (file)
@@ -123,7 +123,7 @@ static int x509_name_ex_new(ASN1_VALUE **val, const ASN1_ITEM *it)
        return 1;
 
  memerr:
-       ASN1err(ASN1_F_X509_NAME_NEW, ERR_R_MALLOC_FAILURE);
+       ASN1err(ASN1_F_X509_NAME_EX_NEW, ERR_R_MALLOC_FAILURE);
        if (ret)
                {
                if (ret->entries)
@@ -197,7 +197,7 @@ static int x509_name_ex_d2i(ASN1_VALUE **val, const unsigned char **in, long len
        *in = p;
        return ret;
        err:
-       ASN1err(ASN1_F_D2I_X509_NAME, ERR_R_NESTED_ASN1_ERROR);
+       ASN1err(ASN1_F_X509_NAME_EX_D2I, ERR_R_NESTED_ASN1_ERROR);
        return 0;
 }
 
@@ -248,7 +248,7 @@ static int x509_name_encode(X509_NAME *a)
        return len;
        memerr:
        sk_pop_free(intname, sk_internal_free);
-       ASN1err(ASN1_F_D2I_X509_NAME, ERR_R_MALLOC_FAILURE);
+       ASN1err(ASN1_F_X509_NAME_ENCODE, ERR_R_MALLOC_FAILURE);
        return -1;
 }
 
index eb32375..99faf8f 100644 (file)
@@ -729,9 +729,9 @@ void ERR_load_BN_strings(void);
 
 /* Function codes. */
 #define BN_F_BNRAND                                     114
-#define BN_F_BN_BLINDING_CONVERT                        100
+#define BN_F_BN_BLINDING_CONVERT_EX                     100
 #define BN_F_BN_BLINDING_CREATE_PARAM                   133
-#define BN_F_BN_BLINDING_INVERT                                 101
+#define BN_F_BN_BLINDING_INVERT_EX                      101
 #define BN_F_BN_BLINDING_NEW                            102
 #define BN_F_BN_BLINDING_UPDATE                                 103
 #define BN_F_BN_BN2DEC                                  104
index 9ca4d06..40e742d 100644 (file)
@@ -211,7 +211,7 @@ int BN_BLINDING_convert_ex(BIGNUM *n, BIGNUM *r, BN_BLINDING *b, BN_CTX *ctx)
 
        if ((b->A == NULL) || (b->Ai == NULL))
                {
-               BNerr(BN_F_BN_BLINDING_CONVERT,BN_R_NOT_INITIALIZED);
+               BNerr(BN_F_BN_BLINDING_CONVERT_EX,BN_R_NOT_INITIALIZED);
                return(0);
                }
 
@@ -233,7 +233,7 @@ int BN_BLINDING_invert_ex(BIGNUM *n, const BIGNUM *r, BN_BLINDING *b, BN_CTX *ct
        bn_check_top(n);
        if ((b->A == NULL) || (b->Ai == NULL))
                {
-               BNerr(BN_F_BN_BLINDING_INVERT,BN_R_NOT_INITIALIZED);
+               BNerr(BN_F_BN_BLINDING_INVERT_EX,BN_R_NOT_INITIALIZED);
                return(0);
                }
 
index 37aa709..58a7d06 100644 (file)
@@ -71,9 +71,9 @@
 static ERR_STRING_DATA BN_str_functs[]=
        {
 {ERR_FUNC(BN_F_BNRAND),        "BNRAND"},
-{ERR_FUNC(BN_F_BN_BLINDING_CONVERT),   "BN_BLINDING_convert"},
+{ERR_FUNC(BN_F_BN_BLINDING_CONVERT_EX),        "BN_BLINDING_convert_ex"},
 {ERR_FUNC(BN_F_BN_BLINDING_CREATE_PARAM),      "BN_BLINDING_create_param"},
-{ERR_FUNC(BN_F_BN_BLINDING_INVERT),    "BN_BLINDING_invert"},
+{ERR_FUNC(BN_F_BN_BLINDING_INVERT_EX), "BN_BLINDING_invert_ex"},
 {ERR_FUNC(BN_F_BN_BLINDING_NEW),       "BN_BLINDING_new"},
 {ERR_FUNC(BN_F_BN_BLINDING_UPDATE),    "BN_BLINDING_update"},
 {ERR_FUNC(BN_F_BN_BN2DEC),     "BN_bn2dec"},
index 4c9b805..4c073dd 100644 (file)
@@ -213,7 +213,6 @@ void ERR_load_CONF_strings(void);
 #define CONF_F_CONF_LOAD_BIO                            102
 #define CONF_F_CONF_LOAD_FP                             103
 #define CONF_F_CONF_MODULES_LOAD                        116
-#define CONF_F_CONF_MODULE_RUN                          119
 #define CONF_F_DEF_LOAD                                         120
 #define CONF_F_DEF_LOAD_BIO                             121
 #define CONF_F_MODULE_INIT                              115
index 020e5d2..6250689 100644 (file)
@@ -75,7 +75,6 @@ static ERR_STRING_DATA CONF_str_functs[]=
 {ERR_FUNC(CONF_F_CONF_LOAD_BIO),       "CONF_load_bio"},
 {ERR_FUNC(CONF_F_CONF_LOAD_FP),        "CONF_load_fp"},
 {ERR_FUNC(CONF_F_CONF_MODULES_LOAD),   "CONF_modules_load"},
-{ERR_FUNC(CONF_F_CONF_MODULE_RUN),     "CONF_MODULE_RUN"},
 {ERR_FUNC(CONF_F_DEF_LOAD),    "DEF_LOAD"},
 {ERR_FUNC(CONF_F_DEF_LOAD_BIO),        "DEF_LOAD_BIO"},
 {ERR_FUNC(CONF_F_MODULE_INIT), "MODULE_INIT"},
index 46af482..587211a 100644 (file)
@@ -231,7 +231,7 @@ static int module_run(const CONF *cnf, char *name, char *value,
                if (!(flags & CONF_MFLAGS_SILENT))
                        {
                        char rcode[DECIMAL_SIZE(ret)+1];
-                       CONFerr(CONF_F_CONF_MODULE_RUN, CONF_R_MODULE_INITIALIZATION_ERROR);
+                       CONFerr(CONF_F_MODULE_RUN, CONF_R_MODULE_INITIALIZATION_ERROR);
                        BIO_snprintf(rcode, sizeof rcode, "%-8d", ret);
                        ERR_add_error_data(6, "module=", name, ", value=", value, ", retcode=", rcode);
                        }
index 5cacc34..3de99f5 100644 (file)
@@ -336,9 +336,11 @@ void ERR_load_DSO_strings(void);
 #define DSO_F_VMS_UNLOAD                                117
 #define DSO_F_WIN32_BIND_FUNC                           118
 #define DSO_F_WIN32_BIND_VAR                            119
+#define DSO_F_WIN32_JOINER                              135
 #define DSO_F_WIN32_LOAD                                120
 #define DSO_F_WIN32_MERGER                              134
 #define DSO_F_WIN32_NAME_CONVERTER                      125
+#define DSO_F_WIN32_SPLITTER                            136
 #define DSO_F_WIN32_UNLOAD                              121
 
 /* Reason codes. */
index bc0af84..aa91170 100644 (file)
@@ -101,9 +101,11 @@ static ERR_STRING_DATA DSO_str_functs[]=
 {ERR_FUNC(DSO_F_VMS_UNLOAD),   "VMS_UNLOAD"},
 {ERR_FUNC(DSO_F_WIN32_BIND_FUNC),      "WIN32_BIND_FUNC"},
 {ERR_FUNC(DSO_F_WIN32_BIND_VAR),       "WIN32_BIND_VAR"},
+{ERR_FUNC(DSO_F_WIN32_JOINER), "WIN32_JOINER"},
 {ERR_FUNC(DSO_F_WIN32_LOAD),   "WIN32_LOAD"},
 {ERR_FUNC(DSO_F_WIN32_MERGER), "WIN32_MERGER"},
 {ERR_FUNC(DSO_F_WIN32_NAME_CONVERTER), "WIN32_NAME_CONVERTER"},
+{ERR_FUNC(DSO_F_WIN32_SPLITTER),       "WIN32_SPLITTER"},
 {ERR_FUNC(DSO_F_WIN32_UNLOAD), "WIN32_UNLOAD"},
 {0,NULL}
        };
index 1dcafc6..e6eaa99 100644 (file)
@@ -271,7 +271,7 @@ static struct file_st *win32_splitter(DSO *dso, const char *filename,
 
        if (!filename)
                {
-               DSOerr(DSO_F_WIN32_MERGER,DSO_R_NO_FILENAME);
+               DSOerr(DSO_F_WIN32_SPLITTER,DSO_R_NO_FILENAME);
                /*goto err;*/
                return(NULL);
                }
@@ -279,7 +279,7 @@ static struct file_st *win32_splitter(DSO *dso, const char *filename,
        result = OPENSSL_malloc(sizeof(struct file_st));
        if(result == NULL)
                {
-               DSOerr(DSO_F_WIN32_MERGER,
+               DSOerr(DSO_F_WIN32_SPLITTER,
                        ERR_R_MALLOC_FAILURE);
                return(NULL);
                }
@@ -303,7 +303,7 @@ static struct file_st *win32_splitter(DSO *dso, const char *filename,
                case ':':
                        if(position != IN_DEVICE)
                                {
-                               DSOerr(DSO_F_WIN32_MERGER,
+                               DSOerr(DSO_F_WIN32_SPLITTER,
                                        DSO_R_INCORRECT_FILE_SYNTAX);
                                /*goto err;*/
                                return(NULL);
@@ -373,7 +373,7 @@ static char *win32_joiner(DSO *dso, const struct file_st *file_split)
 
        if(!file_split)
                {
-               DSOerr(DSO_F_WIN32_MERGER,
+               DSOerr(DSO_F_WIN32_JOINER,
                                ERR_R_PASSED_NULL_PARAMETER);
                return(NULL);
                }
@@ -401,14 +401,14 @@ static char *win32_joiner(DSO *dso, const struct file_st *file_split)
 
        if(!len)
                {
-               DSOerr(DSO_F_WIN32_MERGER, DSO_R_EMPTY_FILE_STRUCTURE);
+               DSOerr(DSO_F_WIN32_JOINER, DSO_R_EMPTY_FILE_STRUCTURE);
                return(NULL);
                }
 
        result = OPENSSL_malloc(len + 1);
        if (!result)
                {
-               DSOerr(DSO_F_WIN32_MERGER,
+               DSOerr(DSO_F_WIN32_JOINER,
                        ERR_R_MALLOC_FAILURE);
                return(NULL);
                }
index cc608c7..c706669 100644 (file)
@@ -143,7 +143,7 @@ EC_POINT *EC_GROUP_get0_generator(const EC_GROUP *);
 int EC_GROUP_get_order(const EC_GROUP *, BIGNUM *order, BN_CTX *);
 int EC_GROUP_get_cofactor(const EC_GROUP *, BIGNUM *cofactor, BN_CTX *);
 
-void EC_GROUP_set_curve_name(EC_GROUP *, int nid); /* curve name */
+void EC_GROUP_set_curve_name(EC_GROUP *, int nid);
 int EC_GROUP_get_curve_name(const EC_GROUP *);
 
 void EC_GROUP_set_asn1_flag(EC_GROUP *, int flag);
index 8567f26..7bc3060 100644 (file)
@@ -207,7 +207,7 @@ static int int_engine_module_init(CONF_IMODULE *md, const CONF *cnf)
 
        if (!elist)
                {
-               ENGINEerr(ENGINE_F_ENGINE_MODULE_INIT, ENGINE_R_ENGINES_SECTION_ERROR);
+               ENGINEerr(ENGINE_F_INT_ENGINE_MODULE_INIT, ENGINE_R_ENGINES_SECTION_ERROR);
                return 0;
                }
 
index 4455ef6..95b6b45 100644 (file)
@@ -255,7 +255,7 @@ int ENGINE_ctrl_cmd(ENGINE *e, const char *cmd_name,
 
        if((e == NULL) || (cmd_name == NULL))
                {
-               ENGINEerr(ENGINE_F_ENGINE_CTRL_CMD_STRING,
+               ENGINEerr(ENGINE_F_ENGINE_CTRL_CMD,
                        ERR_R_PASSED_NULL_PARAMETER);
                return 0;
                }
index 290b8bd..acb30c3 100644 (file)
@@ -189,7 +189,7 @@ static int dynamic_set_data_ctx(ENGINE *e, dynamic_data_ctx **ctx)
        c = OPENSSL_malloc(sizeof(dynamic_data_ctx));
        if(!c)
                {
-               ENGINEerr(ENGINE_F_SET_DATA_CTX,ERR_R_MALLOC_FAILURE);
+               ENGINEerr(ENGINE_F_DYNAMIC_SET_DATA_CTX,ERR_R_MALLOC_FAILURE);
                return 0;
                }
        memset(c, 0, sizeof(dynamic_data_ctx));
@@ -206,7 +206,7 @@ static int dynamic_set_data_ctx(ENGINE *e, dynamic_data_ctx **ctx)
        c->dirs = sk_new_null();
        if(!c->dirs)
                {
-               ENGINEerr(ENGINE_F_SET_DATA_CTX,ERR_R_MALLOC_FAILURE);
+               ENGINEerr(ENGINE_F_DYNAMIC_SET_DATA_CTX,ERR_R_MALLOC_FAILURE);
                OPENSSL_free(c);
                return 0;
                }
index fdc0e7b..62db507 100644 (file)
@@ -73,6 +73,7 @@ static ERR_STRING_DATA ENGINE_str_functs[]=
 {ERR_FUNC(ENGINE_F_DYNAMIC_CTRL),      "DYNAMIC_CTRL"},
 {ERR_FUNC(ENGINE_F_DYNAMIC_GET_DATA_CTX),      "DYNAMIC_GET_DATA_CTX"},
 {ERR_FUNC(ENGINE_F_DYNAMIC_LOAD),      "DYNAMIC_LOAD"},
+{ERR_FUNC(ENGINE_F_DYNAMIC_SET_DATA_CTX),      "DYNAMIC_SET_DATA_CTX"},
 {ERR_FUNC(ENGINE_F_ENGINE_ADD),        "ENGINE_add"},
 {ERR_FUNC(ENGINE_F_ENGINE_BY_ID),      "ENGINE_by_id"},
 {ERR_FUNC(ENGINE_F_ENGINE_CMD_IS_EXECUTABLE),  "ENGINE_cmd_is_executable"},
@@ -80,7 +81,7 @@ static ERR_STRING_DATA ENGINE_str_functs[]=
 {ERR_FUNC(ENGINE_F_ENGINE_CTRL_CMD),   "ENGINE_ctrl_cmd"},
 {ERR_FUNC(ENGINE_F_ENGINE_CTRL_CMD_STRING),    "ENGINE_ctrl_cmd_string"},
 {ERR_FUNC(ENGINE_F_ENGINE_FINISH),     "ENGINE_finish"},
-{ERR_FUNC(ENGINE_F_ENGINE_FREE),       "ENGINE_free"},
+{ERR_FUNC(ENGINE_F_ENGINE_FREE_UTIL),  "ENGINE_FREE_UTIL"},
 {ERR_FUNC(ENGINE_F_ENGINE_GET_CIPHER), "ENGINE_get_cipher"},
 {ERR_FUNC(ENGINE_F_ENGINE_GET_DEFAULT_TYPE),   "ENGINE_GET_DEFAULT_TYPE"},
 {ERR_FUNC(ENGINE_F_ENGINE_GET_DIGEST), "ENGINE_get_digest"},
@@ -91,7 +92,6 @@ static ERR_STRING_DATA ENGINE_str_functs[]=
 {ERR_FUNC(ENGINE_F_ENGINE_LIST_REMOVE),        "ENGINE_LIST_REMOVE"},
 {ERR_FUNC(ENGINE_F_ENGINE_LOAD_PRIVATE_KEY),   "ENGINE_load_private_key"},
 {ERR_FUNC(ENGINE_F_ENGINE_LOAD_PUBLIC_KEY),    "ENGINE_load_public_key"},
-{ERR_FUNC(ENGINE_F_ENGINE_MODULE_INIT),        "ENGINE_MODULE_INIT"},
 {ERR_FUNC(ENGINE_F_ENGINE_NEW),        "ENGINE_new"},
 {ERR_FUNC(ENGINE_F_ENGINE_REMOVE),     "ENGINE_remove"},
 {ERR_FUNC(ENGINE_F_ENGINE_SET_DEFAULT_STRING), "ENGINE_set_default_string"},
@@ -100,11 +100,12 @@ static ERR_STRING_DATA ENGINE_str_functs[]=
 {ERR_FUNC(ENGINE_F_ENGINE_SET_NAME),   "ENGINE_set_name"},
 {ERR_FUNC(ENGINE_F_ENGINE_TABLE_REGISTER),     "ENGINE_TABLE_REGISTER"},
 {ERR_FUNC(ENGINE_F_ENGINE_UNLOAD_KEY), "ENGINE_UNLOAD_KEY"},
+{ERR_FUNC(ENGINE_F_ENGINE_UNLOCKED_FINISH),    "ENGINE_UNLOCKED_FINISH"},
 {ERR_FUNC(ENGINE_F_ENGINE_UP_REF),     "ENGINE_up_ref"},
 {ERR_FUNC(ENGINE_F_INT_CTRL_HELPER),   "INT_CTRL_HELPER"},
 {ERR_FUNC(ENGINE_F_INT_ENGINE_CONFIGURE),      "INT_ENGINE_CONFIGURE"},
+{ERR_FUNC(ENGINE_F_INT_ENGINE_MODULE_INIT),    "INT_ENGINE_MODULE_INIT"},
 {ERR_FUNC(ENGINE_F_LOG_MESSAGE),       "LOG_MESSAGE"},
-{ERR_FUNC(ENGINE_F_SET_DATA_CTX),      "SET_DATA_CTX"},
 {0,NULL}
        };
 
index 2843e4f..7633cf5 100644 (file)
@@ -111,7 +111,7 @@ int engine_unlocked_finish(ENGINE *e, int unlock_for_handlers)
        /* Release the structural reference too */
        if(!engine_free_util(e, 0))
                {
-               ENGINEerr(ENGINE_F_ENGINE_FINISH,ENGINE_R_FINISH_FAILED);
+               ENGINEerr(ENGINE_F_ENGINE_UNLOCKED_FINISH,ENGINE_R_FINISH_FAILED);
                return 0;
                }
        return to_return;
index 7b3686d..5815b86 100644 (file)
@@ -108,7 +108,7 @@ int engine_free_util(ENGINE *e, int locked)
 
        if(e == NULL)
                {
-               ENGINEerr(ENGINE_F_ENGINE_FREE,
+               ENGINEerr(ENGINE_F_ENGINE_FREE_UTIL,
                        ERR_R_PASSED_NULL_PARAMETER);
                return 0;
                }
index e25090c..4ce8f4c 100644 (file)
@@ -720,6 +720,7 @@ void ERR_load_ENGINE_strings(void);
 #define ENGINE_F_DYNAMIC_CTRL                           180
 #define ENGINE_F_DYNAMIC_GET_DATA_CTX                   181
 #define ENGINE_F_DYNAMIC_LOAD                           182
+#define ENGINE_F_DYNAMIC_SET_DATA_CTX                   183
 #define ENGINE_F_ENGINE_ADD                             105
 #define ENGINE_F_ENGINE_BY_ID                           106
 #define ENGINE_F_ENGINE_CMD_IS_EXECUTABLE               170
@@ -727,7 +728,7 @@ void ERR_load_ENGINE_strings(void);
 #define ENGINE_F_ENGINE_CTRL_CMD                        178
 #define ENGINE_F_ENGINE_CTRL_CMD_STRING                         171
 #define ENGINE_F_ENGINE_FINISH                          107
-#define ENGINE_F_ENGINE_FREE                            108
+#define ENGINE_F_ENGINE_FREE_UTIL                       108
 #define ENGINE_F_ENGINE_GET_CIPHER                      185
 #define ENGINE_F_ENGINE_GET_DEFAULT_TYPE                177
 #define ENGINE_F_ENGINE_GET_DIGEST                      186
@@ -738,7 +739,6 @@ void ERR_load_ENGINE_strings(void);
 #define ENGINE_F_ENGINE_LIST_REMOVE                     121
 #define ENGINE_F_ENGINE_LOAD_PRIVATE_KEY                150
 #define ENGINE_F_ENGINE_LOAD_PUBLIC_KEY                         151
-#define ENGINE_F_ENGINE_MODULE_INIT                     187
 #define ENGINE_F_ENGINE_NEW                             122
 #define ENGINE_F_ENGINE_REMOVE                          123
 #define ENGINE_F_ENGINE_SET_DEFAULT_STRING              189
@@ -747,11 +747,12 @@ void ERR_load_ENGINE_strings(void);
 #define ENGINE_F_ENGINE_SET_NAME                        130
 #define ENGINE_F_ENGINE_TABLE_REGISTER                  184
 #define ENGINE_F_ENGINE_UNLOAD_KEY                      152
+#define ENGINE_F_ENGINE_UNLOCKED_FINISH                         191
 #define ENGINE_F_ENGINE_UP_REF                          190
 #define ENGINE_F_INT_CTRL_HELPER                        172
 #define ENGINE_F_INT_ENGINE_CONFIGURE                   188
+#define ENGINE_F_INT_ENGINE_MODULE_INIT                         187
 #define ENGINE_F_LOG_MESSAGE                            141
-#define ENGINE_F_SET_DATA_CTX                           183
 
 /* Reason codes. */
 #define ENGINE_R_ALREADY_LOADED                                 100
index 7d84210..762e6d3 100644 (file)
@@ -159,7 +159,7 @@ int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl)
                        {
                        if (!ENGINE_init(impl))
                                {
-                               EVPerr(EVP_F_EVP_DIGESTINITEVP_R_INITIALIZATION_ERROR);
+                               EVPerr(EVP_F_EVP_DIGESTINIT_EX,EVP_R_INITIALIZATION_ERROR);
                                return 0;
                                }
                        }
@@ -173,7 +173,7 @@ int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl)
                        if(!d)
                                {
                                /* Same comment from evp_enc.c */
-                               EVPerr(EVP_F_EVP_DIGESTINITEVP_R_INITIALIZATION_ERROR);
+                               EVPerr(EVP_F_EVP_DIGESTINIT_EX,EVP_R_INITIALIZATION_ERROR);
                                return 0;
                                }
                        /* We'll use the ENGINE's private digest definition */
@@ -189,7 +189,7 @@ int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl)
        else
        if(!ctx->digest)
                {
-               EVPerr(EVP_F_EVP_DIGESTINITEVP_R_NO_DIGEST_SET);
+               EVPerr(EVP_F_EVP_DIGESTINIT_EX,EVP_R_NO_DIGEST_SET);
                return 0;
                }
 #endif
@@ -251,14 +251,14 @@ int EVP_MD_CTX_copy_ex(EVP_MD_CTX *out, const EVP_MD_CTX *in)
        unsigned char *tmp_buf;
        if ((in == NULL) || (in->digest == NULL))
                {
-               EVPerr(EVP_F_EVP_MD_CTX_COPY,EVP_R_INPUT_NOT_INITIALIZED);
+               EVPerr(EVP_F_EVP_MD_CTX_COPY_EX,EVP_R_INPUT_NOT_INITIALIZED);
                return 0;
                }
 #ifndef OPENSSL_NO_ENGINE
        /* Make sure it's safe to copy a digest context using an ENGINE */
        if (in->engine && !ENGINE_init(in->engine))
                {
-               EVPerr(EVP_F_EVP_MD_CTX_COPY,ERR_R_ENGINE_LIB);
+               EVPerr(EVP_F_EVP_MD_CTX_COPY_EX,ERR_R_ENGINE_LIB);
                return 0;
                }
 #endif
index 69ed179..0296bad 100644 (file)
@@ -852,21 +852,22 @@ void ERR_load_EVP_strings(void);
 /* Function codes. */
 #define EVP_F_AES_INIT_KEY                              133
 #define EVP_F_D2I_PKEY                                  100
+#define EVP_F_DSAPKEY2PKCS8                             134
+#define EVP_F_DSA_PKEY2PKCS8                            135
 #define EVP_F_ECDSA_PKEY2PKCS8                          129
-#define EVP_F_EC_KEY_PKEY2PKCS8                                 132
-#define EVP_F_EVP_CIPHERINIT                            123
+#define EVP_F_ECKEY_PKEY2PKCS8                          132
+#define EVP_F_EVP_CIPHERINIT_EX                                 123
 #define EVP_F_EVP_CIPHER_CTX_CTRL                       124
 #define EVP_F_EVP_CIPHER_CTX_SET_KEY_LENGTH             122
-#define EVP_F_EVP_DECRYPTFINAL                          101
-#define EVP_F_EVP_DIGESTINIT                            128
-#define EVP_F_EVP_ENCRYPTFINAL                          127
-#define EVP_F_EVP_MD_CTX_COPY                           110
+#define EVP_F_EVP_DECRYPTFINAL_EX                       101
+#define EVP_F_EVP_DIGESTINIT_EX                                 128
+#define EVP_F_EVP_ENCRYPTFINAL_EX                       127
+#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_CIPHERINIT                        116
 #define EVP_F_EVP_PKCS82PKEY                            111
-#define EVP_F_EVP_PKCS8_SET_BROKEN                      112
-#define EVP_F_EVP_PKEY2PKCS8                            113
+#define EVP_F_EVP_PKEY2PKCS8_BROKEN                     113
 #define EVP_F_EVP_PKEY_COPY_PARAMETERS                  103
 #define EVP_F_EVP_PKEY_DECRYPT                          104
 #define EVP_F_EVP_PKEY_ENCRYPT                          105
@@ -881,6 +882,7 @@ void ERR_load_EVP_strings(void);
 #define EVP_F_EVP_VERIFYFINAL                           108
 #define EVP_F_PKCS5_PBE_KEYIVGEN                        117
 #define EVP_F_PKCS5_V2_PBE_KEYIVGEN                     118
+#define EVP_F_PKCS8_SET_BROKEN                          112
 #define EVP_F_RC2_MAGIC_TO_METH                                 109
 #define EVP_F_RC5_CTRL                                  125
 
index c495200..e845632 100644 (file)
@@ -117,7 +117,7 @@ int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *imp
                        {
                        if (!ENGINE_init(impl))
                                {
-                               EVPerr(EVP_F_EVP_CIPHERINIT, EVP_R_INITIALIZATION_ERROR);
+                               EVPerr(EVP_F_EVP_CIPHERINIT_EX, EVP_R_INITIALIZATION_ERROR);
                                return 0;
                                }
                        }
@@ -134,7 +134,7 @@ int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *imp
                                 * control history, is that we should at least
                                 * be able to avoid using US mispellings of
                                 * "initialisation"? */
-                               EVPerr(EVP_F_EVP_CIPHERINIT, EVP_R_INITIALIZATION_ERROR);
+                               EVPerr(EVP_F_EVP_CIPHERINIT_EX, EVP_R_INITIALIZATION_ERROR);
                                return 0;
                                }
                        /* We'll use the ENGINE's private cipher definition */
@@ -154,7 +154,7 @@ int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *imp
                        ctx->cipher_data=OPENSSL_malloc(ctx->cipher->ctx_size);
                        if (!ctx->cipher_data)
                                {
-                               EVPerr(EVP_F_EVP_CIPHERINIT, ERR_R_MALLOC_FAILURE);
+                               EVPerr(EVP_F_EVP_CIPHERINIT_EX, ERR_R_MALLOC_FAILURE);
                                return 0;
                                }
                        }
@@ -168,14 +168,14 @@ int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *imp
                        {
                        if(!EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_INIT, 0, NULL))
                                {
-                               EVPerr(EVP_F_EVP_CIPHERINIT, EVP_R_INITIALIZATION_ERROR);
+                               EVPerr(EVP_F_EVP_CIPHERINIT_EX, EVP_R_INITIALIZATION_ERROR);
                                return 0;
                                }
                        }
                }
        else if(!ctx->cipher)
                {
-               EVPerr(EVP_F_EVP_CIPHERINIT, EVP_R_NO_CIPHER_SET);
+               EVPerr(EVP_F_EVP_CIPHERINIT_EX, EVP_R_NO_CIPHER_SET);
                return 0;
                }
 #ifndef OPENSSL_NO_ENGINE
@@ -349,7 +349,7 @@ int EVP_EncryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl)
                {
                if(bl)
                        {
-                       EVPerr(EVP_F_EVP_ENCRYPTFINAL,EVP_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH);
+                       EVPerr(EVP_F_EVP_ENCRYPTFINAL_EX,EVP_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH);
                        return 0;
                        }
                *outl = 0;
@@ -434,7 +434,7 @@ int EVP_DecryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl)
                {
                if(ctx->buf_len)
                        {
-                       EVPerr(EVP_F_EVP_DECRYPTFINAL,EVP_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH);
+                       EVPerr(EVP_F_EVP_DECRYPTFINAL_EX,EVP_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH);
                        return 0;
                        }
                *outl = 0;
@@ -444,21 +444,21 @@ int EVP_DecryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl)
                {
                if (ctx->buf_len || !ctx->final_used)
                        {
-                       EVPerr(EVP_F_EVP_DECRYPTFINAL,EVP_R_WRONG_FINAL_BLOCK_LENGTH);
+                       EVPerr(EVP_F_EVP_DECRYPTFINAL_EX,EVP_R_WRONG_FINAL_BLOCK_LENGTH);
                        return(0);
                        }
                OPENSSL_assert(b <= sizeof ctx->final);
                n=ctx->final[b-1];
                if (n > (int)b)
                        {
-                       EVPerr(EVP_F_EVP_DECRYPTFINAL,EVP_R_BAD_DECRYPT);
+                       EVPerr(EVP_F_EVP_DECRYPTFINAL_EX,EVP_R_BAD_DECRYPT);
                        return(0);
                        }
                for (i=0; i<n; i++)
                        {
                        if (ctx->final[--b] != n)
                                {
-                               EVPerr(EVP_F_EVP_DECRYPTFINAL,EVP_R_BAD_DECRYPT);
+                               EVPerr(EVP_F_EVP_DECRYPTFINAL_EX,EVP_R_BAD_DECRYPT);
                                return(0);
                                }
                        }
index c0b8b54..e854aad 100644 (file)
@@ -72,21 +72,22 @@ static ERR_STRING_DATA EVP_str_functs[]=
        {
 {ERR_FUNC(EVP_F_AES_INIT_KEY), "AES_INIT_KEY"},
 {ERR_FUNC(EVP_F_D2I_PKEY),     "D2I_PKEY"},
+{ERR_FUNC(EVP_F_DSAPKEY2PKCS8),        "DSAPKEY2PKCS8"},
+{ERR_FUNC(EVP_F_DSA_PKEY2PKCS8),       "DSA_PKEY2PKCS8"},
 {ERR_FUNC(EVP_F_ECDSA_PKEY2PKCS8),     "ECDSA_PKEY2PKCS8"},
-{ERR_FUNC(EVP_F_EC_KEY_PKEY2PKCS8),    "EC_KEY_PKEY2PKCS8"},
-{ERR_FUNC(EVP_F_EVP_CIPHERINIT),       "EVP_CipherInit"},
+{ERR_FUNC(EVP_F_ECKEY_PKEY2PKCS8),     "ECKEY_PKEY2PKCS8"},
+{ERR_FUNC(EVP_F_EVP_CIPHERINIT_EX),    "EVP_CipherInit_ex"},
 {ERR_FUNC(EVP_F_EVP_CIPHER_CTX_CTRL),  "EVP_CIPHER_CTX_ctrl"},
 {ERR_FUNC(EVP_F_EVP_CIPHER_CTX_SET_KEY_LENGTH),        "EVP_CIPHER_CTX_set_key_length"},
-{ERR_FUNC(EVP_F_EVP_DECRYPTFINAL),     "EVP_DecryptFinal"},
-{ERR_FUNC(EVP_F_EVP_DIGESTINIT),       "EVP_DigestInit"},
-{ERR_FUNC(EVP_F_EVP_ENCRYPTFINAL),     "EVP_EncryptFinal"},
-{ERR_FUNC(EVP_F_EVP_MD_CTX_COPY),      "EVP_MD_CTX_copy"},
+{ERR_FUNC(EVP_F_EVP_DECRYPTFINAL_EX),  "EVP_DecryptFinal_ex"},
+{ERR_FUNC(EVP_F_EVP_DIGESTINIT_EX),    "EVP_DigestInit_ex"},
+{ERR_FUNC(EVP_F_EVP_ENCRYPTFINAL_EX),  "EVP_EncryptFinal_ex"},
+{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_CIPHERINIT),   "EVP_PBE_CipherInit"},
 {ERR_FUNC(EVP_F_EVP_PKCS82PKEY),       "EVP_PKCS82PKEY"},
-{ERR_FUNC(EVP_F_EVP_PKCS8_SET_BROKEN), "EVP_PKCS8_SET_BROKEN"},
-{ERR_FUNC(EVP_F_EVP_PKEY2PKCS8),       "EVP_PKEY2PKCS8"},
+{ERR_FUNC(EVP_F_EVP_PKEY2PKCS8_BROKEN),        "EVP_PKEY2PKCS8_broken"},
 {ERR_FUNC(EVP_F_EVP_PKEY_COPY_PARAMETERS),     "EVP_PKEY_copy_parameters"},
 {ERR_FUNC(EVP_F_EVP_PKEY_DECRYPT),     "EVP_PKEY_decrypt"},
 {ERR_FUNC(EVP_F_EVP_PKEY_ENCRYPT),     "EVP_PKEY_encrypt"},
@@ -101,6 +102,7 @@ static ERR_STRING_DATA EVP_str_functs[]=
 {ERR_FUNC(EVP_F_EVP_VERIFYFINAL),      "EVP_VerifyFinal"},
 {ERR_FUNC(EVP_F_PKCS5_PBE_KEYIVGEN),   "PKCS5_PBE_keyivgen"},
 {ERR_FUNC(EVP_F_PKCS5_V2_PBE_KEYIVGEN),        "PKCS5_v2_PBE_keyivgen"},
+{ERR_FUNC(EVP_F_PKCS8_SET_BROKEN),     "PKCS8_set_broken"},
 {ERR_FUNC(EVP_F_RC2_MAGIC_TO_METH),    "RC2_MAGIC_TO_METH"},
 {ERR_FUNC(EVP_F_RC5_CTRL),     "RC5_CTRL"},
 {0,NULL}
index c6affe2..c26d2de 100644 (file)
@@ -74,7 +74,7 @@ const EVP_MD *md;
 EVP_PBE_KEYGEN *keygen;
 } EVP_PBE_CTL;
 
-int EVP_PBE_CipherInit (ASN1_OBJECT *pbe_obj, const char *pass, int passlen,
+int EVP_PBE_CipherInit(ASN1_OBJECT *pbe_obj, const char *pass, int passlen,
             ASN1_TYPE *param, EVP_CIPHER_CTX *ctx, int en_de)
 {
 
index bc74bde..925e0e0 100644 (file)
@@ -74,7 +74,7 @@ static int eckey_pkey2pkcs8(PKCS8_PRIV_KEY_INFO *p8inf, EVP_PKEY *pkey);
 
 /* Extract a private key from a PKCS8 structure */
 
-EVP_PKEY *EVP_PKCS82PKEY (PKCS8_PRIV_KEY_INFO *p8)
+EVP_PKEY *EVP_PKCS82PKEY(PKCS8_PRIV_KEY_INFO *p8)
 {
        EVP_PKEY *pkey = NULL;
 #ifndef OPENSSL_NO_RSA
@@ -337,17 +337,17 @@ PKCS8_PRIV_KEY_INFO *EVP_PKEY2PKCS8_broken(EVP_PKEY *pkey, int broken)
        PKCS8_PRIV_KEY_INFO *p8;
 
        if (!(p8 = PKCS8_PRIV_KEY_INFO_new())) {        
-               EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE);
+               EVPerr(EVP_F_EVP_PKEY2PKCS8_BROKEN,ERR_R_MALLOC_FAILURE);
                return NULL;
        }
        p8->broken = broken;
        if (!ASN1_INTEGER_set(p8->version, 0)) {
-               EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE);
+               EVPerr(EVP_F_EVP_PKEY2PKCS8_BROKEN,ERR_R_MALLOC_FAILURE);
                PKCS8_PRIV_KEY_INFO_free (p8);
                return NULL;
        }
        if (!(p8->pkeyalg->parameter = ASN1_TYPE_new ())) {
-               EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE);
+               EVPerr(EVP_F_EVP_PKEY2PKCS8_BROKEN,ERR_R_MALLOC_FAILURE);
                PKCS8_PRIV_KEY_INFO_free (p8);
                return NULL;
        }
@@ -362,7 +362,7 @@ PKCS8_PRIV_KEY_INFO *EVP_PKEY2PKCS8_broken(EVP_PKEY *pkey, int broken)
                p8->pkeyalg->parameter->type = V_ASN1_NULL;
                if (!ASN1_pack_string_of (EVP_PKEY,pkey, i2d_PrivateKey,
                                         &p8->pkey->value.octet_string)) {
-                       EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE);
+                       EVPerr(EVP_F_EVP_PKEY2PKCS8_BROKEN,ERR_R_MALLOC_FAILURE);
                        PKCS8_PRIV_KEY_INFO_free (p8);
                        return NULL;
                }
@@ -387,7 +387,7 @@ PKCS8_PRIV_KEY_INFO *EVP_PKEY2PKCS8_broken(EVP_PKEY *pkey, int broken)
                break;
 #endif
                default:
-               EVPerr(EVP_F_EVP_PKEY2PKCS8, EVP_R_UNSUPPORTED_PRIVATE_KEY_ALGORITHM);
+               EVPerr(EVP_F_EVP_PKEY2PKCS8_BROKEN, EVP_R_UNSUPPORTED_PRIVATE_KEY_ALGORITHM);
                PKCS8_PRIV_KEY_INFO_free (p8);
                return NULL;
        }
@@ -412,7 +412,7 @@ PKCS8_PRIV_KEY_INFO *PKCS8_set_broken(PKCS8_PRIV_KEY_INFO *p8, int broken)
                break;
 
                default:
-               EVPerr(EVP_F_EVP_PKCS8_SET_BROKEN,EVP_R_PKCS8_UNKNOWN_BROKEN_TYPE);
+               EVPerr(EVP_F_PKCS8_SET_BROKEN,EVP_R_PKCS8_UNKNOWN_BROKEN_TYPE);
                return NULL;
        }
 }
@@ -430,24 +430,24 @@ static int dsa_pkey2pkcs8(PKCS8_PRIV_KEY_INFO *p8, EVP_PKEY *pkey)
        p8->pkeyalg->algorithm = OBJ_nid2obj(NID_dsa);
        len = i2d_DSAparams (pkey->pkey.dsa, NULL);
        if (!(p = OPENSSL_malloc(len))) {
-               EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE);
+               EVPerr(EVP_F_DSA_PKEY2PKCS8,ERR_R_MALLOC_FAILURE);
                goto err;
        }
        q = p;
        i2d_DSAparams (pkey->pkey.dsa, &q);
        if (!(params = ASN1_STRING_new())) {
-               EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE);
+               EVPerr(EVP_F_DSA_PKEY2PKCS8,ERR_R_MALLOC_FAILURE);
                goto err;
        }
        if (!ASN1_STRING_set(params, p, len)) {
-               EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE);
+               EVPerr(EVP_F_DSA_PKEY2PKCS8,ERR_R_MALLOC_FAILURE);
                goto err;
        }
        OPENSSL_free(p);
        p = NULL;
        /* Get private key into integer */
        if (!(prkey = BN_to_ASN1_INTEGER (pkey->pkey.dsa->priv_key, NULL))) {
-               EVPerr(EVP_F_EVP_PKEY2PKCS8,EVP_R_ENCODE_ERROR);
+               EVPerr(EVP_F_DSA_PKEY2PKCS8,EVP_R_ENCODE_ERROR);
                goto err;
        }
 
@@ -458,7 +458,7 @@ static int dsa_pkey2pkcs8(PKCS8_PRIV_KEY_INFO *p8, EVP_PKEY *pkey)
 
                if (!ASN1_pack_string_of(ASN1_INTEGER,prkey, i2d_ASN1_INTEGER,
                                         &p8->pkey->value.octet_string)) {
-                       EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE);
+                       EVPerr(EVP_F_DSA_PKEY2PKCS8,ERR_R_MALLOC_FAILURE);
                        goto err;
                }
 
@@ -476,39 +476,39 @@ static int dsa_pkey2pkcs8(PKCS8_PRIV_KEY_INFO *p8, EVP_PKEY *pkey)
                params = NULL;
                p8->pkeyalg->parameter->type = V_ASN1_SEQUENCE;
                if (!(ndsa = sk_ASN1_TYPE_new_null())) {
-                       EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE);
+                       EVPerr(EVP_F_DSA_PKEY2PKCS8,ERR_R_MALLOC_FAILURE);
                        goto err;
                }
                if (!(ttmp = ASN1_TYPE_new())) {
-                       EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE);
+                       EVPerr(EVP_F_DSA_PKEY2PKCS8,ERR_R_MALLOC_FAILURE);
                        goto err;
                }
                if (!(ttmp->value.integer =
                        BN_to_ASN1_INTEGER(pkey->pkey.dsa->pub_key, NULL))) {
-                       EVPerr(EVP_F_EVP_PKEY2PKCS8,EVP_R_ENCODE_ERROR);
+                       EVPerr(EVP_F_DSA_PKEY2PKCS8,EVP_R_ENCODE_ERROR);
                        goto err;
                }
                ttmp->type = V_ASN1_INTEGER;
                if (!sk_ASN1_TYPE_push(ndsa, ttmp)) {
-                       EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE);
+                       EVPerr(EVP_F_DSA_PKEY2PKCS8,ERR_R_MALLOC_FAILURE);
                        goto err;
                }
 
                if (!(ttmp = ASN1_TYPE_new())) {
-                       EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE);
+                       EVPerr(EVP_F_DSA_PKEY2PKCS8,ERR_R_MALLOC_FAILURE);
                        goto err;
                }
                ttmp->value.integer = prkey;
                prkey = NULL;
                ttmp->type = V_ASN1_INTEGER;
                if (!sk_ASN1_TYPE_push(ndsa, ttmp)) {
-                       EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE);
+                       EVPerr(EVP_F_DSA_PKEY2PKCS8,ERR_R_MALLOC_FAILURE);
                        goto err;
                }
                ttmp = NULL;
 
                if (!(p8->pkey->value.octet_string = ASN1_OCTET_STRING_new())) {
-                       EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE);
+                       EVPerr(EVP_F_DSA_PKEY2PKCS8,ERR_R_MALLOC_FAILURE);
                        goto err;
                }
 
@@ -516,7 +516,7 @@ static int dsa_pkey2pkcs8(PKCS8_PRIV_KEY_INFO *p8, EVP_PKEY *pkey)
                                         &p8->pkey->value.octet_string->data,
                                         &p8->pkey->value.octet_string->length)) {
 
-                       EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE);
+                       EVPerr(EVP_F_DSA_PKEY2PKCS8,ERR_R_MALLOC_FAILURE);
                        goto err;
                }
                sk_ASN1_TYPE_pop_free(ndsa, ASN1_TYPE_free);
@@ -526,36 +526,36 @@ static int dsa_pkey2pkcs8(PKCS8_PRIV_KEY_INFO *p8, EVP_PKEY *pkey)
 
                p8->pkeyalg->parameter->type = V_ASN1_NULL;
                if (!(ndsa = sk_ASN1_TYPE_new_null())) {
-                       EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE);
+                       EVPerr(EVP_F_DSA_PKEY2PKCS8,ERR_R_MALLOC_FAILURE);
                        goto err;
                }
                if (!(ttmp = ASN1_TYPE_new())) {
-                       EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE);
+                       EVPerr(EVP_F_DSA_PKEY2PKCS8,ERR_R_MALLOC_FAILURE);
                        goto err;
                }
                ttmp->value.sequence = params;
                params = NULL;
                ttmp->type = V_ASN1_SEQUENCE;
                if (!sk_ASN1_TYPE_push(ndsa, ttmp)) {
-                       EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE);
+                       EVPerr(EVP_F_DSA_PKEY2PKCS8,ERR_R_MALLOC_FAILURE);
                        goto err;
                }
 
                if (!(ttmp = ASN1_TYPE_new())) {
-                       EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE);
+                       EVPerr(EVP_F_DSA_PKEY2PKCS8,ERR_R_MALLOC_FAILURE);
                        goto err;
                }
                ttmp->value.integer = prkey;
                prkey = NULL;
                ttmp->type = V_ASN1_INTEGER;
                if (!sk_ASN1_TYPE_push(ndsa, ttmp)) {
-                       EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE);
+                       EVPerr(EVP_F_DSA_PKEY2PKCS8,ERR_R_MALLOC_FAILURE);
                        goto err;
                }
                ttmp = NULL;
 
                if (!(p8->pkey->value.octet_string = ASN1_OCTET_STRING_new())) {
-                       EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE);
+                       EVPerr(EVP_F_DSA_PKEY2PKCS8,ERR_R_MALLOC_FAILURE);
                        goto err;
                }
 
@@ -563,7 +563,7 @@ static int dsa_pkey2pkcs8(PKCS8_PRIV_KEY_INFO *p8, EVP_PKEY *pkey)
                                         &p8->pkey->value.octet_string->data,
                                         &p8->pkey->value.octet_string->length)) {
 
-                       EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE);
+                       EVPerr(EVP_F_DSA_PKEY2PKCS8,ERR_R_MALLOC_FAILURE);
                        goto err;
                }
                sk_ASN1_TYPE_pop_free(ndsa, ASN1_TYPE_free);
@@ -590,7 +590,7 @@ static int eckey_pkey2pkcs8(PKCS8_PRIV_KEY_INFO *p8, EVP_PKEY *pkey)
 
        if (pkey->pkey.eckey == NULL || pkey->pkey.eckey->group == NULL)
        {
-               EVPerr(EVP_F_EC_KEY_PKEY2PKCS8, EVP_R_MISSING_PARAMETERS);
+               EVPerr(EVP_F_ECKEY_PKEY2PKCS8, EVP_R_MISSING_PARAMETERS);
                return 0;
        }
        eckey = pkey->pkey.eckey;
@@ -611,7 +611,7 @@ static int eckey_pkey2pkcs8(PKCS8_PRIV_KEY_INFO *p8, EVP_PKEY *pkey)
 
        if ((p8->pkeyalg->parameter = ASN1_TYPE_new()) == NULL)
        {
-               EVPerr(EVP_F_EC_KEY_PKEY2PKCS8, ERR_R_MALLOC_FAILURE);
+               EVPerr(EVP_F_ECKEY_PKEY2PKCS8, ERR_R_MALLOC_FAILURE);
                return 0;
        }
        
@@ -626,18 +626,18 @@ static int eckey_pkey2pkcs8(PKCS8_PRIV_KEY_INFO *p8, EVP_PKEY *pkey)
        {
                if ((i = i2d_ECParameters(eckey, NULL)) == 0)
                {
-                       EVPerr(EVP_F_EC_KEY_PKEY2PKCS8, ERR_R_EC_LIB);
+                       EVPerr(EVP_F_ECKEY_PKEY2PKCS8, ERR_R_EC_LIB);
                        return 0;
                }
                if ((p = (unsigned char *) OPENSSL_malloc(i)) == NULL)
                {
-                       EVPerr(EVP_F_EC_KEY_PKEY2PKCS8, ERR_R_MALLOC_FAILURE);
+                       EVPerr(EVP_F_ECKEY_PKEY2PKCS8, ERR_R_MALLOC_FAILURE);
                        return 0;
                }       
                pp = p;
                if (!i2d_ECParameters(eckey, &pp))
                {
-                       EVPerr(EVP_F_EC_KEY_PKEY2PKCS8, ERR_R_EC_LIB);
+                       EVPerr(EVP_F_ECKEY_PKEY2PKCS8, ERR_R_EC_LIB);
                        OPENSSL_free(p);
                        return 0;
                }
@@ -645,7 +645,7 @@ static int eckey_pkey2pkcs8(PKCS8_PRIV_KEY_INFO *p8, EVP_PKEY *pkey)
                if ((p8->pkeyalg->parameter->value.sequence 
                        = ASN1_STRING_new()) == NULL)
                {
-                       EVPerr(EVP_F_EC_KEY_PKEY2PKCS8, ERR_R_ASN1_LIB);
+                       EVPerr(EVP_F_ECKEY_PKEY2PKCS8, ERR_R_ASN1_LIB);
                        OPENSSL_free(p);
                        return 0;
                }
@@ -663,21 +663,21 @@ static int eckey_pkey2pkcs8(PKCS8_PRIV_KEY_INFO *p8, EVP_PKEY *pkey)
        if (!i)
        {
                pkey->pkey.eckey->enc_flag = tmp_flags;
-               EVPerr(EVP_F_EC_KEY_PKEY2PKCS8, ERR_R_EC_LIB);
+               EVPerr(EVP_F_ECKEY_PKEY2PKCS8, ERR_R_EC_LIB);
                return 0;
        }
        p = (unsigned char *) OPENSSL_malloc(i);
        if (!p)
        {
                pkey->pkey.eckey->enc_flag = tmp_flags;
-               EVPerr(EVP_F_EC_KEY_PKEY2PKCS8, ERR_R_MALLOC_FAILURE);
+               EVPerr(EVP_F_ECKEY_PKEY2PKCS8, ERR_R_MALLOC_FAILURE);
                return 0;
        }
        pp = p;
        if (!i2d_ECPrivateKey(pkey->pkey.eckey, &pp))
        {
                pkey->pkey.eckey->enc_flag = tmp_flags;
-               EVPerr(EVP_F_EC_KEY_PKEY2PKCS8, ERR_R_EC_LIB);
+               EVPerr(EVP_F_ECKEY_PKEY2PKCS8, ERR_R_EC_LIB);
                OPENSSL_free(p);
                return 0;
        }
@@ -693,7 +693,7 @@ static int eckey_pkey2pkcs8(PKCS8_PRIV_KEY_INFO *p8, EVP_PKEY *pkey)
                    (const void *)p, i))
 
                {
-                       EVPerr(EVP_F_EC_KEY_PKEY2PKCS8, ERR_R_MALLOC_FAILURE);
+                       EVPerr(EVP_F_ECKEY_PKEY2PKCS8, ERR_R_MALLOC_FAILURE);
                }
                else
                        ret = 1;
@@ -702,7 +702,7 @@ static int eckey_pkey2pkcs8(PKCS8_PRIV_KEY_INFO *p8, EVP_PKEY *pkey)
                case PKCS8_NS_DB:               /* DSA specific */
                case PKCS8_EMBEDDED_PARAM:      /* DSA specific */
                default:
-                       EVPerr(EVP_F_EVP_PKEY2PKCS8,EVP_R_ENCODE_ERROR);
+                       EVPerr(EVP_F_ECKEY_PKEY2PKCS8,EVP_R_ENCODE_ERROR);
        }
        OPENSSL_cleanse(p, (size_t)i);
        OPENSSL_free(p);
index 07b18c4..3635204 100644 (file)
@@ -559,11 +559,11 @@ void ERR_load_OCSP_strings(void);
 
 /* Function codes. */
 #define OCSP_F_ASN1_STRING_ENCODE                       100
-#define OCSP_F_CERT_ID_NEW                              101
 #define OCSP_F_D2I_OCSP_NONCE                           102
 #define OCSP_F_OCSP_BASIC_ADD1_STATUS                   103
 #define OCSP_F_OCSP_BASIC_SIGN                          104
 #define OCSP_F_OCSP_BASIC_VERIFY                        105
+#define OCSP_F_OCSP_CERT_ID_NEW                                 101
 #define OCSP_F_OCSP_CHECK_DELEGATED                     106
 #define OCSP_F_OCSP_CHECK_IDS                           107
 #define OCSP_F_OCSP_CHECK_ISSUER                        108
index 65e6093..2c8ed72 100644 (file)
 static ERR_STRING_DATA OCSP_str_functs[]=
        {
 {ERR_FUNC(OCSP_F_ASN1_STRING_ENCODE),  "ASN1_STRING_encode"},
-{ERR_FUNC(OCSP_F_CERT_ID_NEW), "CERT_ID_NEW"},
 {ERR_FUNC(OCSP_F_D2I_OCSP_NONCE),      "D2I_OCSP_NONCE"},
 {ERR_FUNC(OCSP_F_OCSP_BASIC_ADD1_STATUS),      "OCSP_basic_add1_status"},
 {ERR_FUNC(OCSP_F_OCSP_BASIC_SIGN),     "OCSP_basic_sign"},
 {ERR_FUNC(OCSP_F_OCSP_BASIC_VERIFY),   "OCSP_basic_verify"},
+{ERR_FUNC(OCSP_F_OCSP_CERT_ID_NEW),    "OCSP_cert_id_new"},
 {ERR_FUNC(OCSP_F_OCSP_CHECK_DELEGATED),        "OCSP_CHECK_DELEGATED"},
 {ERR_FUNC(OCSP_F_OCSP_CHECK_IDS),      "OCSP_CHECK_IDS"},
 {ERR_FUNC(OCSP_F_OCSP_CHECK_ISSUER),   "OCSP_CHECK_ISSUER"},
index 9e87fc7..2745081 100644 (file)
@@ -112,7 +112,7 @@ OCSP_CERTID *OCSP_cert_id_new(const EVP_MD *dgst,
        if (alg->algorithm != NULL) ASN1_OBJECT_free(alg->algorithm);
        if ((nid = EVP_MD_type(dgst)) == NID_undef)
                {
-               OCSPerr(OCSP_F_CERT_ID_NEW,OCSP_R_UNKNOWN_NID);
+               OCSPerr(OCSP_F_OCSP_CERT_ID_NEW,OCSP_R_UNKNOWN_NID);
                goto err;
                }
        if (!(alg->algorithm=OBJ_nid2obj(nid))) goto err;
@@ -134,7 +134,7 @@ OCSP_CERTID *OCSP_cert_id_new(const EVP_MD *dgst,
                }
        return cid;
 digerr:
-       OCSPerr(OCSP_F_CERT_ID_NEW,OCSP_R_DIGEST_ERR);
+       OCSPerr(OCSP_F_OCSP_CERT_ID_NEW,OCSP_R_DIGEST_ERR);
 err:
        if (cid) OCSP_CERTID_free(cid);
        return NULL;
index 3f67a99..780a34d 100644 (file)
@@ -674,24 +674,27 @@ void ERR_load_PEM_strings(void);
 /* Function codes. */
 #define PEM_F_D2I_PKCS8PRIVATEKEY_BIO                   120
 #define PEM_F_D2I_PKCS8PRIVATEKEY_FP                    121
-#define PEM_F_DEF_CALLBACK                              100
+#define PEM_F_DO_PK8PKEY                                126
+#define PEM_F_DO_PK8PKEY_FP                             125
 #define PEM_F_LOAD_IV                                   101
 #define PEM_F_PEM_ASN1_READ                             102
 #define PEM_F_PEM_ASN1_READ_BIO                                 103
 #define PEM_F_PEM_ASN1_WRITE                            104
 #define PEM_F_PEM_ASN1_WRITE_BIO                        105
+#define PEM_F_PEM_DEF_CALLBACK                          100
 #define PEM_F_PEM_DO_HEADER                             106
-#define PEM_F_PEM_F_DO_PK8KEY_FP                        122
 #define PEM_F_PEM_F_PEM_WRITE_PKCS8PRIVATEKEY           118
 #define PEM_F_PEM_GET_EVP_CIPHER_INFO                   107
+#define PEM_F_PEM_PK8PKEY                               119
 #define PEM_F_PEM_READ                                  108
 #define PEM_F_PEM_READ_BIO                              109
+#define PEM_F_PEM_READ_BIO_PRIVATEKEY                   123
+#define PEM_F_PEM_READ_PRIVATEKEY                       124
 #define PEM_F_PEM_SEALFINAL                             110
 #define PEM_F_PEM_SEALINIT                              111
 #define PEM_F_PEM_SIGNFINAL                             112
 #define PEM_F_PEM_WRITE                                         113
 #define PEM_F_PEM_WRITE_BIO                             114
-#define PEM_F_PEM_WRITE_BIO_PKCS8PRIVATEKEY             119
 #define PEM_F_PEM_X509_INFO_READ                        115
 #define PEM_F_PEM_X509_INFO_READ_BIO                    116
 #define PEM_F_PEM_X509_INFO_WRITE_BIO                   117
index 8527028..7837cde 100644 (file)
@@ -72,24 +72,27 @@ static ERR_STRING_DATA PEM_str_functs[]=
        {
 {ERR_FUNC(PEM_F_D2I_PKCS8PRIVATEKEY_BIO),      "d2i_PKCS8PrivateKey_bio"},
 {ERR_FUNC(PEM_F_D2I_PKCS8PRIVATEKEY_FP),       "d2i_PKCS8PrivateKey_fp"},
-{ERR_FUNC(PEM_F_DEF_CALLBACK), "DEF_CALLBACK"},
+{ERR_FUNC(PEM_F_DO_PK8PKEY),   "DO_PK8PKEY"},
+{ERR_FUNC(PEM_F_DO_PK8PKEY_FP),        "DO_PK8PKEY_FP"},
 {ERR_FUNC(PEM_F_LOAD_IV),      "LOAD_IV"},
 {ERR_FUNC(PEM_F_PEM_ASN1_READ),        "PEM_ASN1_read"},
 {ERR_FUNC(PEM_F_PEM_ASN1_READ_BIO),    "PEM_ASN1_read_bio"},
 {ERR_FUNC(PEM_F_PEM_ASN1_WRITE),       "PEM_ASN1_write"},
 {ERR_FUNC(PEM_F_PEM_ASN1_WRITE_BIO),   "PEM_ASN1_write_bio"},
+{ERR_FUNC(PEM_F_PEM_DEF_CALLBACK),     "PEM_def_callback"},
 {ERR_FUNC(PEM_F_PEM_DO_HEADER),        "PEM_do_header"},
-{ERR_FUNC(PEM_F_PEM_F_DO_PK8KEY_FP),   "PEM_F_DO_PK8KEY_FP"},
 {ERR_FUNC(PEM_F_PEM_F_PEM_WRITE_PKCS8PRIVATEKEY),      "PEM_F_PEM_WRITE_PKCS8PRIVATEKEY"},
 {ERR_FUNC(PEM_F_PEM_GET_EVP_CIPHER_INFO),      "PEM_get_EVP_CIPHER_INFO"},
+{ERR_FUNC(PEM_F_PEM_PK8PKEY),  "PEM_PK8PKEY"},
 {ERR_FUNC(PEM_F_PEM_READ),     "PEM_read"},
 {ERR_FUNC(PEM_F_PEM_READ_BIO), "PEM_read_bio"},
+{ERR_FUNC(PEM_F_PEM_READ_BIO_PRIVATEKEY),      "PEM_READ_BIO_PRIVATEKEY"},
+{ERR_FUNC(PEM_F_PEM_READ_PRIVATEKEY),  "PEM_READ_PRIVATEKEY"},
 {ERR_FUNC(PEM_F_PEM_SEALFINAL),        "PEM_SealFinal"},
 {ERR_FUNC(PEM_F_PEM_SEALINIT), "PEM_SealInit"},
 {ERR_FUNC(PEM_F_PEM_SIGNFINAL),        "PEM_SignFinal"},
 {ERR_FUNC(PEM_F_PEM_WRITE),    "PEM_write"},
 {ERR_FUNC(PEM_F_PEM_WRITE_BIO),        "PEM_write_bio"},
-{ERR_FUNC(PEM_F_PEM_WRITE_BIO_PKCS8PRIVATEKEY),        "PEM_write_bio_PKCS8PrivateKey"},
 {ERR_FUNC(PEM_F_PEM_X509_INFO_READ),   "PEM_X509_INFO_read"},
 {ERR_FUNC(PEM_F_PEM_X509_INFO_READ_BIO),       "PEM_X509_INFO_read_bio"},
 {ERR_FUNC(PEM_F_PEM_X509_INFO_WRITE_BIO),      "PEM_X509_INFO_write_bio"},
index 9f47853..7cfc2f3 100644 (file)
@@ -81,7 +81,7 @@ int PEM_def_callback(char *buf, int num, int w, void *key)
 #ifdef OPENSSL_NO_FP_API
        /* We should not ever call the default callback routine from
         * windows. */
-       PEMerr(PEM_F_DEF_CALLBACK,ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
+       PEMerr(PEM_F_PEM_DEF_CALLBACK,ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
        return(-1);
 #else
        int i,j;
@@ -102,7 +102,7 @@ int PEM_def_callback(char *buf, int num, int w, void *key)
                i=EVP_read_pw_string(buf,num,prompt,w);
                if (i != 0)
                        {
-                       PEMerr(PEM_F_DEF_CALLBACK,PEM_R_PROBLEMS_GETTING_PASSWORD);
+                       PEMerr(PEM_F_PEM_DEF_CALLBACK,PEM_R_PROBLEMS_GETTING_PASSWORD);
                        memset(buf,0,(unsigned int)num);
                        return(-1);
                        }
index db38a2a..6deab8c 100644 (file)
@@ -118,7 +118,7 @@ static int do_pk8pkey(BIO *bp, EVP_PKEY *x, int isder, int nid, const EVP_CIPHER
        char buf[PEM_BUFSIZE];
        int ret;
        if(!(p8inf = EVP_PKEY2PKCS8(x))) {
-               PEMerr(PEM_F_PEM_WRITE_BIO_PKCS8PRIVATEKEY,
+               PEMerr(PEM_F_DO_PK8PKEY,
                                        PEM_R_ERROR_CONVERTING_PRIVATE_KEY);
                return 0;
        }
@@ -127,8 +127,7 @@ static int do_pk8pkey(BIO *bp, EVP_PKEY *x, int isder, int nid, const EVP_CIPHER
                        if(!cb) klen = PEM_def_callback(buf, PEM_BUFSIZE, 1, u);
                        else klen = cb(buf, PEM_BUFSIZE, 1, u);
                        if(klen <= 0) {
-                               PEMerr(PEM_F_PEM_WRITE_BIO_PKCS8PRIVATEKEY,
-                                                               PEM_R_READ_KEY);
+                               PEMerr(PEM_F_DO_PK8PKEY,PEM_R_READ_KEY);
                                PKCS8_PRIV_KEY_INFO_free(p8inf);
                                return 0;
                        }
@@ -215,7 +214,7 @@ static int do_pk8pkey_fp(FILE *fp, EVP_PKEY *x, int isder, int nid, const EVP_CI
        BIO *bp;
        int ret;
        if(!(bp = BIO_new_fp(fp, BIO_NOCLOSE))) {
-               PEMerr(PEM_F_PEM_F_DO_PK8KEY_FP,ERR_R_BUF_LIB);
+               PEMerr(PEM_F_DO_PK8PKEY_FP,ERR_R_BUF_LIB);
                 return(0);
        }
        ret = do_pk8pkey(bp, x, isder, nid, enc, kstr, klen, cb, u);
index ce8e83b..2162a45 100644 (file)
@@ -105,7 +105,7 @@ EVP_PKEY *PEM_read_bio_PrivateKey(BIO *bp, EVP_PKEY **x, pem_password_cb *cb, vo
                if (cb) klen=cb(psbuf,PEM_BUFSIZE,0,u);
                else klen=PEM_def_callback(psbuf,PEM_BUFSIZE,0,u);
                if (klen <= 0) {
-                       PEMerr(PEM_F_PEM_ASN1_READ_BIO,
+                       PEMerr(PEM_F_PEM_READ_BIO_PRIVATEKEY,
                                        PEM_R_BAD_PASSWORD_READ);
                        X509_SIG_free(p8);
                        goto err;
@@ -122,7 +122,7 @@ EVP_PKEY *PEM_read_bio_PrivateKey(BIO *bp, EVP_PKEY **x, pem_password_cb *cb, vo
        }
 p8err:
        if (ret == NULL)
-               PEMerr(PEM_F_PEM_ASN1_READ_BIO,ERR_R_ASN1_LIB);
+               PEMerr(PEM_F_PEM_READ_BIO_PRIVATEKEY,ERR_R_ASN1_LIB);
 err:
        OPENSSL_free(nm);
        OPENSSL_free(data);
@@ -137,7 +137,7 @@ EVP_PKEY *PEM_read_PrivateKey(FILE *fp, EVP_PKEY **x, pem_password_cb *cb, void
 
         if ((b=BIO_new(BIO_s_file())) == NULL)
                {
-               PEMerr(PEM_F_PEM_ASN1_READ,ERR_R_BUF_LIB);
+               PEMerr(PEM_F_PEM_READ_PRIVATEKEY,ERR_R_BUF_LIB);
                 return(0);
                }
         BIO_set_fp(b,fp,BIO_NOCLOSE);
index 1909f28..fead37a 100644 (file)
@@ -68,16 +68,16 @@ PKCS12_SAFEBAG *PKCS12_item_pack_safebag(void *obj, const ASN1_ITEM *it, int nid
        PKCS12_BAGS *bag;
        PKCS12_SAFEBAG *safebag;
        if (!(bag = PKCS12_BAGS_new())) {
-               PKCS12err(PKCS12_F_PKCS12_PACK_SAFEBAG, ERR_R_MALLOC_FAILURE);
+               PKCS12err(PKCS12_F_PKCS12_ITEM_PACK_SAFEBAG, ERR_R_MALLOC_FAILURE);
                return NULL;
        }
        bag->type = OBJ_nid2obj(nid1);
        if (!ASN1_item_pack(obj, it, &bag->value.octet)) {
-               PKCS12err(PKCS12_F_PKCS12_PACK_SAFEBAG, ERR_R_MALLOC_FAILURE);
+               PKCS12err(PKCS12_F_PKCS12_ITEM_PACK_SAFEBAG, ERR_R_MALLOC_FAILURE);
                return NULL;
        }
        if (!(safebag = PKCS12_SAFEBAG_new())) {
-               PKCS12err(PKCS12_F_PKCS12_PACK_SAFEBAG, ERR_R_MALLOC_FAILURE);
+               PKCS12err(PKCS12_F_PKCS12_ITEM_PACK_SAFEBAG, ERR_R_MALLOC_FAILURE);
                return NULL;
        }
        safebag->value.bag = bag;
index d407be3..bbc13e5 100644 (file)
@@ -84,7 +84,7 @@ EVP_PBE_alg_add(NID_pbe_WithSHA1And40BitRC2_CBC, EVP_rc2_40_cbc(),
 #endif
 }
 
-int PKCS12_PBE_keyivgen (EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
+int PKCS12_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
                ASN1_TYPE *param, const EVP_CIPHER *cipher, const EVP_MD *md, int en_de)
 {
        PBEPARAM *pbe;
@@ -97,7 +97,7 @@ int PKCS12_PBE_keyivgen (EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
        pbuf = param->value.sequence->data;
        if (!param || (param->type != V_ASN1_SEQUENCE) ||
           !(pbe = d2i_PBEPARAM (NULL, &pbuf, param->value.sequence->length))) {
-               EVPerr(PKCS12_F_PKCS12_PBE_KEYIVGEN,EVP_R_DECODE_ERROR);
+               PKCS12err(PKCS12_F_PKCS12_PBE_KEYIVGEN,PKCS12_R_DECODE_ERROR);
                return 0;
        }
 
index 19c0ccf..74c961a 100644 (file)
@@ -120,7 +120,7 @@ void * PKCS12_item_decrypt_d2i(X509_ALGOR *algor, const ASN1_ITEM *it,
 
        if (!PKCS12_pbe_crypt(algor, pass, passlen, oct->data, oct->length,
                               &out, &outlen, 0)) {
-               PKCS12err(PKCS12_F_PKCS12_DECRYPT_D2I,PKCS12_R_PKCS12_PBE_CRYPT_ERROR);
+               PKCS12err(PKCS12_F_PKCS12_ITEM_DECRYPT_D2I,PKCS12_R_PKCS12_PBE_CRYPT_ERROR);
                return NULL;
        }
        p = out;
@@ -138,7 +138,7 @@ void * PKCS12_item_decrypt_d2i(X509_ALGOR *algor, const ASN1_ITEM *it,
 #endif
        ret = ASN1_item_d2i(NULL, &p, outlen, it);
        if (zbuf) OPENSSL_cleanse(out, outlen);
-       if(!ret) PKCS12err(PKCS12_F_PKCS12_DECRYPT_D2I,PKCS12_R_DECODE_ERROR);
+       if(!ret) PKCS12err(PKCS12_F_PKCS12_ITEM_DECRYPT_D2I,PKCS12_R_DECODE_ERROR);
        OPENSSL_free(out);
        return ret;
 }
@@ -155,17 +155,17 @@ ASN1_OCTET_STRING *PKCS12_item_i2d_encrypt(X509_ALGOR *algor, const ASN1_ITEM *i
        unsigned char *in = NULL;
        int inlen;
        if (!(oct = M_ASN1_OCTET_STRING_new ())) {
-               PKCS12err(PKCS12_F_PKCS12_I2D_ENCRYPT,ERR_R_MALLOC_FAILURE);
+               PKCS12err(PKCS12_F_PKCS12_ITEM_I2D_ENCRYPT,ERR_R_MALLOC_FAILURE);
                return NULL;
        }
        inlen = ASN1_item_i2d(obj, &in, it);
        if (!in) {
-               PKCS12err(PKCS12_F_PKCS12_I2D_ENCRYPT,PKCS12_R_ENCODE_ERROR);
+               PKCS12err(PKCS12_F_PKCS12_ITEM_I2D_ENCRYPT,PKCS12_R_ENCODE_ERROR);
                return NULL;
        }
        if (!PKCS12_pbe_crypt(algor, pass, passlen, in, inlen, &oct->data,
                                 &oct->length, 1)) {
-               PKCS12err(PKCS12_F_PKCS12_I2D_ENCRYPT,PKCS12_R_ENCRYPT_ERROR);
+               PKCS12err(PKCS12_F_PKCS12_ITEM_I2D_ENCRYPT,PKCS12_R_ENCRYPT_ERROR);
                OPENSSL_free(in);
                return NULL;
        }
index 5276b12..6bdc132 100644 (file)
@@ -62,7 +62,7 @@
 
 /* Initialise a PKCS12 structure to take data */
 
-PKCS12 *PKCS12_init (int mode)
+PKCS12 *PKCS12_init(int mode)
 {
        PKCS12 *pkcs12;
        if (!(pkcs12 = PKCS12_new())) {
index 2b31999..c2ee2cc 100644 (file)
@@ -80,7 +80,7 @@ static int parse_bag( PKCS12_SAFEBAG *bag, const char *pass, int passlen,
  * passed unitialised.
  */
 
-int PKCS12_parse (PKCS12 *p12, const char *pass, EVP_PKEY **pkey, X509 **cert,
+int PKCS12_parse(PKCS12 *p12, const char *pass, EVP_PKEY **pkey, X509 **cert,
             STACK_OF(X509) **ca)
 {
 
@@ -141,7 +141,7 @@ int PKCS12_parse (PKCS12 *p12, const char *pass, EVP_PKEY **pkey, X509 **cert,
 
 /* Parse the outer PKCS#12 structure */
 
-static int parse_pk12 (PKCS12 *p12, const char *pass, int passlen,
+static int parse_pk12(PKCS12 *p12, const char *pass, int passlen,
             EVP_PKEY **pkey, X509 **cert, STACK_OF(X509) **ca)
 {
        STACK_OF(PKCS7) *asafes;
@@ -178,10 +178,10 @@ static int parse_pk12 (PKCS12 *p12, const char *pass, int passlen,
 }
 
 
-static int parse_bags (STACK_OF(PKCS12_SAFEBAG) *bags, const char *pass,
-                      int passlen, EVP_PKEY **pkey, X509 **cert,
-                      STACK_OF(X509) **ca, ASN1_OCTET_STRING **keyid,
-                      char *keymatch)
+static int parse_bags(STACK_OF(PKCS12_SAFEBAG) *bags, const char *pass,
+                     int passlen, EVP_PKEY **pkey, X509 **cert,
+                     STACK_OF(X509) **ca, ASN1_OCTET_STRING **keyid,
+                     char *keymatch)
 {
        int i;
        for (i = 0; i < sk_PKCS12_SAFEBAG_num(bags); i++) {
@@ -197,9 +197,9 @@ static int parse_bags (STACK_OF(PKCS12_SAFEBAG) *bags, const char *pass,
 #define MATCH_ALL  0x3
 
 static int parse_bag(PKCS12_SAFEBAG *bag, const char *pass, int passlen,
-                     EVP_PKEY **pkey, X509 **cert, STACK_OF(X509) **ca,
-                     ASN1_OCTET_STRING **keyid,
-            char *keymatch)
+                    EVP_PKEY **pkey, X509 **cert, STACK_OF(X509) **ca,
+                    ASN1_OCTET_STRING **keyid,
+                    char *keymatch)
 {
        PKCS8_PRIV_KEY_INFO *p8;
        X509 *x509;
@@ -221,7 +221,7 @@ static int parse_bag(PKCS12_SAFEBAG *bag, const char *pass, int passlen,
                        if (M_ASN1_OCTET_STRING_cmp(*keyid, lkey)) lkey = NULL;
                } else {
                        if (!(*keyid = M_ASN1_OCTET_STRING_dup(lkey))) {
-                               PKCS12err(PKCS12_F_PARSE_BAGS,ERR_R_MALLOC_FAILURE);
+                               PKCS12err(PKCS12_F_PARSE_BAG,ERR_R_MALLOC_FAILURE);
                                return 0;
                    }
                }
index 4886b9b..5eac25f 100644 (file)
@@ -64,8 +64,8 @@
 #include <openssl/pkcs12.h>
 
 /* Generate a MAC */
-int PKCS12_gen_mac (PKCS12 *p12, const char *pass, int passlen,
-                   unsigned char *mac, unsigned int *maclen)
+int PKCS12_gen_mac(PKCS12 *p12, const char *pass, int passlen,
+                  unsigned char *mac, unsigned int *maclen)
 {
        const EVP_MD *md_type;
        HMAC_CTX hmac;
@@ -96,16 +96,16 @@ int PKCS12_gen_mac (PKCS12 *p12, const char *pass, int passlen,
 }
 
 /* Verify the mac */
-int PKCS12_verify_mac (PKCS12 *p12, const char *pass, int passlen)
+int PKCS12_verify_mac(PKCS12 *p12, const char *pass, int passlen)
 {
        unsigned char mac[EVP_MAX_MD_SIZE];
        unsigned int maclen;
        if(p12->mac == NULL) {
-               PKCS12err(PKCS12_F_VERIFY_MAC,PKCS12_R_MAC_ABSENT);
+               PKCS12err(PKCS12_F_PKCS12_VERIFY_MAC,PKCS12_R_MAC_ABSENT);
                return 0;
        }
        if (!PKCS12_gen_mac (p12, pass, passlen, mac, &maclen)) {
-               PKCS12err(PKCS12_F_VERIFY_MAC,PKCS12_R_MAC_GENERATION_ERROR);
+               PKCS12err(PKCS12_F_PKCS12_VERIFY_MAC,PKCS12_R_MAC_GENERATION_ERROR);
                return 0;
        }
        if ((maclen != (unsigned int)p12->mac->dinfo->digest->length)
@@ -115,7 +115,7 @@ int PKCS12_verify_mac (PKCS12 *p12, const char *pass, int passlen)
 
 /* Set a mac */
 
-int PKCS12_set_mac (PKCS12 *p12, const char *pass, int passlen,
+int PKCS12_set_mac(PKCS12 *p12, const char *pass, int passlen,
             unsigned char *salt, int saltlen, int iter, const EVP_MD *md_type)
 {
        unsigned char mac[EVP_MAX_MD_SIZE];
@@ -139,7 +139,7 @@ int PKCS12_set_mac (PKCS12 *p12, const char *pass, int passlen,
 }
 
 /* Set up a mac structure */
-int PKCS12_setup_mac (PKCS12 *p12, int iter, unsigned char *salt, int saltlen,
+int PKCS12_setup_mac(PKCS12 *p12, int iter, unsigned char *salt, int saltlen,
             const EVP_MD *md_type)
 {
        if (!(p12->mac = PKCS12_MAC_DATA_new())) return PKCS12_ERROR;
index e62d497..48eacc5 100644 (file)
@@ -77,28 +77,26 @@ static int alg_get(X509_ALGOR *alg, int *pnid, int *piter, int *psaltlen);
 
 int PKCS12_newpass(PKCS12 *p12, char *oldpass, char *newpass)
 {
+       /* Check for NULL PKCS12 structure */
 
-/* Check for NULL PKCS12 structure */
-
-if(!p12) {
-       PKCS12err(PKCS12_F_PKCS12_NEWPASS,PKCS12_R_INVALID_NULL_PKCS12_POINTER);
-       return 0;
-}
-
-/* Check the mac */
-
-if (!PKCS12_verify_mac(p12, oldpass, -1)) {
-       PKCS12err(PKCS12_F_PKCS12_NEWPASS,PKCS12_R_MAC_VERIFY_FAILURE);
-       return 0;
-}
+       if(!p12) {
+               PKCS12err(PKCS12_F_PKCS12_NEWPASS,PKCS12_R_INVALID_NULL_PKCS12_POINTER);
+               return 0;
+       }
 
-if (!newpass_p12(p12, oldpass, newpass)) {
-       PKCS12err(PKCS12_F_PKCS12_NEWPASS,PKCS12_R_PARSE_ERROR);
-       return 0;
-}
+       /* Check the mac */
+       
+       if (!PKCS12_verify_mac(p12, oldpass, -1)) {
+               PKCS12err(PKCS12_F_PKCS12_NEWPASS,PKCS12_R_MAC_VERIFY_FAILURE);
+               return 0;
+       }
 
-return 1;
+       if (!newpass_p12(p12, oldpass, newpass)) {
+               PKCS12err(PKCS12_F_PKCS12_NEWPASS,PKCS12_R_PARSE_ERROR);
+               return 0;
+       }
 
+       return 1;
 }
 
 /* Parse the outer PKCS#12 structure */
index 8094a24..f01801e 100644 (file)
 
 static ERR_STRING_DATA PKCS12_str_functs[]=
        {
+{ERR_FUNC(PKCS12_F_PARSE_BAG), "PARSE_BAG"},
 {ERR_FUNC(PKCS12_F_PARSE_BAGS),        "PARSE_BAGS"},
 {ERR_FUNC(PKCS12_F_PKCS12_ADD_FRIENDLYNAME),   "PKCS12_ADD_FRIENDLYNAME"},
 {ERR_FUNC(PKCS12_F_PKCS12_ADD_FRIENDLYNAME_ASC),       "PKCS12_add_friendlyname_asc"},
 {ERR_FUNC(PKCS12_F_PKCS12_ADD_FRIENDLYNAME_UNI),       "PKCS12_add_friendlyname_uni"},
 {ERR_FUNC(PKCS12_F_PKCS12_ADD_LOCALKEYID),     "PKCS12_add_localkeyid"},
 {ERR_FUNC(PKCS12_F_PKCS12_CREATE),     "PKCS12_create"},
-{ERR_FUNC(PKCS12_F_PKCS12_DECRYPT_D2I),        "PKCS12_DECRYPT_D2I"},
 {ERR_FUNC(PKCS12_F_PKCS12_GEN_MAC),    "PKCS12_gen_mac"},
-{ERR_FUNC(PKCS12_F_PKCS12_I2D_ENCRYPT),        "PKCS12_I2D_ENCRYPT"},
 {ERR_FUNC(PKCS12_F_PKCS12_INIT),       "PKCS12_init"},
+{ERR_FUNC(PKCS12_F_PKCS12_ITEM_DECRYPT_D2I),   "PKCS12_item_decrypt_d2i"},
+{ERR_FUNC(PKCS12_F_PKCS12_ITEM_I2D_ENCRYPT),   "PKCS12_item_i2d_encrypt"},
+{ERR_FUNC(PKCS12_F_PKCS12_ITEM_PACK_SAFEBAG),  "PKCS12_item_pack_safebag"},
 {ERR_FUNC(PKCS12_F_PKCS12_KEY_GEN_ASC),        "PKCS12_key_gen_asc"},
 {ERR_FUNC(PKCS12_F_PKCS12_KEY_GEN_UNI),        "PKCS12_key_gen_uni"},
 {ERR_FUNC(PKCS12_F_PKCS12_MAKE_KEYBAG),        "PKCS12_MAKE_KEYBAG"},
@@ -87,15 +89,14 @@ static ERR_STRING_DATA PKCS12_str_functs[]=
 {ERR_FUNC(PKCS12_F_PKCS12_NEWPASS),    "PKCS12_newpass"},
 {ERR_FUNC(PKCS12_F_PKCS12_PACK_P7DATA),        "PKCS12_pack_p7data"},
 {ERR_FUNC(PKCS12_F_PKCS12_PACK_P7ENCDATA),     "PKCS12_pack_p7encdata"},
-{ERR_FUNC(PKCS12_F_PKCS12_PACK_SAFEBAG),       "PKCS12_PACK_SAFEBAG"},
 {ERR_FUNC(PKCS12_F_PKCS12_PARSE),      "PKCS12_parse"},
 {ERR_FUNC(PKCS12_F_PKCS12_PBE_CRYPT),  "PKCS12_pbe_crypt"},
 {ERR_FUNC(PKCS12_F_PKCS12_PBE_KEYIVGEN),       "PKCS12_PBE_keyivgen"},
 {ERR_FUNC(PKCS12_F_PKCS12_SETUP_MAC),  "PKCS12_setup_mac"},
 {ERR_FUNC(PKCS12_F_PKCS12_SET_MAC),    "PKCS12_set_mac"},
+{ERR_FUNC(PKCS12_F_PKCS12_VERIFY_MAC), "PKCS12_verify_mac"},
 {ERR_FUNC(PKCS12_F_PKCS8_ADD_KEYUSAGE),        "PKCS8_add_keyusage"},
 {ERR_FUNC(PKCS12_F_PKCS8_ENCRYPT),     "PKCS8_encrypt"},
-{ERR_FUNC(PKCS12_F_VERIFY_MAC),        "VERIFY_MAC"},
 {0,NULL}
        };
 
index 5c8b492..f66f62a 100644 (file)
@@ -273,16 +273,18 @@ void ERR_load_PKCS12_strings(void);
 /* Error codes for the PKCS12 functions. */
 
 /* Function codes. */
+#define PKCS12_F_PARSE_BAG                              129
 #define PKCS12_F_PARSE_BAGS                             103
 #define PKCS12_F_PKCS12_ADD_FRIENDLYNAME                100
 #define PKCS12_F_PKCS12_ADD_FRIENDLYNAME_ASC            127
 #define PKCS12_F_PKCS12_ADD_FRIENDLYNAME_UNI            102
 #define PKCS12_F_PKCS12_ADD_LOCALKEYID                  104
 #define PKCS12_F_PKCS12_CREATE                          105
-#define PKCS12_F_PKCS12_DECRYPT_D2I                     106
 #define PKCS12_F_PKCS12_GEN_MAC                                 107
-#define PKCS12_F_PKCS12_I2D_ENCRYPT                     108
 #define PKCS12_F_PKCS12_INIT                            109
+#define PKCS12_F_PKCS12_ITEM_DECRYPT_D2I                106
+#define PKCS12_F_PKCS12_ITEM_I2D_ENCRYPT                108
+#define PKCS12_F_PKCS12_ITEM_PACK_SAFEBAG               117
 #define PKCS12_F_PKCS12_KEY_GEN_ASC                     110
 #define PKCS12_F_PKCS12_KEY_GEN_UNI                     111
 #define PKCS12_F_PKCS12_MAKE_KEYBAG                     112
@@ -290,15 +292,14 @@ void ERR_load_PKCS12_strings(void);
 #define PKCS12_F_PKCS12_NEWPASS                                 128
 #define PKCS12_F_PKCS12_PACK_P7DATA                     114
 #define PKCS12_F_PKCS12_PACK_P7ENCDATA                  115
-#define PKCS12_F_PKCS12_PACK_SAFEBAG                    117
 #define PKCS12_F_PKCS12_PARSE                           118
 #define PKCS12_F_PKCS12_PBE_CRYPT                       119
 #define PKCS12_F_PKCS12_PBE_KEYIVGEN                    120
 #define PKCS12_F_PKCS12_SETUP_MAC                       122
 #define PKCS12_F_PKCS12_SET_MAC                                 123
+#define PKCS12_F_PKCS12_VERIFY_MAC                      126
 #define PKCS12_F_PKCS8_ADD_KEYUSAGE                     124
 #define PKCS12_F_PKCS8_ENCRYPT                          125
-#define PKCS12_F_VERIFY_MAC                             126
 
 /* Reason codes. */
 #define PKCS12_R_CANT_PACK_STRUCTURE                    100
index 8d98a85..f0f80a7 100644 (file)
@@ -527,13 +527,13 @@ static BIO *PKCS7_find_digest(EVP_MD_CTX **pmd, BIO *bio, int nid)
                bio=BIO_find_type(bio,BIO_TYPE_MD);
                if (bio == NULL)
                        {
-                       PKCS7err(PKCS7_F_FIND_DIGEST,PKCS7_R_UNABLE_TO_FIND_MESSAGE_DIGEST);
+                       PKCS7err(PKCS7_F_PKCS7_FIND_DIGEST,PKCS7_R_UNABLE_TO_FIND_MESSAGE_DIGEST);
                        return NULL;    
                        }
                BIO_get_md_ctx(bio,pmd);
                if (*pmd == NULL)
                        {
-                       PKCS7err(PKCS7_F_PKCS7_DATASIGN,ERR_R_INTERNAL_ERROR);
+                       PKCS7err(PKCS7_F_PKCS7_FIND_DIGEST,ERR_R_INTERNAL_ERROR);
                        return NULL;
                        }       
                if (EVP_MD_CTX_type(*pmd) == nid)
@@ -567,7 +567,7 @@ int PKCS7_dataFinal(PKCS7 *p7, BIO *bio)
                si_sk=p7->d.signed_and_enveloped->signer_info;
                if (!(os=M_ASN1_OCTET_STRING_new()))
                        {
-                       PKCS7err(PKCS7_F_PKCS7_DATASIGN,ERR_R_MALLOC_FAILURE);
+                       PKCS7err(PKCS7_F_PKCS7_DATAFINAL,ERR_R_MALLOC_FAILURE);
                        goto err;
                        }
                p7->d.signed_and_enveloped->enc_data->enc_data=os;
@@ -576,7 +576,7 @@ int PKCS7_dataFinal(PKCS7 *p7, BIO *bio)
                /* XXXXXXXXXXXXXXXX */
                if (!(os=M_ASN1_OCTET_STRING_new()))
                        {
-                       PKCS7err(PKCS7_F_PKCS7_DATASIGN,ERR_R_MALLOC_FAILURE);
+                       PKCS7err(PKCS7_F_PKCS7_DATAFINAL,ERR_R_MALLOC_FAILURE);
                        goto err;
                        }
                p7->d.enveloped->enc_data->enc_data=os;
@@ -607,7 +607,7 @@ int PKCS7_dataFinal(PKCS7 *p7, BIO *bio)
                {
                if ((buf=BUF_MEM_new()) == NULL)
                        {
-                       PKCS7err(PKCS7_F_PKCS7_DATASIGN,ERR_R_BIO_LIB);
+                       PKCS7err(PKCS7_F_PKCS7_DATAFINAL,ERR_R_BIO_LIB);
                        goto err;
                        }
                for (i=0; i<sk_PKCS7_SIGNER_INFO_num(si_sk); i++)
@@ -629,7 +629,7 @@ int PKCS7_dataFinal(PKCS7 *p7, BIO *bio)
                        EVP_MD_CTX_copy_ex(&ctx_tmp,mdc);
                        if (!BUF_MEM_grow_clean(buf,EVP_PKEY_size(si->pkey)))
                                {
-                               PKCS7err(PKCS7_F_PKCS7_DATASIGN,ERR_R_BIO_LIB);
+                               PKCS7err(PKCS7_F_PKCS7_DATAFINAL,ERR_R_BIO_LIB);
                                goto err;
                                }
 
@@ -651,7 +651,7 @@ int PKCS7_dataFinal(PKCS7 *p7, BIO *bio)
                                        {
                                        if (!(sign_time=X509_gmtime_adj(NULL,0)))
                                                {
-                                               PKCS7err(PKCS7_F_PKCS7_DATASIGN,
+                                               PKCS7err(PKCS7_F_PKCS7_DATAFINAL,
                                                        ERR_R_MALLOC_FAILURE);
                                                goto err;
                                                }
@@ -665,14 +665,14 @@ int PKCS7_dataFinal(PKCS7 *p7, BIO *bio)
                                EVP_DigestFinal_ex(&ctx_tmp,md_data,&md_len);
                                if (!(digest=M_ASN1_OCTET_STRING_new()))
                                        {
-                                       PKCS7err(PKCS7_F_PKCS7_DATASIGN,
+                                       PKCS7err(PKCS7_F_PKCS7_DATAFINAL,
                                                ERR_R_MALLOC_FAILURE);
                                        goto err;
                                        }
                                if (!M_ASN1_OCTET_STRING_set(digest,md_data,
                                                                md_len))
                                        {
-                                       PKCS7err(PKCS7_F_PKCS7_DATASIGN,
+                                       PKCS7err(PKCS7_F_PKCS7_DATAFINAL,
                                                ERR_R_MALLOC_FAILURE);
                                        goto err;
                                        }
@@ -701,13 +701,13 @@ int PKCS7_dataFinal(PKCS7 *p7, BIO *bio)
                        if (!EVP_SignFinal(&ctx_tmp,(unsigned char *)buf->data,
                                (unsigned int *)&buf->length,si->pkey))
                                {
-                               PKCS7err(PKCS7_F_PKCS7_DATASIGN,ERR_R_EVP_LIB);
+                               PKCS7err(PKCS7_F_PKCS7_DATAFINAL,ERR_R_EVP_LIB);
                                goto err;
                                }
                        if (!ASN1_STRING_set(si->enc_digest,
                                (unsigned char *)buf->data,buf->length))
                                {
-                               PKCS7err(PKCS7_F_PKCS7_DATASIGN,ERR_R_ASN1_LIB);
+                               PKCS7err(PKCS7_F_PKCS7_DATAFINAL,ERR_R_ASN1_LIB);
                                goto err;
                                }
                        }
@@ -728,7 +728,7 @@ int PKCS7_dataFinal(PKCS7 *p7, BIO *bio)
                btmp=BIO_find_type(bio,BIO_TYPE_MEM);
                if (btmp == NULL)
                        {
-                       PKCS7err(PKCS7_F_PKCS7_DATASIGN,PKCS7_R_UNABLE_TO_FIND_MEM_BIO);
+                       PKCS7err(PKCS7_F_PKCS7_DATAFINAL,PKCS7_R_UNABLE_TO_FIND_MEM_BIO);
                        goto err;
                        }
                BIO_get_mem_ptr(btmp,&buf_mem);
index 9dc3c0c..952f379 100644 (file)
@@ -383,7 +383,6 @@ void ERR_load_PKCS7_strings(void);
 /* Function codes. */
 #define PKCS7_F_B64_READ_PKCS7                          120
 #define PKCS7_F_B64_WRITE_PKCS7                                 121
-#define PKCS7_F_FIND_DIGEST                             127
 #define PKCS7_F_PKCS7_ADD_ATTRIB_SMIMECAP               118
 #define PKCS7_F_PKCS7_ADD_CERTIFICATE                   100
 #define PKCS7_F_PKCS7_ADD_CRL                           101
@@ -392,11 +391,13 @@ void ERR_load_PKCS7_strings(void);
 #define PKCS7_F_PKCS7_BIO_ADD_DIGEST                    125
 #define PKCS7_F_PKCS7_CTRL                              104
 #define PKCS7_F_PKCS7_DATADECODE                        112
+#define PKCS7_F_PKCS7_DATAFINAL                                 128
 #define PKCS7_F_PKCS7_DATAINIT                          105
 #define PKCS7_F_PKCS7_DATASIGN                          106
 #define PKCS7_F_PKCS7_DATAVERIFY                        107
 #define PKCS7_F_PKCS7_DECRYPT                           114
 #define PKCS7_F_PKCS7_ENCRYPT                           115
+#define PKCS7_F_PKCS7_FIND_DIGEST                       127
 #define PKCS7_F_PKCS7_GET0_SIGNERS                      124
 #define PKCS7_F_PKCS7_SET_CIPHER                        108
 #define PKCS7_F_PKCS7_SET_CONTENT                       109
@@ -436,8 +437,9 @@ void ERR_load_PKCS7_strings(void);
 #define PKCS7_R_NO_SIG_CONTENT_TYPE                     138
 #define PKCS7_R_OPERATION_NOT_SUPPORTED_ON_THIS_TYPE    104
 #define PKCS7_R_PKCS7_ADD_SIGNATURE_ERROR               124
+#define PKCS7_R_PKCS7_DATAFINAL                                 126
 #define PKCS7_R_PKCS7_DATAFINAL_ERROR                   125
-#define PKCS7_R_PKCS7_DATASIGN                          126
+#define PKCS7_R_PKCS7_DATASIGN                          145
 #define PKCS7_R_PKCS7_PARSE_ERROR                       139
 #define PKCS7_R_PKCS7_SIG_PARSE_ERROR                   140
 #define PKCS7_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE  127
index 85b700f..309664d 100644 (file)
@@ -72,7 +72,6 @@ static ERR_STRING_DATA PKCS7_str_functs[]=
        {
 {ERR_FUNC(PKCS7_F_B64_READ_PKCS7),     "B64_READ_PKCS7"},
 {ERR_FUNC(PKCS7_F_B64_WRITE_PKCS7),    "B64_WRITE_PKCS7"},
-{ERR_FUNC(PKCS7_F_FIND_DIGEST),        "FIND_DIGEST"},
 {ERR_FUNC(PKCS7_F_PKCS7_ADD_ATTRIB_SMIMECAP),  "PKCS7_add_attrib_smimecap"},
 {ERR_FUNC(PKCS7_F_PKCS7_ADD_CERTIFICATE),      "PKCS7_add_certificate"},
 {ERR_FUNC(PKCS7_F_PKCS7_ADD_CRL),      "PKCS7_add_crl"},
@@ -81,11 +80,13 @@ static ERR_STRING_DATA PKCS7_str_functs[]=
 {ERR_FUNC(PKCS7_F_PKCS7_BIO_ADD_DIGEST),       "PKCS7_BIO_ADD_DIGEST"},
 {ERR_FUNC(PKCS7_F_PKCS7_CTRL), "PKCS7_ctrl"},
 {ERR_FUNC(PKCS7_F_PKCS7_DATADECODE),   "PKCS7_dataDecode"},
+{ERR_FUNC(PKCS7_F_PKCS7_DATAFINAL),    "PKCS7_dataFinal"},
 {ERR_FUNC(PKCS7_F_PKCS7_DATAINIT),     "PKCS7_dataInit"},
 {ERR_FUNC(PKCS7_F_PKCS7_DATASIGN),     "PKCS7_DATASIGN"},
 {ERR_FUNC(PKCS7_F_PKCS7_DATAVERIFY),   "PKCS7_dataVerify"},
 {ERR_FUNC(PKCS7_F_PKCS7_DECRYPT),      "PKCS7_decrypt"},
 {ERR_FUNC(PKCS7_F_PKCS7_ENCRYPT),      "PKCS7_encrypt"},
+{ERR_FUNC(PKCS7_F_PKCS7_FIND_DIGEST),  "PKCS7_FIND_DIGEST"},
 {ERR_FUNC(PKCS7_F_PKCS7_GET0_SIGNERS), "PKCS7_get0_signers"},
 {ERR_FUNC(PKCS7_F_PKCS7_SET_CIPHER),   "PKCS7_set_cipher"},
 {ERR_FUNC(PKCS7_F_PKCS7_SET_CONTENT),  "PKCS7_set_content"},
@@ -128,6 +129,7 @@ static ERR_STRING_DATA PKCS7_str_reasons[]=
 {ERR_REASON(PKCS7_R_NO_SIG_CONTENT_TYPE) ,"no sig content type"},
 {ERR_REASON(PKCS7_R_OPERATION_NOT_SUPPORTED_ON_THIS_TYPE),"operation not supported on this type"},
 {ERR_REASON(PKCS7_R_PKCS7_ADD_SIGNATURE_ERROR),"pkcs7 add signature error"},
+{ERR_REASON(PKCS7_R_PKCS7_DATAFINAL)     ,"pkcs7 datafinal"},
 {ERR_REASON(PKCS7_R_PKCS7_DATAFINAL_ERROR),"pkcs7 datafinal error"},
 {ERR_REASON(PKCS7_R_PKCS7_DATASIGN)      ,"pkcs7 datasign"},
 {ERR_REASON(PKCS7_R_PKCS7_PARSE_ERROR)   ,"pkcs7 parse error"},
index 4e28bbc..f8bcbc3 100644 (file)
@@ -322,15 +322,20 @@ void ERR_load_RSA_strings(void);
 /* Error codes for the RSA functions. */
 
 /* Function codes. */
-#define RSA_F_MEMORY_LOCK                               100
+#define RSA_F_RSA_BUILTIN_KEYGEN                        105
 #define RSA_F_RSA_CHECK_KEY                             123
 #define RSA_F_RSA_EAY_PRIVATE_DECRYPT                   101
 #define RSA_F_RSA_EAY_PRIVATE_ENCRYPT                   102
 #define RSA_F_RSA_EAY_PUBLIC_DECRYPT                    103
 #define RSA_F_RSA_EAY_PUBLIC_ENCRYPT                    104
-#define RSA_F_RSA_GENERATE_KEY                          105
+#define RSA_F_RSA_MEMORY_LOCK                           100
 #define RSA_F_RSA_NEW_METHOD                            106
 #define RSA_F_RSA_NULL                                  124
+#define RSA_F_RSA_NULL_MOD_EXP                          126
+#define RSA_F_RSA_NULL_PRIVATE_DECRYPT                  127
+#define RSA_F_RSA_NULL_PRIVATE_ENCRYPT                  128
+#define RSA_F_RSA_NULL_PUBLIC_DECRYPT                   129
+#define RSA_F_RSA_NULL_PUBLIC_ENCRYPT                   130
 #define RSA_F_RSA_PADDING_ADD_NONE                      107
 #define RSA_F_RSA_PADDING_ADD_PKCS1_OAEP                121
 #define RSA_F_RSA_PADDING_ADD_PKCS1_TYPE_1              108
index 738ea0b..21755c0 100644 (file)
@@ -400,7 +400,7 @@ static int RSA_eay_private_decrypt(int flen, const unsigned char *from,
                blinding = rsa_get_blinding(rsa, &br, &local_blinding, ctx);
                if (blinding == NULL)
                        {
-                       RSAerr(RSA_F_RSA_EAY_PRIVATE_ENCRYPT, ERR_R_INTERNAL_ERROR);
+                       RSAerr(RSA_F_RSA_EAY_PRIVATE_DECRYPT, ERR_R_INTERNAL_ERROR);
                        goto err;
                        }
                }
index 6641e61..b2ac6c2 100644 (file)
 
 static ERR_STRING_DATA RSA_str_functs[]=
        {
-{ERR_FUNC(RSA_F_MEMORY_LOCK),  "MEMORY_LOCK"},
+{ERR_FUNC(RSA_F_RSA_BUILTIN_KEYGEN),   "RSA_BUILTIN_KEYGEN"},
 {ERR_FUNC(RSA_F_RSA_CHECK_KEY),        "RSA_check_key"},
 {ERR_FUNC(RSA_F_RSA_EAY_PRIVATE_DECRYPT),      "RSA_EAY_PRIVATE_DECRYPT"},
 {ERR_FUNC(RSA_F_RSA_EAY_PRIVATE_ENCRYPT),      "RSA_EAY_PRIVATE_ENCRYPT"},
 {ERR_FUNC(RSA_F_RSA_EAY_PUBLIC_DECRYPT),       "RSA_EAY_PUBLIC_DECRYPT"},
 {ERR_FUNC(RSA_F_RSA_EAY_PUBLIC_ENCRYPT),       "RSA_EAY_PUBLIC_ENCRYPT"},
-{ERR_FUNC(RSA_F_RSA_GENERATE_KEY),     "RSA_generate_key"},
+{ERR_FUNC(RSA_F_RSA_MEMORY_LOCK),      "RSA_memory_lock"},
 {ERR_FUNC(RSA_F_RSA_NEW_METHOD),       "RSA_new_method"},
 {ERR_FUNC(RSA_F_RSA_NULL),     "RSA_NULL"},
+{ERR_FUNC(RSA_F_RSA_NULL_MOD_EXP),     "RSA_NULL_MOD_EXP"},
+{ERR_FUNC(RSA_F_RSA_NULL_PRIVATE_DECRYPT),     "RSA_NULL_PRIVATE_DECRYPT"},
+{ERR_FUNC(RSA_F_RSA_NULL_PRIVATE_ENCRYPT),     "RSA_NULL_PRIVATE_ENCRYPT"},
+{ERR_FUNC(RSA_F_RSA_NULL_PUBLIC_DECRYPT),      "RSA_NULL_PUBLIC_DECRYPT"},
+{ERR_FUNC(RSA_F_RSA_NULL_PUBLIC_ENCRYPT),      "RSA_NULL_PUBLIC_ENCRYPT"},
 {ERR_FUNC(RSA_F_RSA_PADDING_ADD_NONE), "RSA_padding_add_none"},
 {ERR_FUNC(RSA_F_RSA_PADDING_ADD_PKCS1_OAEP),   "RSA_padding_add_PKCS1_OAEP"},
 {ERR_FUNC(RSA_F_RSA_PADDING_ADD_PKCS1_TYPE_1), "RSA_padding_add_PKCS1_type_1"},
index 8e3a582..383d609 100644 (file)
@@ -139,7 +139,7 @@ static int rsa_builtin_keygen(RSA *rsa, int bits, BIGNUM *e_value, BN_GENCB *cb)
                if(degenerate == 3)
                        {
                        ok = 0; /* we set our own err */
-                       RSAerr(RSA_F_RSA_GENERATE_KEY,RSA_R_KEY_SIZE_TOO_SMALL);
+                       RSAerr(RSA_F_RSA_BUILTIN_KEYGEN,RSA_R_KEY_SIZE_TOO_SMALL);
                        goto err;
                        }
                if (!BN_sub(r2,rsa->q,BN_value_one())) goto err;
@@ -180,7 +180,7 @@ static int rsa_builtin_keygen(RSA *rsa, int bits, BIGNUM *e_value, BN_GENCB *cb)
 err:
        if (ok == -1)
                {
-               RSAerr(RSA_F_RSA_GENERATE_KEY,ERR_LIB_BN);
+               RSAerr(RSA_F_RSA_BUILTIN_KEYGEN,ERR_LIB_BN);
                ok=0;
                }
        BN_CTX_end(ctx);
index 0447fd5..7f1f94e 100644 (file)
@@ -432,7 +432,7 @@ int RSA_memory_lock(RSA *r)
                j+= (*t[i])->top;
        if ((p=OPENSSL_malloc_locked((off+j)*sizeof(BN_ULONG))) == NULL)
                {
-               RSAerr(RSA_F_MEMORY_LOCK,ERR_R_MALLOC_FAILURE);
+               RSAerr(RSA_F_RSA_MEMORY_LOCK,ERR_R_MALLOC_FAILURE);
                return(0);
                }
        bn=(BIGNUM *)p;
index 1bf70ca..491572c 100644 (file)
@@ -107,35 +107,35 @@ const RSA_METHOD *RSA_null_method(void)
 static int RSA_null_public_encrypt(int flen, const unsigned char *from,
             unsigned char *to, RSA *rsa, int padding)
        {
-       RSAerr(RSA_F_RSA_NULL, RSA_R_RSA_OPERATIONS_NOT_SUPPORTED);
+       RSAerr(RSA_F_RSA_NULL_PUBLIC_ENCRYPT, RSA_R_RSA_OPERATIONS_NOT_SUPPORTED);
        return -1;
        }
 
 static int RSA_null_private_encrypt(int flen, const unsigned char *from,
             unsigned char *to, RSA *rsa, int padding)
        {
-       RSAerr(RSA_F_RSA_NULL, RSA_R_RSA_OPERATIONS_NOT_SUPPORTED);
+       RSAerr(RSA_F_RSA_NULL_PRIVATE_ENCRYPT, RSA_R_RSA_OPERATIONS_NOT_SUPPORTED);
        return -1;
        }
 
 static int RSA_null_private_decrypt(int flen, const unsigned char *from,
             unsigned char *to, RSA *rsa, int padding)
        {
-       RSAerr(RSA_F_RSA_NULL, RSA_R_RSA_OPERATIONS_NOT_SUPPORTED);
+       RSAerr(RSA_F_RSA_NULL_PRIVATE_DECRYPT, RSA_R_RSA_OPERATIONS_NOT_SUPPORTED);
        return -1;
        }
 
 static int RSA_null_public_decrypt(int flen, const unsigned char *from,
             unsigned char *to, RSA *rsa, int padding)
        {
-       RSAerr(RSA_F_RSA_NULL, RSA_R_RSA_OPERATIONS_NOT_SUPPORTED);
+       RSAerr(RSA_F_RSA_NULL_PUBLIC_DECRYPT, RSA_R_RSA_OPERATIONS_NOT_SUPPORTED);
        return -1;
        }
 
 #if 0 /* not currently used */
 static int RSA_null_mod_exp(BIGNUM *r0, BIGNUM *I, RSA *rsa)
        {
-       RSAerr(RSA_F_RSA_NULL, RSA_R_RSA_OPERATIONS_NOT_SUPPORTED);
+       ...err(RSA_F_RSA_NULL_MOD_EXP, RSA_R_RSA_OPERATIONS_NOT_SUPPORTED);
        return -1;
        }
 #endif
@@ -149,5 +149,3 @@ static int RSA_null_finish(RSA *rsa)
        {
        return(1);
        }
-
-
index e3f7c60..66d33e5 100644 (file)
@@ -122,7 +122,7 @@ int RSA_padding_check_PKCS1_OAEP(unsigned char *to, int tlen,
        db = OPENSSL_malloc(dblen);
        if (db == NULL)
                {
-               RSAerr(RSA_F_RSA_PADDING_ADD_PKCS1_OAEP, ERR_R_MALLOC_FAILURE);
+               RSAerr(RSA_F_RSA_PADDING_CHECK_PKCS1_OAEP, ERR_R_MALLOC_FAILURE);
                return -1;
                }
 
index b2e7e19..6458337 100644 (file)
@@ -427,13 +427,13 @@ void ERR_load_STORE_strings(void);
 /* Error codes for the STORE functions. */
 
 /* Function codes. */
-#define STORE_F_CTRL                                    160
 #define STORE_F_MEM_DELETE                              134
 #define STORE_F_MEM_GENERATE                            135
+#define STORE_F_MEM_LIST_END                            168
 #define STORE_F_MEM_LIST_NEXT                           136
 #define STORE_F_MEM_LIST_START                          137
+#define STORE_F_MEM_MODIFY                              169
 #define STORE_F_MEM_STORE                               138
-#define STORE_F_STORE_ARBITRARY                                 157
 #define STORE_F_STORE_ATTR_INFO_GET0_CSTR               139
 #define STORE_F_STORE_ATTR_INFO_GET0_DN                         140
 #define STORE_F_STORE_ATTR_INFO_GET0_NUMBER             141
@@ -446,8 +446,7 @@ void ERR_load_STORE_strings(void);
 #define STORE_F_STORE_ATTR_INFO_SET_DN                  148
 #define STORE_F_STORE_ATTR_INFO_SET_NUMBER              149
 #define STORE_F_STORE_ATTR_INFO_SET_SHA1STR             150
-#define STORE_F_STORE_CERTIFICATE                       100
-#define STORE_F_STORE_CRL                               101
+#define STORE_F_STORE_CERTIFICATE                       170
 #define STORE_F_STORE_CTRL                              161
 #define STORE_F_STORE_DELETE_ARBITRARY                  158
 #define STORE_F_STORE_DELETE_CERTIFICATE                102
@@ -487,14 +486,19 @@ void ERR_load_STORE_strings(void);
 #define STORE_F_STORE_MODIFY_PUBLIC_KEY                         167
 #define STORE_F_STORE_NEW_ENGINE                        133
 #define STORE_F_STORE_NEW_METHOD                        132
-#define STORE_F_STORE_NUMBER                            126
 #define STORE_F_STORE_PARSE_ATTRS_END                   151
+#define STORE_F_STORE_PARSE_ATTRS_ENDP                  172
 #define STORE_F_STORE_PARSE_ATTRS_NEXT                  152
-#define STORE_F_STORE_PRIVATE_KEY                       127
-#define STORE_F_STORE_PUBLIC_KEY                        128
+#define STORE_F_STORE_PARSE_ATTRS_START                         171
 #define STORE_F_STORE_REVOKE_CERTIFICATE                129
 #define STORE_F_STORE_REVOKE_PRIVATE_KEY                130
 #define STORE_F_STORE_REVOKE_PUBLIC_KEY                         131
+#define STORE_F_STORE_STORE_ARBITRARY                   157
+#define STORE_F_STORE_STORE_CERTIFICATE                         100
+#define STORE_F_STORE_STORE_CRL                                 101
+#define STORE_F_STORE_STORE_NUMBER                      126
+#define STORE_F_STORE_STORE_PRIVATE_KEY                         127
+#define STORE_F_STORE_STORE_PUBLIC_KEY                  128
 
 /* Reason codes. */
 #define STORE_R_ALREADY_HAS_A_VALUE                     127
index 6672792..5c6fe83 100644 (file)
 
 static ERR_STRING_DATA STORE_str_functs[]=
        {
-{ERR_FUNC(STORE_F_CTRL),       "CTRL"},
 {ERR_FUNC(STORE_F_MEM_DELETE), "MEM_DELETE"},
 {ERR_FUNC(STORE_F_MEM_GENERATE),       "MEM_GENERATE"},
+{ERR_FUNC(STORE_F_MEM_LIST_END),       "MEM_LIST_END"},
 {ERR_FUNC(STORE_F_MEM_LIST_NEXT),      "MEM_LIST_NEXT"},
 {ERR_FUNC(STORE_F_MEM_LIST_START),     "MEM_LIST_START"},
+{ERR_FUNC(STORE_F_MEM_MODIFY), "MEM_MODIFY"},
 {ERR_FUNC(STORE_F_MEM_STORE),  "MEM_STORE"},
-{ERR_FUNC(STORE_F_STORE_ARBITRARY),    "STORE_ARBITRARY"},
 {ERR_FUNC(STORE_F_STORE_ATTR_INFO_GET0_CSTR),  "STORE_ATTR_INFO_get0_cstr"},
 {ERR_FUNC(STORE_F_STORE_ATTR_INFO_GET0_DN),    "STORE_ATTR_INFO_get0_dn"},
 {ERR_FUNC(STORE_F_STORE_ATTR_INFO_GET0_NUMBER),        "STORE_ATTR_INFO_get0_number"},
@@ -90,7 +90,6 @@ static ERR_STRING_DATA STORE_str_functs[]=
 {ERR_FUNC(STORE_F_STORE_ATTR_INFO_SET_NUMBER), "STORE_ATTR_INFO_set_number"},
 {ERR_FUNC(STORE_F_STORE_ATTR_INFO_SET_SHA1STR),        "STORE_ATTR_INFO_set_sha1str"},
 {ERR_FUNC(STORE_F_STORE_CERTIFICATE),  "STORE_CERTIFICATE"},
-{ERR_FUNC(STORE_F_STORE_CRL),  "STORE_CRL"},
 {ERR_FUNC(STORE_F_STORE_CTRL), "STORE_ctrl"},
 {ERR_FUNC(STORE_F_STORE_DELETE_ARBITRARY),     "STORE_delete_arbitrary"},
 {ERR_FUNC(STORE_F_STORE_DELETE_CERTIFICATE),   "STORE_delete_certificate"},
@@ -130,14 +129,19 @@ static ERR_STRING_DATA STORE_str_functs[]=
 {ERR_FUNC(STORE_F_STORE_MODIFY_PUBLIC_KEY),    "STORE_modify_public_key"},
 {ERR_FUNC(STORE_F_STORE_NEW_ENGINE),   "STORE_new_engine"},
 {ERR_FUNC(STORE_F_STORE_NEW_METHOD),   "STORE_new_method"},
-{ERR_FUNC(STORE_F_STORE_NUMBER),       "STORE_NUMBER"},
 {ERR_FUNC(STORE_F_STORE_PARSE_ATTRS_END),      "STORE_parse_attrs_end"},
+{ERR_FUNC(STORE_F_STORE_PARSE_ATTRS_ENDP),     "STORE_parse_attrs_endp"},
 {ERR_FUNC(STORE_F_STORE_PARSE_ATTRS_NEXT),     "STORE_parse_attrs_next"},
-{ERR_FUNC(STORE_F_STORE_PRIVATE_KEY),  "STORE_PRIVATE_KEY"},
-{ERR_FUNC(STORE_F_STORE_PUBLIC_KEY),   "STORE_PUBLIC_KEY"},
+{ERR_FUNC(STORE_F_STORE_PARSE_ATTRS_START),    "STORE_parse_attrs_start"},
 {ERR_FUNC(STORE_F_STORE_REVOKE_CERTIFICATE),   "STORE_revoke_certificate"},
 {ERR_FUNC(STORE_F_STORE_REVOKE_PRIVATE_KEY),   "STORE_revoke_private_key"},
 {ERR_FUNC(STORE_F_STORE_REVOKE_PUBLIC_KEY),    "STORE_revoke_public_key"},
+{ERR_FUNC(STORE_F_STORE_STORE_ARBITRARY),      "STORE_store_arbitrary"},
+{ERR_FUNC(STORE_F_STORE_STORE_CERTIFICATE),    "STORE_store_certificate"},
+{ERR_FUNC(STORE_F_STORE_STORE_CRL),    "STORE_store_crl"},
+{ERR_FUNC(STORE_F_STORE_STORE_NUMBER), "STORE_store_number"},
+{ERR_FUNC(STORE_F_STORE_STORE_PRIVATE_KEY),    "STORE_store_private_key"},
+{ERR_FUNC(STORE_F_STORE_STORE_PUBLIC_KEY),     "STORE_store_public_key"},
 {0,NULL}
        };
 
index 7e59ee1..9a66d6d 100644 (file)
@@ -190,7 +190,7 @@ int STORE_ctrl(STORE *store, int cmd, long i, void *p, void (*f)(void))
        {
        if (store == NULL)
                {
-               STOREerr(STORE_F_CTRL,ERR_R_PASSED_NULL_PARAMETER);
+               STOREerr(STORE_F_STORE_CTRL,ERR_R_PASSED_NULL_PARAMETER);
                return 0;
                }
        if (store->meth->ctrl)
@@ -287,7 +287,7 @@ int STORE_store_certificate(STORE *s, X509 *data, OPENSSL_ITEM attributes[],
        object = STORE_OBJECT_new();
        if (!object)
                {
-               STOREerr(STORE_F_STORE_CERTIFICATE,
+               STOREerr(STORE_F_STORE_STORE_CERTIFICATE,
                        ERR_R_MALLOC_FAILURE);
                return 0;
                }
@@ -305,7 +305,7 @@ int STORE_store_certificate(STORE *s, X509 *data, OPENSSL_ITEM attributes[],
 
        if (!i)
                {
-               STOREerr(STORE_F_STORE_CERTIFICATE,
+               STOREerr(STORE_F_STORE_STORE_CERTIFICATE,
                        STORE_R_FAILED_STORING_CERTIFICATE);
                return 0;
                }
@@ -491,20 +491,20 @@ int STORE_store_private_key(STORE *s, EVP_PKEY *data, OPENSSL_ITEM attributes[],
        STORE_OBJECT *object;
        int i;
 
-       check_store(s,STORE_F_STORE_PRIVATE_KEY,
+       check_store(s,STORE_F_STORE_STORE_PRIVATE_KEY,
                store_object,STORE_R_NO_STORE_OBJECT_FUNCTION);
 
        object = STORE_OBJECT_new();
        if (!object)
                {
-               STOREerr(STORE_F_STORE_PRIVATE_KEY,
+               STOREerr(STORE_F_STORE_STORE_PRIVATE_KEY,
                        ERR_R_MALLOC_FAILURE);
                return 0;
                }
        object->data.key = EVP_PKEY_new();
        if (!object->data.key)
                {
-               STOREerr(STORE_F_STORE_PRIVATE_KEY,
+               STOREerr(STORE_F_STORE_STORE_PRIVATE_KEY,
                        ERR_R_MALLOC_FAILURE);
                return 0;
                }
@@ -522,7 +522,7 @@ int STORE_store_private_key(STORE *s, EVP_PKEY *data, OPENSSL_ITEM attributes[],
 
        if (!i)
                {
-               STOREerr(STORE_F_STORE_PRIVATE_KEY,
+               STOREerr(STORE_F_STORE_STORE_PRIVATE_KEY,
                        STORE_R_FAILED_STORING_KEY);
                return 0;
                }
@@ -686,20 +686,20 @@ int STORE_store_public_key(STORE *s, EVP_PKEY *data, OPENSSL_ITEM attributes[],
        STORE_OBJECT *object;
        int i;
 
-       check_store(s,STORE_F_STORE_PUBLIC_KEY,
+       check_store(s,STORE_F_STORE_STORE_PUBLIC_KEY,
                store_object,STORE_R_NO_STORE_OBJECT_FUNCTION);
 
        object = STORE_OBJECT_new();
        if (!object)
                {
-               STOREerr(STORE_F_STORE_PUBLIC_KEY,
+               STOREerr(STORE_F_STORE_STORE_PUBLIC_KEY,
                        ERR_R_MALLOC_FAILURE);
                return 0;
                }
        object->data.key = EVP_PKEY_new();
        if (!object->data.key)
                {
-               STOREerr(STORE_F_STORE_PUBLIC_KEY,
+               STOREerr(STORE_F_STORE_STORE_PUBLIC_KEY,
                        ERR_R_MALLOC_FAILURE);
                return 0;
                }
@@ -717,7 +717,7 @@ int STORE_store_public_key(STORE *s, EVP_PKEY *data, OPENSSL_ITEM attributes[],
 
        if (!i)
                {
-               STOREerr(STORE_F_STORE_PUBLIC_KEY,
+               STOREerr(STORE_F_STORE_STORE_PUBLIC_KEY,
                        STORE_R_FAILED_STORING_KEY);
                return 0;
                }
@@ -907,13 +907,13 @@ int STORE_store_crl(STORE *s, X509_CRL *data, OPENSSL_ITEM attributes[],
        STORE_OBJECT *object;
        int i;
 
-       check_store(s,STORE_F_STORE_CRL,
+       check_store(s,STORE_F_STORE_STORE_CRL,
                store_object,STORE_R_NO_STORE_OBJECT_FUNCTION);
 
        object = STORE_OBJECT_new();
        if (!object)
                {
-               STOREerr(STORE_F_STORE_CRL,
+               STOREerr(STORE_F_STORE_STORE_CRL,
                        ERR_R_MALLOC_FAILURE);
                return 0;
                }
@@ -931,7 +931,7 @@ int STORE_store_crl(STORE *s, X509_CRL *data, OPENSSL_ITEM attributes[],
 
        if (!i)
                {
-               STOREerr(STORE_F_STORE_CRL,
+               STOREerr(STORE_F_STORE_STORE_CRL,
                        STORE_R_FAILED_STORING_KEY);
                return 0;
                }
@@ -1049,13 +1049,13 @@ int STORE_store_number(STORE *s, BIGNUM *data, OPENSSL_ITEM attributes[],
        STORE_OBJECT *object;
        int i;
 
-       check_store(s,STORE_F_STORE_NUMBER,
+       check_store(s,STORE_F_STORE_STORE_NUMBER,
                store_object,STORE_R_NO_STORE_OBJECT_NUMBER_FUNCTION);
 
        object = STORE_OBJECT_new();
        if (!object)
                {
-               STOREerr(STORE_F_STORE_NUMBER,
+               STOREerr(STORE_F_STORE_STORE_NUMBER,
                        ERR_R_MALLOC_FAILURE);
                return 0;
                }
@@ -1069,7 +1069,7 @@ int STORE_store_number(STORE *s, BIGNUM *data, OPENSSL_ITEM attributes[],
 
        if (!i)
                {
-               STOREerr(STORE_F_STORE_NUMBER,
+               STOREerr(STORE_F_STORE_STORE_NUMBER,
                        STORE_R_FAILED_STORING_NUMBER);
                return 0;
                }
@@ -1139,13 +1139,13 @@ int STORE_store_arbitrary(STORE *s, BUF_MEM *data, OPENSSL_ITEM attributes[],
        STORE_OBJECT *object;
        int i;
 
-       check_store(s,STORE_F_STORE_ARBITRARY,
+       check_store(s,STORE_F_STORE_STORE_ARBITRARY,
                store_object,STORE_R_NO_STORE_OBJECT_ARBITRARY_FUNCTION);
 
        object = STORE_OBJECT_new();
        if (!object)
                {
-               STOREerr(STORE_F_STORE_ARBITRARY,
+               STOREerr(STORE_F_STORE_STORE_ARBITRARY,
                        ERR_R_MALLOC_FAILURE);
                return 0;
                }
@@ -1159,7 +1159,7 @@ int STORE_store_arbitrary(STORE *s, BUF_MEM *data, OPENSSL_ITEM attributes[],
 
        if (!i)
                {
-               STOREerr(STORE_F_STORE_ARBITRARY,
+               STOREerr(STORE_F_STORE_STORE_ARBITRARY,
                        STORE_R_FAILED_STORING_ARBITRARY);
                return 0;
                }
@@ -1414,7 +1414,7 @@ int STORE_ATTR_INFO_set_sha1str(STORE_ATTR_INFO *attrs, STORE_ATTR_TYPES code,
                            (unsigned char *)BUF_memdup(sha1str,
                                    sha1str_size)))
                        return 1;
-               STOREerr(STORE_F_STORE_ATTR_INFO_SET_CSTR,
+               STOREerr(STORE_F_STORE_ATTR_INFO_SET_SHA1STR,
                        ERR_R_MALLOC_FAILURE);
                return 0;
                }
@@ -1434,7 +1434,7 @@ int STORE_ATTR_INFO_set_dn(STORE_ATTR_INFO *attrs, STORE_ATTR_TYPES code,
                {
                if ((attrs->values[code].dn = X509_NAME_dup(dn)))
                        return 1;
-               STOREerr(STORE_F_STORE_ATTR_INFO_SET_CSTR,
+               STOREerr(STORE_F_STORE_ATTR_INFO_SET_DN,
                        ERR_R_MALLOC_FAILURE);
                return 0;
                }
@@ -1454,7 +1454,7 @@ int STORE_ATTR_INFO_set_number(STORE_ATTR_INFO *attrs, STORE_ATTR_TYPES code,
                {
                if ((attrs->values[code].number = BN_dup(number)))
                        return 1;
-               STOREerr(STORE_F_STORE_ATTR_INFO_SET_CSTR,
+               STOREerr(STORE_F_STORE_ATTR_INFO_SET_NUMBER,
                        ERR_R_MALLOC_FAILURE);
                return 0;
                }
@@ -1543,11 +1543,11 @@ void *STORE_parse_attrs_start(OPENSSL_ITEM *attributes)
                if (context)
                        context->attributes = attributes;
                else
-                       STOREerr(STORE_F_STORE_PARSE_ATTRS_END,
+                       STOREerr(STORE_F_STORE_PARSE_ATTRS_START,
                                ERR_R_MALLOC_FAILURE);
                return context;
                }
-       STOREerr(STORE_F_STORE_PARSE_ATTRS_END, ERR_R_PASSED_NULL_PARAMETER);
+       STOREerr(STORE_F_STORE_PARSE_ATTRS_START, ERR_R_PASSED_NULL_PARAMETER);
        return 0;
        }
 STORE_ATTR_INFO *STORE_parse_attrs_next(void *handle)
@@ -1663,7 +1663,7 @@ int STORE_parse_attrs_endp(void *handle)
                {
                return context->attributes->code == STORE_ATTR_END;
                }
-       STOREerr(STORE_F_STORE_PARSE_ATTRS_END, ERR_R_PASSED_NULL_PARAMETER);
+       STOREerr(STORE_F_STORE_PARSE_ATTRS_ENDP, ERR_R_PASSED_NULL_PARAMETER);
        return 0;
        }
 
index 77603e1..527757a 100644 (file)
@@ -196,7 +196,7 @@ static int mem_modify(STORE *s, STORE_OBJECT_TYPES type,
        OPENSSL_ITEM modify_attributes[], OPENSSL_ITEM delete_attributes[],
        OPENSSL_ITEM parameters[])
        {
-       STOREerr(STORE_F_MEM_STORE, STORE_R_NOT_IMPLEMENTED);
+       STOREerr(STORE_F_MEM_MODIFY, STORE_R_NOT_IMPLEMENTED);
        return 0;
        }
 static int mem_delete(STORE *s, STORE_OBJECT_TYPES type,
@@ -324,7 +324,7 @@ static int mem_list_end(STORE *s, void *handle)
 
        if (!context)
                {
-               STOREerr(STORE_F_MEM_LIST_NEXT, ERR_R_PASSED_NULL_PARAMETER);
+               STOREerr(STORE_F_MEM_LIST_END, ERR_R_PASSED_NULL_PARAMETER);
                return 0;
                }
        if (context && context->search_attributes)
index 56e6eca..73c1686 100644 (file)
@@ -1247,18 +1247,20 @@ void ERR_load_X509_strings(void);
 /* Function codes. */
 #define X509_F_ADD_CERT_DIR                             100
 #define X509_F_BY_FILE_CTRL                             101
+#define X509_F_CHECK_POLICY                             145
 #define X509_F_DIR_CTRL                                         102
 #define X509_F_GET_CERT_BY_SUBJECT                      103
 #define X509_F_NETSCAPE_SPKI_B64_DECODE                         129
 #define X509_F_NETSCAPE_SPKI_B64_ENCODE                         130
+#define X509_F_X509AT_ADD1_ATTR                                 135
 #define X509_F_X509V3_ADD_EXT                           104
-#define X509_F_X509_ADD_ATTR                            135
 #define X509_F_X509_ATTRIBUTE_CREATE_BY_NID             136
 #define X509_F_X509_ATTRIBUTE_CREATE_BY_OBJ             137
 #define X509_F_X509_ATTRIBUTE_CREATE_BY_TXT             140
 #define X509_F_X509_ATTRIBUTE_GET0_DATA                         139
 #define X509_F_X509_ATTRIBUTE_SET1_DATA                         138
 #define X509_F_X509_CHECK_PRIVATE_KEY                   128
+#define X509_F_X509_CRL_PRINT_FP                        147
 #define X509_F_X509_EXTENSION_CREATE_BY_NID             108
 #define X509_F_X509_EXTENSION_CREATE_BY_OBJ             109
 #define X509_F_X509_GET_PUBKEY_PARAMETERS               110
@@ -1271,15 +1273,16 @@ void ERR_load_X509_strings(void);
 #define X509_F_X509_NAME_ENTRY_SET_OBJECT               115
 #define X509_F_X509_NAME_ONELINE                        116
 #define X509_F_X509_NAME_PRINT                          117
-#define X509_F_X509_PRINT_FP                            118
+#define X509_F_X509_PRINT_EX_FP                                 118
 #define X509_F_X509_PUBKEY_GET                          119
 #define X509_F_X509_PUBKEY_SET                          120
 #define X509_F_X509_REQ_CHECK_PRIVATE_KEY               144
-#define X509_F_X509_REQ_PRINT                           121
+#define X509_F_X509_REQ_PRINT_EX                        121
 #define X509_F_X509_REQ_PRINT_FP                        122
 #define X509_F_X509_REQ_TO_X509                                 123
 #define X509_F_X509_STORE_ADD_CERT                      124
 #define X509_F_X509_STORE_ADD_CRL                       125
+#define X509_F_X509_STORE_CTX_GET1_ISSUER               146
 #define X509_F_X509_STORE_CTX_INIT                      143
 #define X509_F_X509_STORE_CTX_NEW                       142
 #define X509_F_X509_STORE_CTX_PURPOSE_INHERIT           134
index 0bae3d3..bd1fdec 100644 (file)
@@ -141,7 +141,7 @@ STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr(STACK_OF(X509_ATTRIBUTE) **x,
                *x=sk;
        return(sk);
 err:
-       X509err(X509_F_X509_ADD_ATTR,ERR_R_MALLOC_FAILURE);
+       X509err(X509_F_X509AT_ADD1_ATTR,ERR_R_MALLOC_FAILURE);
 err2:
        if (new_attr != NULL) X509_ATTRIBUTE_free(new_attr);
        if (sk != NULL) sk_X509_ATTRIBUTE_free(sk);
index 7e6eca7..b7bc383 100644 (file)
@@ -72,18 +72,20 @@ static ERR_STRING_DATA X509_str_functs[]=
        {
 {ERR_FUNC(X509_F_ADD_CERT_DIR),        "ADD_CERT_DIR"},
 {ERR_FUNC(X509_F_BY_FILE_CTRL),        "BY_FILE_CTRL"},
+{ERR_FUNC(X509_F_CHECK_POLICY),        "CHECK_POLICY"},
 {ERR_FUNC(X509_F_DIR_CTRL),    "DIR_CTRL"},
 {ERR_FUNC(X509_F_GET_CERT_BY_SUBJECT), "GET_CERT_BY_SUBJECT"},
 {ERR_FUNC(X509_F_NETSCAPE_SPKI_B64_DECODE),    "NETSCAPE_SPKI_b64_decode"},
 {ERR_FUNC(X509_F_NETSCAPE_SPKI_B64_ENCODE),    "NETSCAPE_SPKI_b64_encode"},
+{ERR_FUNC(X509_F_X509AT_ADD1_ATTR),    "X509at_add1_attr"},
 {ERR_FUNC(X509_F_X509V3_ADD_EXT),      "X509v3_add_ext"},
-{ERR_FUNC(X509_F_X509_ADD_ATTR),       "X509_ADD_ATTR"},
 {ERR_FUNC(X509_F_X509_ATTRIBUTE_CREATE_BY_NID),        "X509_ATTRIBUTE_create_by_NID"},
 {ERR_FUNC(X509_F_X509_ATTRIBUTE_CREATE_BY_OBJ),        "X509_ATTRIBUTE_create_by_OBJ"},
 {ERR_FUNC(X509_F_X509_ATTRIBUTE_CREATE_BY_TXT),        "X509_ATTRIBUTE_create_by_txt"},
 {ERR_FUNC(X509_F_X509_ATTRIBUTE_GET0_DATA),    "X509_ATTRIBUTE_get0_data"},
 {ERR_FUNC(X509_F_X509_ATTRIBUTE_SET1_DATA),    "X509_ATTRIBUTE_set1_data"},
 {ERR_FUNC(X509_F_X509_CHECK_PRIVATE_KEY),      "X509_check_private_key"},
+{ERR_FUNC(X509_F_X509_CRL_PRINT_FP),   "X509_CRL_print_fp"},
 {ERR_FUNC(X509_F_X509_EXTENSION_CREATE_BY_NID),        "X509_EXTENSION_create_by_NID"},
 {ERR_FUNC(X509_F_X509_EXTENSION_CREATE_BY_OBJ),        "X509_EXTENSION_create_by_OBJ"},
 {ERR_FUNC(X509_F_X509_GET_PUBKEY_PARAMETERS),  "X509_get_pubkey_parameters"},
@@ -96,15 +98,16 @@ static ERR_STRING_DATA X509_str_functs[]=
 {ERR_FUNC(X509_F_X509_NAME_ENTRY_SET_OBJECT),  "X509_NAME_ENTRY_set_object"},
 {ERR_FUNC(X509_F_X509_NAME_ONELINE),   "X509_NAME_oneline"},
 {ERR_FUNC(X509_F_X509_NAME_PRINT),     "X509_NAME_print"},
-{ERR_FUNC(X509_F_X509_PRINT_FP),       "X509_print_fp"},
+{ERR_FUNC(X509_F_X509_PRINT_EX_FP),    "X509_print_ex_fp"},
 {ERR_FUNC(X509_F_X509_PUBKEY_GET),     "X509_PUBKEY_get"},
 {ERR_FUNC(X509_F_X509_PUBKEY_SET),     "X509_PUBKEY_set"},
 {ERR_FUNC(X509_F_X509_REQ_CHECK_PRIVATE_KEY),  "X509_REQ_check_private_key"},
-{ERR_FUNC(X509_F_X509_REQ_PRINT),      "X509_REQ_print"},
+{ERR_FUNC(X509_F_X509_REQ_PRINT_EX),   "X509_REQ_print_ex"},
 {ERR_FUNC(X509_F_X509_REQ_PRINT_FP),   "X509_REQ_print_fp"},
 {ERR_FUNC(X509_F_X509_REQ_TO_X509),    "X509_REQ_to_X509"},
 {ERR_FUNC(X509_F_X509_STORE_ADD_CERT), "X509_STORE_add_cert"},
 {ERR_FUNC(X509_F_X509_STORE_ADD_CRL),  "X509_STORE_add_crl"},
+{ERR_FUNC(X509_F_X509_STORE_CTX_GET1_ISSUER),  "X509_STORE_CTX_get1_issuer"},
 {ERR_FUNC(X509_F_X509_STORE_CTX_INIT), "X509_STORE_CTX_init"},
 {ERR_FUNC(X509_F_X509_STORE_CTX_NEW),  "X509_STORE_CTX_new"},
 {ERR_FUNC(X509_F_X509_STORE_CTX_PURPOSE_INHERIT),      "X509_STORE_CTX_purpose_inherit"},
index 8c7f22b..cd2cfb6 100644 (file)
@@ -497,7 +497,7 @@ int X509_STORE_CTX_get1_issuer(X509 **issuer, X509_STORE_CTX *ctx, X509 *x)
                if (ok == X509_LU_RETRY)
                        {
                        X509_OBJECT_free_contents(&obj);
-                       X509err(X509_F_X509_VERIFY_CERT,X509_R_SHOULD_RETRY);
+                       X509err(X509_F_X509_STORE_CTX_GET1_ISSUER,X509_R_SHOULD_RETRY);
                        return -1;
                        }
                else if (ok != X509_LU_FAIL)
index 9be7aca..637e2b6 100644 (file)
@@ -849,7 +849,7 @@ static int check_policy(X509_STORE_CTX *ctx)
                                ctx->param->policies, ctx->param->flags);
        if (ret == 0)
                {
-               X509err(X509_F_X509_VERIFY_CERT,ERR_R_MALLOC_FAILURE);
+               X509err(X509_F_CHECK_POLICY,ERR_R_MALLOC_FAILURE);
                return 0;
                }
        /* Invalid or inconsistent extensions */
index c29eff8..e3a19bf 100644 (file)
@@ -241,7 +241,7 @@ static GENERAL_NAMES *v2i_issuer_alt(X509V3_EXT_METHOD *method,
        CONF_VALUE *cnf;
        int i;
        if(!(gens = sk_GENERAL_NAME_new_null())) {
-               X509V3err(X509V3_F_V2I_GENERAL_NAMES,ERR_R_MALLOC_FAILURE);
+               X509V3err(X509V3_F_V2I_ISSUER_ALT,ERR_R_MALLOC_FAILURE);
                return NULL;
        }
        for(i = 0; i < sk_CONF_VALUE_num(nval); i++) {
@@ -306,7 +306,7 @@ static GENERAL_NAMES *v2i_subject_alt(X509V3_EXT_METHOD *method,
        CONF_VALUE *cnf;
        int i;
        if(!(gens = sk_GENERAL_NAME_new_null())) {
-               X509V3err(X509V3_F_V2I_GENERAL_NAMES,ERR_R_MALLOC_FAILURE);
+               X509V3err(X509V3_F_V2I_SUBJECT_ALT,ERR_R_MALLOC_FAILURE);
                return NULL;
        }
        for(i = 0; i < sk_CONF_VALUE_num(nval); i++) {
@@ -428,7 +428,7 @@ GENERAL_NAME *v2i_GENERAL_NAME_ex(GENERAL_NAME *out,
 
        if(!value)
                {
-               X509V3err(X509V3_F_V2I_GENERAL_NAME,X509V3_R_MISSING_VALUE);
+               X509V3err(X509V3_F_V2I_GENERAL_NAME_EX,X509V3_R_MISSING_VALUE);
                return NULL;
                }
 
@@ -439,7 +439,7 @@ GENERAL_NAME *v2i_GENERAL_NAME_ex(GENERAL_NAME *out,
                gen = GENERAL_NAME_new();
                if(gen == NULL)
                        {
-                       X509V3err(X509V3_F_V2I_GENERAL_NAME,ERR_R_MALLOC_FAILURE);
+                       X509V3err(X509V3_F_V2I_GENERAL_NAME_EX,ERR_R_MALLOC_FAILURE);
                        return NULL;
                        }
                }
@@ -464,7 +464,7 @@ GENERAL_NAME *v2i_GENERAL_NAME_ex(GENERAL_NAME *out,
                ASN1_OBJECT *obj;
                if(!(obj = OBJ_txt2obj(value,0)))
                        {
-                       X509V3err(X509V3_F_V2I_GENERAL_NAME,X509V3_R_BAD_OBJECT);
+                       X509V3err(X509V3_F_V2I_GENERAL_NAME_EX,X509V3_R_BAD_OBJECT);
                        ERR_add_error_data(2, "value=", value);
                        goto err;
                        }
@@ -479,7 +479,7 @@ GENERAL_NAME *v2i_GENERAL_NAME_ex(GENERAL_NAME *out,
                        gen->d.ip = a2i_IPADDRESS(value);
                if(gen->d.ip == NULL)
                        {
-                       X509V3err(X509V3_F_V2I_GENERAL_NAME,X509V3_R_BAD_IP_ADDRESS);
+                       X509V3err(X509V3_F_V2I_GENERAL_NAME_EX,X509V3_R_BAD_IP_ADDRESS);
                        ERR_add_error_data(2, "value=", value);
                        goto err;
                        }
@@ -490,7 +490,7 @@ GENERAL_NAME *v2i_GENERAL_NAME_ex(GENERAL_NAME *out,
                type = GEN_DIRNAME;
                if (!do_dirname(gen, value, ctx))
                        {
-                       X509V3err(X509V3_F_V2I_GENERAL_NAME,X509V3_R_DIRNAME_ERROR);
+                       X509V3err(X509V3_F_V2I_GENERAL_NAME_EX,X509V3_R_DIRNAME_ERROR);
                        goto err;
                        }
                }
@@ -498,14 +498,14 @@ GENERAL_NAME *v2i_GENERAL_NAME_ex(GENERAL_NAME *out,
                {
                if (!do_othername(gen, value, ctx))
                        {
-                       X509V3err(X509V3_F_V2I_GENERAL_NAME,X509V3_R_OTHERNAME_ERROR);
+                       X509V3err(X509V3_F_V2I_GENERAL_NAME_EX,X509V3_R_OTHERNAME_ERROR);
                        goto err;
                        }
                type = GEN_OTHERNAME;
                }
        else
                {
-               X509V3err(X509V3_F_V2I_GENERAL_NAME,X509V3_R_UNSUPPORTED_OPTION);
+               X509V3err(X509V3_F_V2I_GENERAL_NAME_EX,X509V3_R_UNSUPPORTED_OPTION);
                ERR_add_error_data(2, "name=", name);
                goto err;
                }
@@ -516,7 +516,7 @@ GENERAL_NAME *v2i_GENERAL_NAME_ex(GENERAL_NAME *out,
                              !ASN1_STRING_set(gen->d.ia5, (unsigned char*)value,
                                               strlen(value)))
                        {
-                       X509V3err(X509V3_F_V2I_GENERAL_NAME,ERR_R_MALLOC_FAILURE);
+                       X509V3err(X509V3_F_V2I_GENERAL_NAME_EX,ERR_R_MALLOC_FAILURE);
                        goto err;
                        }
                }
index 9a89e43..2b86730 100644 (file)
@@ -90,7 +90,7 @@ X509_EXTENSION *X509V3_EXT_nconf(CONF *conf, X509V3_CTX *ctx, char *name,
        ret = do_ext_nconf(conf, ctx, OBJ_sn2nid(name), crit, value);
        if (!ret)
                {
-               X509V3err(X509V3_F_X509V3_EXT_CONF,X509V3_R_ERROR_IN_EXTENSION);
+               X509V3err(X509V3_F_X509V3_EXT_NCONF,X509V3_R_ERROR_IN_EXTENSION);
                ERR_add_error_data(4,"name=", name, ", value=", value);
                }
        return ret;
@@ -121,12 +121,12 @@ static X509_EXTENSION *do_ext_nconf(CONF *conf, X509V3_CTX *ctx, int ext_nid,
        void *ext_struc;
        if (ext_nid == NID_undef)
                {
-               X509V3err(X509V3_F_DO_EXT_CONF,X509V3_R_UNKNOWN_EXTENSION_NAME);
+               X509V3err(X509V3_F_DO_EXT_NCONF,X509V3_R_UNKNOWN_EXTENSION_NAME);
                return NULL;
                }
        if (!(method = X509V3_EXT_get_nid(ext_nid)))
                {
-               X509V3err(X509V3_F_DO_EXT_CONF,X509V3_R_UNKNOWN_EXTENSION);
+               X509V3err(X509V3_F_DO_EXT_NCONF,X509V3_R_UNKNOWN_EXTENSION);
                return NULL;
                }
        /* Now get internal extension representation based on type */
@@ -136,7 +136,7 @@ static X509_EXTENSION *do_ext_nconf(CONF *conf, X509V3_CTX *ctx, int ext_nid,
                else nval = X509V3_parse_list(value);
                if(sk_CONF_VALUE_num(nval) <= 0)
                        {
-                       X509V3err(X509V3_F_X509V3_EXT_CONF,X509V3_R_INVALID_EXTENSION_STRING);
+                       X509V3err(X509V3_F_DO_EXT_NCONF,X509V3_R_INVALID_EXTENSION_STRING);
                        ERR_add_error_data(4, "name=", OBJ_nid2sn(ext_nid), ",section=", value);
                        return NULL;
                        }
@@ -153,14 +153,14 @@ static X509_EXTENSION *do_ext_nconf(CONF *conf, X509V3_CTX *ctx, int ext_nid,
                {
                if(!ctx->db || !ctx->db_meth)
                        {
-                       X509V3err(X509V3_F_X509V3_EXT_CONF,X509V3_R_NO_CONFIG_DATABASE);
+                       X509V3err(X509V3_F_DO_EXT_NCONF,X509V3_R_NO_CONFIG_DATABASE);
                        return NULL;
                        }
                if(!(ext_struc = method->r2i(method, ctx, value))) return NULL;
                }
        else
                {
-               X509V3err(X509V3_F_X509V3_EXT_CONF,X509V3_R_EXTENSION_SETTING_NOT_SUPPORTED);
+               X509V3err(X509V3_F_DO_EXT_NCONF,X509V3_R_EXTENSION_SETTING_NOT_SUPPORTED);
                ERR_add_error_data(2, "name=", OBJ_nid2sn(ext_nid));
                return NULL;
                }
index 62b34e1..9784b14 100644 (file)
@@ -341,7 +341,7 @@ static int nref_nos(STACK_OF(ASN1_INTEGER) *nnums, STACK_OF(CONF_VALUE) *nos)
        return 1;
 
        merr:
-       X509V3err(X509V3_F_NOTICE_SECTION,ERR_R_MALLOC_FAILURE);
+       X509V3err(X509V3_F_NREF_NOS,ERR_R_MALLOC_FAILURE);
 
        err:
        sk_ASN1_INTEGER_pop_free(nnums, ASN1_STRING_free);
index b1cfaba..58c1c2e 100644 (file)
@@ -122,7 +122,7 @@ static void *v2i_EXTENDED_KEY_USAGE(X509V3_EXT_METHOD *method,
        int i;
 
        if(!(extku = sk_ASN1_OBJECT_new_null())) {
-               X509V3err(X509V3_F_V2I_EXT_KU,ERR_R_MALLOC_FAILURE);
+               X509V3err(X509V3_F_V2I_EXTENDED_KEY_USAGE,ERR_R_MALLOC_FAILURE);
                return NULL;
        }
 
@@ -132,7 +132,7 @@ static void *v2i_EXTENDED_KEY_USAGE(X509V3_EXT_METHOD *method,
                else extval = val->name;
                if(!(objtmp = OBJ_txt2obj(extval, 0))) {
                        sk_ASN1_OBJECT_pop_free(extku, ASN1_OBJECT_free);
-                       X509V3err(X509V3_F_V2I_EXT_KU,X509V3_R_INVALID_OBJECT_IDENTIFIER);
+                       X509V3err(X509V3_F_V2I_EXTENDED_KEY_USAGE,X509V3_R_INVALID_OBJECT_IDENTIFIER);
                        X509V3_conf_err(val);
                        return NULL;
                }
index b46ff13..ab4f0ea 100644 (file)
@@ -141,19 +141,19 @@ static AUTHORITY_INFO_ACCESS *v2i_AUTHORITY_INFO_ACCESS(X509V3_EXT_METHOD *metho
        int i, objlen;
        char *objtmp, *ptmp;
        if(!(ainfo = sk_ACCESS_DESCRIPTION_new_null())) {
-               X509V3err(X509V3_F_V2I_ACCESS_DESCRIPTION,ERR_R_MALLOC_FAILURE);
+               X509V3err(X509V3_F_V2I_AUTHORITY_INFO_ACCESS,ERR_R_MALLOC_FAILURE);
                return NULL;
        }
        for(i = 0; i < sk_CONF_VALUE_num(nval); i++) {
                cnf = sk_CONF_VALUE_value(nval, i);
                if(!(acc = ACCESS_DESCRIPTION_new())
                        || !sk_ACCESS_DESCRIPTION_push(ainfo, acc)) {
-                       X509V3err(X509V3_F_V2I_ACCESS_DESCRIPTION,ERR_R_MALLOC_FAILURE);
+                       X509V3err(X509V3_F_V2I_AUTHORITY_INFO_ACCESS,ERR_R_MALLOC_FAILURE);
                        goto err;
                }
                ptmp = strchr(cnf->name, ';');
                if(!ptmp) {
-                       X509V3err(X509V3_F_V2I_ACCESS_DESCRIPTION,X509V3_R_INVALID_SYNTAX);
+                       X509V3err(X509V3_F_V2I_AUTHORITY_INFO_ACCESS,X509V3_R_INVALID_SYNTAX);
                        goto err;
                }
                objlen = ptmp - cnf->name;
@@ -162,14 +162,14 @@ static AUTHORITY_INFO_ACCESS *v2i_AUTHORITY_INFO_ACCESS(X509V3_EXT_METHOD *metho
                if(!v2i_GENERAL_NAME_ex(acc->location, method, ctx, &ctmp, 0))
                                                                 goto err; 
                if(!(objtmp = OPENSSL_malloc(objlen + 1))) {
-                       X509V3err(X509V3_F_V2I_ACCESS_DESCRIPTION,ERR_R_MALLOC_FAILURE);
+                       X509V3err(X509V3_F_V2I_AUTHORITY_INFO_ACCESS,ERR_R_MALLOC_FAILURE);
                        goto err;
                }
                strncpy(objtmp, cnf->name, objlen);
                objtmp[objlen] = 0;
                acc->method = OBJ_txt2obj(objtmp, 0);
                if(!acc->method) {
-                       X509V3err(X509V3_F_V2I_ACCESS_DESCRIPTION,X509V3_R_BAD_OBJECT);
+                       X509V3err(X509V3_F_V2I_AUTHORITY_INFO_ACCESS,X509V3_R_BAD_OBJECT);
                        ERR_add_error_data(2, "value=", objtmp);
                        OPENSSL_free(objtmp);
                        goto err;
index 04d99b3..f3015ea 100644 (file)
@@ -277,7 +277,7 @@ int X509V3_add1_i2d(STACK_OF(X509_EXTENSION) **x, int nid, void *value,
        ext = X509V3_EXT_i2d(nid, crit, value);
 
        if(!ext) {
-               X509V3err(X509V3_F_X509V3_ADD_I2D, X509V3_R_ERROR_CREATING_EXTENSION);
+               X509V3err(X509V3_F_X509V3_ADD1_I2D, X509V3_R_ERROR_CREATING_EXTENSION);
                return 0;
        }
 
@@ -296,7 +296,7 @@ int X509V3_add1_i2d(STACK_OF(X509_EXTENSION) **x, int nid, void *value,
 
        err:
        if(!(flags & X509V3_ADD_SILENT))
-               X509V3err(X509V3_F_X509V3_ADD_I2D, errcode);
+               X509V3err(X509V3_F_X509V3_ADD1_I2D, errcode);
        return 0;
 }
 
index b32d968..ccb0da5 100644 (file)
@@ -82,13 +82,13 @@ static int process_pci_value(CONF_VALUE *val,
                {
                if (*language)
                        {
-                       X509V3err(X509V3_F_R2I_PCI,X509V3_R_POLICY_LANGUAGE_ALREADTY_DEFINED);
+                       X509V3err(X509V3_F_PROCESS_PCI_VALUE,X509V3_R_POLICY_LANGUAGE_ALREADTY_DEFINED);
                        X509V3_conf_err(val);
                        return 0;
                        }
                if (!(*language = OBJ_txt2obj(val->value, 0)))
                        {
-                       X509V3err(X509V3_F_R2I_PCI,X509V3_R_INVALID_OBJECT_IDENTIFIER);
+                       X509V3err(X509V3_F_PROCESS_PCI_VALUE,X509V3_R_INVALID_OBJECT_IDENTIFIER);
                        X509V3_conf_err(val);
                        return 0;
                        }
@@ -97,13 +97,13 @@ static int process_pci_value(CONF_VALUE *val,
                {
                if (*pathlen)
                        {
-                       X509V3err(X509V3_F_R2I_PCI,X509V3_R_POLICY_PATH_LENGTH_ALREADTY_DEFINED);
+                       X509V3err(X509V3_F_PROCESS_PCI_VALUE,X509V3_R_POLICY_PATH_LENGTH_ALREADTY_DEFINED);
                        X509V3_conf_err(val);
                        return 0;
                        }
                if (!X509V3_get_value_int(val, pathlen))
                        {
-                       X509V3err(X509V3_F_R2I_PCI,X509V3_R_POLICY_PATH_LENGTH);
+                       X509V3err(X509V3_F_PROCESS_PCI_VALUE,X509V3_R_POLICY_PATH_LENGTH);
                        X509V3_conf_err(val);
                        return 0;
                        }
@@ -117,7 +117,7 @@ static int process_pci_value(CONF_VALUE *val,
                        *policy = ASN1_OCTET_STRING_new();
                        if (!*policy)
                                {
-                               X509V3err(X509V3_F_R2I_PCI,ERR_R_MALLOC_FAILURE);
+                               X509V3err(X509V3_F_PROCESS_PCI_VALUE,ERR_R_MALLOC_FAILURE);
                                X509V3_conf_err(val);
                                return 0;
                                }
@@ -148,7 +148,7 @@ static int process_pci_value(CONF_VALUE *val,
                        BIO *b = BIO_new_file(val->value + 5, "r");
                        if (!b)
                                {
-                               X509V3err(X509V3_F_R2I_PCI,ERR_R_BIO_LIB);
+                               X509V3err(X509V3_F_PROCESS_PCI_VALUE,ERR_R_BIO_LIB);
                                X509V3_conf_err(val);
                                goto err;
                                }
@@ -172,7 +172,7 @@ static int process_pci_value(CONF_VALUE *val,
 
                        if (n < 0)
                                {
-                               X509V3err(X509V3_F_R2I_PCI,ERR_R_BIO_LIB);
+                               X509V3err(X509V3_F_PROCESS_PCI_VALUE,ERR_R_BIO_LIB);
                                X509V3_conf_err(val);
                                goto err;
                                }
@@ -193,13 +193,13 @@ static int process_pci_value(CONF_VALUE *val,
                        }
                else
                        {
-                       X509V3err(X509V3_F_R2I_PCI,X509V3_R_INCORRECT_POLICY_SYNTAX_TAG);
+                       X509V3err(X509V3_F_PROCESS_PCI_VALUE,X509V3_R_INCORRECT_POLICY_SYNTAX_TAG);
                        X509V3_conf_err(val);
                        goto err;
                        }
                if (!tmp_data)
                        {
-                       X509V3err(X509V3_F_R2I_PCI,ERR_R_MALLOC_FAILURE);
+                       X509V3err(X509V3_F_PROCESS_PCI_VALUE,ERR_R_MALLOC_FAILURE);
                        X509V3_conf_err(val);
                        goto err;
                        }
index c0f044a..b17a72d 100644 (file)
@@ -109,14 +109,14 @@ static ASN1_OCTET_STRING *s2i_skey_id(X509V3_EXT_METHOD *method,
        if(strcmp(str, "hash")) return s2i_ASN1_OCTET_STRING(method, ctx, str);
 
        if(!(oct = M_ASN1_OCTET_STRING_new())) {
-               X509V3err(X509V3_F_S2I_S2I_SKEY_ID,ERR_R_MALLOC_FAILURE);
+               X509V3err(X509V3_F_S2I_SKEY_ID,ERR_R_MALLOC_FAILURE);
                return NULL;
        }
 
        if(ctx && (ctx->flags == CTX_TEST)) return oct;
 
        if(!ctx || (!ctx->subject_req && !ctx->subject_cert)) {
-               X509V3err(X509V3_F_S2I_ASN1_SKEY_ID,X509V3_R_NO_PUBLIC_KEY);
+               X509V3err(X509V3_F_S2I_SKEY_ID,X509V3_R_NO_PUBLIC_KEY);
                goto err;
        }
 
@@ -125,14 +125,14 @@ static ASN1_OCTET_STRING *s2i_skey_id(X509V3_EXT_METHOD *method,
        else pk = ctx->subject_cert->cert_info->key->public_key;
 
        if(!pk) {
-               X509V3err(X509V3_F_S2I_ASN1_SKEY_ID,X509V3_R_NO_PUBLIC_KEY);
+               X509V3err(X509V3_F_S2I_SKEY_ID,X509V3_R_NO_PUBLIC_KEY);
                goto err;
        }
 
        EVP_Digest(pk->data, pk->length, pkey_dig, &diglen, EVP_sha1(), NULL);
 
        if(!M_ASN1_OCTET_STRING_set(oct, pkey_dig, diglen)) {
-               X509V3err(X509V3_F_S2I_S2I_SKEY_ID,ERR_R_MALLOC_FAILURE);
+               X509V3err(X509V3_F_S2I_SKEY_ID,ERR_R_MALLOC_FAILURE);
                goto err;
        }
 
index 860909a..819e2e6 100644 (file)
@@ -154,7 +154,7 @@ int SXNET_add_id_asc(SXNET **psx, char *zone, char *user,
 {
        ASN1_INTEGER *izone = NULL;
        if(!(izone = s2i_ASN1_INTEGER(NULL, zone))) {
-               X509V3err(X509V3_F_SXNET_ADD_ASC,X509V3_R_ERROR_CONVERTING_ZONE);
+               X509V3err(X509V3_F_SXNET_ADD_ID_ASC,X509V3_R_ERROR_CONVERTING_ZONE);
                return 0;
        }
        return SXNET_add_id_INTEGER(psx, izone, user, userlen);
index 62b6acc..e96bd62 100644 (file)
@@ -75,6 +75,7 @@ static ERR_STRING_DATA X509V3_str_functs[]=
 {ERR_FUNC(X509V3_F_DO_DIRNAME),        "DO_DIRNAME"},
 {ERR_FUNC(X509V3_F_DO_EXT_CONF),       "DO_EXT_CONF"},
 {ERR_FUNC(X509V3_F_DO_EXT_I2D),        "DO_EXT_I2D"},
+{ERR_FUNC(X509V3_F_DO_EXT_NCONF),      "DO_EXT_NCONF"},
 {ERR_FUNC(X509V3_F_DO_I2V_NAME_CONSTRAINTS),   "DO_I2V_NAME_CONSTRAINTS"},
 {ERR_FUNC(X509V3_F_HEX_TO_STRING),     "hex_to_string"},
 {ERR_FUNC(X509V3_F_I2S_ASN1_ENUMERATED),       "i2s_ASN1_ENUMERATED"},
@@ -84,37 +85,41 @@ static ERR_STRING_DATA X509V3_str_functs[]=
 {ERR_FUNC(X509V3_F_NOTICE_SECTION),    "NOTICE_SECTION"},
 {ERR_FUNC(X509V3_F_NREF_NOS),  "NREF_NOS"},
 {ERR_FUNC(X509V3_F_POLICY_SECTION),    "POLICY_SECTION"},
+{ERR_FUNC(X509V3_F_PROCESS_PCI_VALUE), "PROCESS_PCI_VALUE"},
 {ERR_FUNC(X509V3_F_R2I_CERTPOL),       "R2I_CERTPOL"},
 {ERR_FUNC(X509V3_F_R2I_PCI),   "R2I_PCI"},
 {ERR_FUNC(X509V3_F_S2I_ASN1_IA5STRING),        "S2I_ASN1_IA5STRING"},
 {ERR_FUNC(X509V3_F_S2I_ASN1_INTEGER),  "s2i_ASN1_INTEGER"},
 {ERR_FUNC(X509V3_F_S2I_ASN1_OCTET_STRING),     "s2i_ASN1_OCTET_STRING"},
 {ERR_FUNC(X509V3_F_S2I_ASN1_SKEY_ID),  "S2I_ASN1_SKEY_ID"},
-{ERR_FUNC(X509V3_F_S2I_S2I_SKEY_ID),   "S2I_S2I_SKEY_ID"},
+{ERR_FUNC(X509V3_F_S2I_SKEY_ID),       "S2I_SKEY_ID"},
 {ERR_FUNC(X509V3_F_STRING_TO_HEX),     "string_to_hex"},
-{ERR_FUNC(X509V3_F_SXNET_ADD_ASC),     "SXNET_ADD_ASC"},
+{ERR_FUNC(X509V3_F_SXNET_ADD_ID_ASC),  "SXNET_add_id_asc"},
 {ERR_FUNC(X509V3_F_SXNET_ADD_ID_INTEGER),      "SXNET_add_id_INTEGER"},
 {ERR_FUNC(X509V3_F_SXNET_ADD_ID_ULONG),        "SXNET_add_id_ulong"},
 {ERR_FUNC(X509V3_F_SXNET_GET_ID_ASC),  "SXNET_get_id_asc"},
 {ERR_FUNC(X509V3_F_SXNET_GET_ID_ULONG),        "SXNET_get_id_ulong"},
-{ERR_FUNC(X509V3_F_V2I_ACCESS_DESCRIPTION),    "V2I_ACCESS_DESCRIPTION"},
 {ERR_FUNC(X509V3_F_V2I_ASN1_BIT_STRING),       "v2i_ASN1_BIT_STRING"},
+{ERR_FUNC(X509V3_F_V2I_AUTHORITY_INFO_ACCESS), "V2I_AUTHORITY_INFO_ACCESS"},
 {ERR_FUNC(X509V3_F_V2I_AUTHORITY_KEYID),       "V2I_AUTHORITY_KEYID"},
 {ERR_FUNC(X509V3_F_V2I_BASIC_CONSTRAINTS),     "V2I_BASIC_CONSTRAINTS"},
 {ERR_FUNC(X509V3_F_V2I_CRLD),  "V2I_CRLD"},
-{ERR_FUNC(X509V3_F_V2I_EXT_KU),        "V2I_EXT_KU"},
-{ERR_FUNC(X509V3_F_V2I_GENERAL_NAME),  "v2i_GENERAL_NAME"},
+{ERR_FUNC(X509V3_F_V2I_EXTENDED_KEY_USAGE),    "V2I_EXTENDED_KEY_USAGE"},
 {ERR_FUNC(X509V3_F_V2I_GENERAL_NAMES), "v2i_GENERAL_NAMES"},
+{ERR_FUNC(X509V3_F_V2I_GENERAL_NAME_EX),       "v2i_GENERAL_NAME_ex"},
+{ERR_FUNC(X509V3_F_V2I_ISSUER_ALT),    "V2I_ISSUER_ALT"},
 {ERR_FUNC(X509V3_F_V2I_NAME_CONSTRAINTS),      "V2I_NAME_CONSTRAINTS"},
 {ERR_FUNC(X509V3_F_V2I_POLICY_CONSTRAINTS),    "V2I_POLICY_CONSTRAINTS"},
 {ERR_FUNC(X509V3_F_V2I_POLICY_MAPPINGS),       "V2I_POLICY_MAPPINGS"},
+{ERR_FUNC(X509V3_F_V2I_SUBJECT_ALT),   "V2I_SUBJECT_ALT"},
 {ERR_FUNC(X509V3_F_V3_GENERIC_EXTENSION),      "V3_GENERIC_EXTENSION"},
-{ERR_FUNC(X509V3_F_X509V3_ADD_I2D),    "X509V3_ADD_I2D"},
+{ERR_FUNC(X509V3_F_X509V3_ADD1_I2D),   "X509V3_add1_i2d"},
 {ERR_FUNC(X509V3_F_X509V3_ADD_VALUE),  "X509V3_add_value"},
 {ERR_FUNC(X509V3_F_X509V3_EXT_ADD),    "X509V3_EXT_add"},
 {ERR_FUNC(X509V3_F_X509V3_EXT_ADD_ALIAS),      "X509V3_EXT_add_alias"},
 {ERR_FUNC(X509V3_F_X509V3_EXT_CONF),   "X509V3_EXT_conf"},
 {ERR_FUNC(X509V3_F_X509V3_EXT_I2D),    "X509V3_EXT_i2d"},
+{ERR_FUNC(X509V3_F_X509V3_EXT_NCONF),  "X509V3_EXT_nconf"},
 {ERR_FUNC(X509V3_F_X509V3_GET_SECTION),        "X509V3_get_section"},
 {ERR_FUNC(X509V3_F_X509V3_GET_STRING), "X509V3_get_string"},
 {ERR_FUNC(X509V3_F_X509V3_GET_VALUE_BOOL),     "X509V3_get_value_bool"},
index 1f801eb..555820f 100644 (file)
@@ -639,6 +639,7 @@ void ERR_load_X509V3_strings(void);
 #define X509V3_F_DO_DIRNAME                             144
 #define X509V3_F_DO_EXT_CONF                            124
 #define X509V3_F_DO_EXT_I2D                             135
+#define X509V3_F_DO_EXT_NCONF                           151
 #define X509V3_F_DO_I2V_NAME_CONSTRAINTS                148
 #define X509V3_F_HEX_TO_STRING                          111
 #define X509V3_F_I2S_ASN1_ENUMERATED                    121
@@ -648,37 +649,41 @@ void ERR_load_X509V3_strings(void);
 #define X509V3_F_NOTICE_SECTION                                 132
 #define X509V3_F_NREF_NOS                               133
 #define X509V3_F_POLICY_SECTION                                 131
+#define X509V3_F_PROCESS_PCI_VALUE                      150
 #define X509V3_F_R2I_CERTPOL                            130
 #define X509V3_F_R2I_PCI                                149
 #define X509V3_F_S2I_ASN1_IA5STRING                     100
 #define X509V3_F_S2I_ASN1_INTEGER                       108
 #define X509V3_F_S2I_ASN1_OCTET_STRING                  112
 #define X509V3_F_S2I_ASN1_SKEY_ID                       114
-#define X509V3_F_S2I_S2I_SKEY_ID                        115
+#define X509V3_F_S2I_SKEY_ID                            115
 #define X509V3_F_STRING_TO_HEX                          113
-#define X509V3_F_SXNET_ADD_ASC                          125
+#define X509V3_F_SXNET_ADD_ID_ASC                       125
 #define X509V3_F_SXNET_ADD_ID_INTEGER                   126
 #define X509V3_F_SXNET_ADD_ID_ULONG                     127
 #define X509V3_F_SXNET_GET_ID_ASC                       128
 #define X509V3_F_SXNET_GET_ID_ULONG                     129
-#define X509V3_F_V2I_ACCESS_DESCRIPTION                         139
 #define X509V3_F_V2I_ASN1_BIT_STRING                    101
+#define X509V3_F_V2I_AUTHORITY_INFO_ACCESS              139
 #define X509V3_F_V2I_AUTHORITY_KEYID                    119
 #define X509V3_F_V2I_BASIC_CONSTRAINTS                  102
 #define X509V3_F_V2I_CRLD                               134
-#define X509V3_F_V2I_EXT_KU                             103
-#define X509V3_F_V2I_GENERAL_NAME                       117
+#define X509V3_F_V2I_EXTENDED_KEY_USAGE                         103
 #define X509V3_F_V2I_GENERAL_NAMES                      118
+#define X509V3_F_V2I_GENERAL_NAME_EX                    117
+#define X509V3_F_V2I_ISSUER_ALT                                 153
 #define X509V3_F_V2I_NAME_CONSTRAINTS                   147
 #define X509V3_F_V2I_POLICY_CONSTRAINTS                         146
 #define X509V3_F_V2I_POLICY_MAPPINGS                    145
+#define X509V3_F_V2I_SUBJECT_ALT                        154
 #define X509V3_F_V3_GENERIC_EXTENSION                   116
-#define X509V3_F_X509V3_ADD_I2D                                 140
+#define X509V3_F_X509V3_ADD1_I2D                        140
 #define X509V3_F_X509V3_ADD_VALUE                       105
 #define X509V3_F_X509V3_EXT_ADD                                 104
 #define X509V3_F_X509V3_EXT_ADD_ALIAS                   106
 #define X509V3_F_X509V3_EXT_CONF                        107
 #define X509V3_F_X509V3_EXT_I2D                                 136
+#define X509V3_F_X509V3_EXT_NCONF                       152
 #define X509V3_F_X509V3_GET_SECTION                     142
 #define X509V3_F_X509V3_GET_STRING                      143
 #define X509V3_F_X509V3_GET_VALUE_BOOL                  110
index 6fcafec..344b422 100755 (executable)
@@ -13,16 +13,21 @@ foreach $file (@ARGV)
        $func="";
        while (<IN>)
                {
-               if (!/;$/ && /^([a-zA-Z].+[\s*])?([A-Za-z_0-9]+)\(.*[\),]/)
+               if (!/;$/ && /^([a-zA-Z].*[\s*])?([A-Za-z_0-9]+)\(.*[),]/)
                        {
-                       $func=$2;
+                       /^([^()]*(\([^()]*\)[^()]*)*)\(/;
+                       $1 =~ /([A-Za-z_0-9]*)$/;
+                       $func = $1;
                        $func =~ tr/A-Z/a-z/;
                        }
                if (/([A-Z0-9]+)err\(([^,]+)/)
                        {
-                       next if ($func eq "");
                        $errlib=$1;
                        $n=$2;
+
+                       if ($func eq "")
+                               { print "$file:$.:???:$n\n"; next; }
+
                        if ($n !~ /([^_]+)_F_(.+)$/)
                                {
                #               print "check -$file:$.:$func:$n\n";