diff options
author | 2014-04-24 21:31:00 +0000 | |
---|---|---|
committer | 2014-04-24 21:31:00 +0000 | |
commit | 012ec40a9c58bfd6dfad2cea92adc7fcd311cf9f (patch) | |
tree | 47ab9114bb251fe78529df8174301698f5aecd2b /lib/libssl/src/apps | |
parent | Re-add rcsid, and switch back to our previous descriptions for -iDsym[=value] (diff) | |
download | wireguard-openbsd-012ec40a9c58bfd6dfad2cea92adc7fcd311cf9f.tar.xz wireguard-openbsd-012ec40a9c58bfd6dfad2cea92adc7fcd311cf9f.zip |
Try to clean the maze of <openssl/bn.h> defines regarding the BN internals.
The intent of this change is to only keep support for two kind of architectures:
- those with 32-bit int and long, and 64-bit long long, where
``long * long -> long long'' multiplication routines are available.
- those with 64-bit int and long, and no 128-bit long long type.
This gets rid of the SIXTY_FOUR_BIT_LONG, SIXTY_FOUR_BIT (not the same!),
THIRTY_TWO_BIT, SIXTEEN_BIT and EIGHT_BIT defines.
After this change, the types and defines are as follows:
arch: 64bit 32bit rationale
BN_LLONG undefined defined defined if l * l -> ll
BN_ULLONG undefined u long long result of BN_LONG * BN_LONG
BN_ULONG u long u int native register size
BN_LONG long int the same, signed
BN_BITS 128 64 size of 2*BN_ULONG in bits
BN_BYTES 8 4 size of 2*BN_ULONG in bytes
BN_BITS2 64 32 BN_BITS / 2
Tested on various 32-bit and 64-bit OpenBSD systems of various endianness.
Diffstat (limited to 'lib/libssl/src/apps')
-rw-r--r-- | lib/libssl/src/apps/genrsa.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libssl/src/apps/genrsa.c b/lib/libssl/src/apps/genrsa.c index 68e939ca99a..c6588282990 100644 --- a/lib/libssl/src/apps/genrsa.c +++ b/lib/libssl/src/apps/genrsa.c @@ -256,7 +256,7 @@ bad: */ l = 0L; for (i = 0; i < rsa->e->top; i++) { -#ifndef SIXTY_FOUR_BIT +#ifndef _LP64 l <<= BN_BITS4; l <<= BN_BITS4; #endif |