diff options
| author | bcook <> | 2016-07-05 02:54:35 +0000 |
|---|---|---|
| committer | bcook <> | 2016-07-05 02:54:35 +0000 |
| commit | 29ecf1f5b4cb5a580dcac440216b7127a56e3f84 (patch) | |
| tree | 90c31bd2681496537a3d217c0819f837c5e8d8b4 /src/lib/libcrypto/man | |
| parent | 74a4eefc567605f4d8f2c58124b45cb770123a22 (diff) | |
| download | openbsd-29ecf1f5b4cb5a580dcac440216b7127a56e3f84.tar.gz openbsd-29ecf1f5b4cb5a580dcac440216b7127a56e3f84.tar.bz2 openbsd-29ecf1f5b4cb5a580dcac440216b7127a56e3f84.zip | |
On systems where we do not have BN_ULLONG defined (most 64-bit systems),
BN_mod_word() can return incorrect results if the supplied modulus is
too big, so we need to fall back to BN_div_word.
Now that BN_mod_word may fail, handle errors properly update the man page.
Thanks to Brian Smith for pointing out these fixes from BoringSSL:
https://boringssl.googlesource.com/boringssl/+/67cb49d045f04973ddba0f92fe8a8ad483c7da89
https://boringssl.googlesource.com/boringssl/+/44bedc348d9491e63c7ed1438db100a4b8a830be
ok beck@
Diffstat (limited to 'src/lib/libcrypto/man')
| -rw-r--r-- | src/lib/libcrypto/man/BN_add_word.3 | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/libcrypto/man/BN_add_word.3 b/src/lib/libcrypto/man/BN_add_word.3 index 930aae4d32..16f2a17eb5 100644 --- a/src/lib/libcrypto/man/BN_add_word.3 +++ b/src/lib/libcrypto/man/BN_add_word.3 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | .Dd $Mdocdate: February 23 2015 $ | 1 | .Dd $Mdocdate: July 5 2016 $ |
| 2 | .Dt BN_ADD_WORD 3 | 2 | .Dt BN_ADD_WORD 3 |
| 3 | .Os | 3 | .Os |
| 4 | .Sh NAME | 4 | .Sh NAME |
| @@ -75,7 +75,8 @@ returns the remainder of | |||
| 75 | .Fa a | 75 | .Fa a |
| 76 | divided by | 76 | divided by |
| 77 | .Fa w | 77 | .Fa w |
| 78 | .Pq Li a%w . | 78 | .Pq Li a%w |
| 79 | or (BN_ULONG)-1 on error. | ||
| 79 | .Pp | 80 | .Pp |
| 80 | For | 81 | For |
| 81 | .Fn BN_div_word | 82 | .Fn BN_div_word |
