diff options
author | Adam Langley <agl@chromium.org> | 2013-04-23 14:36:06 -0400 |
---|---|---|
committer | Ben Laurie <ben@links.org> | 2013-06-04 18:52:30 +0100 |
commit | 96a4c31be3344cb08994a9d460c0ebd55939cc5b (patch) | |
tree | 45882a374b9c9dd0c46c0df2f17d640de3448d82 /crypto/bn/bn_err.c | |
parent | 2b0180c37fa6ffc48ee40caa831ca398b828e680 (diff) |
Ensure that, when generating small primes, the result is actually of the
requested size. Fixes OpenSSL #2701.
This change does not address the cases of generating safe primes, or
where the |add| parameter is non-NULL.
Conflicts:
crypto/bn/bn.h
crypto/bn/bn_err.c
Diffstat (limited to 'crypto/bn/bn_err.c')
-rw-r--r-- | crypto/bn/bn_err.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto/bn/bn_err.c b/crypto/bn/bn_err.c index cfe2eb94a0..cdc15e62f0 100644 --- a/crypto/bn/bn_err.c +++ b/crypto/bn/bn_err.c @@ -87,6 +87,8 @@ static ERR_STRING_DATA BN_str_functs[]= {ERR_FUNC(BN_F_BN_EXP), "BN_exp"}, {ERR_FUNC(BN_F_BN_EXPAND2), "bn_expand2"}, {ERR_FUNC(BN_F_BN_EXPAND_INTERNAL), "BN_EXPAND_INTERNAL"}, +{ERR_FUNC(BN_F_BN_GENERATE_DSA_NONCE), "BN_generate_dsa_nonce"}, +{ERR_FUNC(BN_F_BN_GENERATE_PRIME_EX), "BN_generate_prime_ex"}, {ERR_FUNC(BN_F_BN_GF2M_MOD), "BN_GF2m_mod"}, {ERR_FUNC(BN_F_BN_GF2M_MOD_EXP), "BN_GF2m_mod_exp"}, {ERR_FUNC(BN_F_BN_GF2M_MOD_MUL), "BN_GF2m_mod_mul"}, @@ -118,6 +120,7 @@ static ERR_STRING_DATA BN_str_reasons[]= {ERR_REASON(BN_R_ARG2_LT_ARG3) ,"arg2 lt arg3"}, {ERR_REASON(BN_R_BAD_RECIPROCAL) ,"bad reciprocal"}, {ERR_REASON(BN_R_BIGNUM_TOO_LONG) ,"bignum too long"}, +{ERR_REASON(BN_R_BITS_TOO_SMALL) ,"bits too small"}, {ERR_REASON(BN_R_CALLED_WITH_EVEN_MODULUS),"called with even modulus"}, {ERR_REASON(BN_R_DIV_BY_ZERO) ,"div by zero"}, {ERR_REASON(BN_R_ENCODING_ERROR) ,"encoding error"}, |