]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Correct description of BN_mask_bits
authorT.Yanagisawa <52776010+mogisawa@users.noreply.github.com>
Thu, 27 Aug 2020 02:11:23 +0000 (11:11 +0900)
committerMatt Caswell <matt@openssl.org>
Thu, 5 Nov 2020 10:53:28 +0000 (10:53 +0000)
CLA: trivial

Correct right shift to left shift.
Pseudo code `a&=~((~0)>>n)` means "get higher n-bits of a", but actually crypto lib gives lower n-bits.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/12727)

(cherry picked from commit b6ef3c7089e887427cde8c550e28211dc0c22dd1)

doc/man3/BN_set_bit.pod

index 67c2bac2410247e10d905a50c0d1f9676846c887..6e0a11a24b89f466b1768c8595560167e0b33ddc 100644 (file)
@@ -33,7 +33,7 @@ error occurs if B<a> is shorter than B<n> bits.
 BN_is_bit_set() tests if bit B<n> in B<a> is set.
 
 BN_mask_bits() truncates B<a> to an B<n> bit number
-(C<a&=~((~0)E<gt>E<gt>n)>).  An error occurs if B<a> already is
+(C<a&=~((~0)E<lt>E<lt>n)>).  An error occurs if B<a> already is
 shorter than B<n> bits.
 
 BN_lshift() shifts B<a> left by B<n> bits and places the result in