fix error codes
authorBodo Möller <bodo@openssl.org>
Thu, 19 Apr 2007 15:14:39 +0000 (15:14 +0000)
committerBodo Möller <bodo@openssl.org>
Thu, 19 Apr 2007 15:14:39 +0000 (15:14 +0000)
crypto/bn/bn.h
crypto/bn/bn_div.c
crypto/bn/bn_err.c
crypto/bn/bn_gcd.c

index 0db2ac084509604773596a71210b7e324862d821..2650365b8181c6bbab7905d598776695914efa06 100644 (file)
@@ -789,6 +789,7 @@ void ERR_load_BN_strings(void);
 #define BN_F_BN_CTX_NEW                                         106
 #define BN_F_BN_CTX_START                               129
 #define BN_F_BN_DIV                                     107
+#define BN_F_BN_DIV_NO_BRANCH                           138
 #define BN_F_BN_DIV_RECP                                130
 #define BN_F_BN_EXP                                     123
 #define BN_F_BN_EXPAND2                                         108
@@ -807,6 +808,7 @@ void ERR_load_BN_strings(void);
 #define BN_F_BN_MOD_EXP_RECP                            125
 #define BN_F_BN_MOD_EXP_SIMPLE                          126
 #define BN_F_BN_MOD_INVERSE                             110
+#define BN_F_BN_MOD_INVERSE_NO_BRANCH                   139
 #define BN_F_BN_MOD_LSHIFT_QUICK                        119
 #define BN_F_BN_MOD_MUL_RECIPROCAL                      111
 #define BN_F_BN_MOD_SQRT                                121
index 257fe0ce01b2f19fdfb10062be775fa852fd9dc1..514b2c2c822a3a1f4f1edc395f5fcd460d10e72e 100644 (file)
@@ -422,7 +422,7 @@ int BN_div_no_branch(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num,
 
        if (BN_is_zero(divisor))
                {
-               BNerr(BN_F_BN_DIV,BN_R_DIV_BY_ZERO);
+               BNerr(BN_F_BN_DIV_NO_BRANCH,BN_R_DIV_BY_ZERO);
                return(0);
                }
 
index 24fbbb772d0fc6bcf0e77b7970af55c62dc5f6f2..cfe2eb94a0ce79b4a8d12fc152f843a85a114a6e 100644 (file)
@@ -1,6 +1,6 @@
 /* crypto/bn/bn_err.c */
 /* ====================================================================
- * Copyright (c) 1999-2005 The OpenSSL Project.  All rights reserved.
+ * Copyright (c) 1999-2007 The OpenSSL Project.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -82,6 +82,7 @@ static ERR_STRING_DATA BN_str_functs[]=
 {ERR_FUNC(BN_F_BN_CTX_NEW),    "BN_CTX_new"},
 {ERR_FUNC(BN_F_BN_CTX_START),  "BN_CTX_start"},
 {ERR_FUNC(BN_F_BN_DIV),        "BN_div"},
+{ERR_FUNC(BN_F_BN_DIV_NO_BRANCH),      "BN_div_no_branch"},
 {ERR_FUNC(BN_F_BN_DIV_RECP),   "BN_div_recp"},
 {ERR_FUNC(BN_F_BN_EXP),        "BN_exp"},
 {ERR_FUNC(BN_F_BN_EXPAND2),    "bn_expand2"},
@@ -100,6 +101,7 @@ static ERR_STRING_DATA BN_str_functs[]=
 {ERR_FUNC(BN_F_BN_MOD_EXP_RECP),       "BN_mod_exp_recp"},
 {ERR_FUNC(BN_F_BN_MOD_EXP_SIMPLE),     "BN_mod_exp_simple"},
 {ERR_FUNC(BN_F_BN_MOD_INVERSE),        "BN_mod_inverse"},
+{ERR_FUNC(BN_F_BN_MOD_INVERSE_NO_BRANCH),      "BN_mod_inverse_no_branch"},
 {ERR_FUNC(BN_F_BN_MOD_LSHIFT_QUICK),   "BN_mod_lshift_quick"},
 {ERR_FUNC(BN_F_BN_MOD_MUL_RECIPROCAL), "BN_mod_mul_reciprocal"},
 {ERR_FUNC(BN_F_BN_MOD_SQRT),   "BN_mod_sqrt"},
index 5fb8090c5278986a6d528fa702bab8367c2e3e48..85e4b50c10252cd3e9a61f6c9e4248970f859304 100644 (file)
@@ -640,7 +640,7 @@ BIGNUM *BN_mod_inverse_no_branch(BIGNUM *in,
                }
        else
                {
-               BNerr(BN_F_BN_MOD_INVERSE,BN_R_NO_INVERSE);
+               BNerr(BN_F_BN_MOD_INVERSE_NO_BRANCH,BN_R_NO_INVERSE);
                goto err;
                }
        ret=R;