Don't error with -1 for BIGNUM exp operations
authorMatt Caswell <matt@openssl.org>
Mon, 6 Nov 2017 11:18:35 +0000 (11:18 +0000)
committerMatt Caswell <matt@openssl.org>
Tue, 7 Nov 2017 11:04:43 +0000 (11:04 +0000)
commitd88c136822d9020868b854e1614b9df5b8c43714
treee992031434b53c405656a7ab360765ffbae7fe76
parent32492093722636596018a799c438bfc04c343b40
Don't error with -1 for BIGNUM exp operations

The man pages say that BIGNUM arithmetic operations fail with a 0 return.
However some functions were returning -1 on error. In master and 1.1.0 they
already return 0, so this brings 1.0.2 in line.

Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/4682)
crypto/bn/bn_exp.c