Handle BN_mod_word failures.
authorDavid Benjamin <davidben@google.com>
Fri, 24 Jun 2016 15:07:52 +0000 (11:07 -0400)
committerKurt Roeckx <kurt@roeckx.be>
Sat, 25 Jun 2016 09:01:34 +0000 (11:01 +0200)
commitd70a562714199c9a4eb835efe7b22c9a7017e7e5
treed1db68f2d94d79db0f212fb7bcd2896be542fa8e
parent748e85308ef4f3e672975b3604ea2d76424fa404
Handle BN_mod_word failures.

As of 37258dadaa9e36db4b96a3aa54aa6c67136160cc and the corresponding upstream
change, BN_mod_word may fail, like BN_div_word. Handle this properly. Thanks to
Brian Smith for pointing this out. See BoringSSL's
44bedc348d9491e63c7ed1438db100a4b8a830be.

Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Rich Salz <rsalz@openssl.org>
GH: #1251
crypto/bn/bn_prime.c
crypto/dh/dh_check.c