From 24a8c25ab5a91b4cf467aef1af3dcc474b1c7df2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bodo=20M=C3=B6ller?= Date: Thu, 19 Apr 2007 15:14:21 +0000 Subject: [PATCH] fix error codes --- crypto/bn/bn.h | 2 ++ crypto/bn/bn_div.c | 2 +- crypto/bn/bn_err.c | 4 +++- crypto/bn/bn_gcd.c | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/crypto/bn/bn.h b/crypto/bn/bn.h index d69e37b04d..68ed77eaab 100644 --- a/crypto/bn/bn.h +++ b/crypto/bn/bn.h @@ -803,6 +803,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 @@ -821,6 +822,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 diff --git a/crypto/bn/bn_div.c b/crypto/bn/bn_div.c index 257fe0ce01..514b2c2c82 100644 --- a/crypto/bn/bn_div.c +++ b/crypto/bn/bn_div.c @@ -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); } diff --git a/crypto/bn/bn_err.c b/crypto/bn/bn_err.c index a02df0adeb..cfe2eb94a0 100644 --- a/crypto/bn/bn_err.c +++ b/crypto/bn/bn_err.c @@ -1,6 +1,6 @@ /* crypto/bn/bn_err.c */ /* ==================================================================== - * Copyright (c) 1999-2006 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"}, diff --git a/crypto/bn/bn_gcd.c b/crypto/bn/bn_gcd.c index 5fb8090c52..85e4b50c10 100644 --- a/crypto/bn/bn_gcd.c +++ b/crypto/bn/bn_gcd.c @@ -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; -- 2.25.1