diff options
| author | jsing <> | 2023-04-19 10:54:49 +0000 |
|---|---|---|
| committer | jsing <> | 2023-04-19 10:54:49 +0000 |
| commit | 0b5fd2ea19990474e5075358b9e4bec724ec2e38 (patch) | |
| tree | ca58e21d0a2e0571e8ee2546e7db2eb1bb63d4a3 /src/lib/libcrypto/bn/bn_lib.c | |
| parent | 2fb6a5afb5b39fadad20a8acaf72324fd753942b (diff) | |
| download | openbsd-0b5fd2ea19990474e5075358b9e4bec724ec2e38.tar.gz openbsd-0b5fd2ea19990474e5075358b9e4bec724ec2e38.tar.bz2 openbsd-0b5fd2ea19990474e5075358b9e4bec724ec2e38.zip | |
Move BN_options() from bn_convert.c to bn_lib.c
Diffstat (limited to 'src/lib/libcrypto/bn/bn_lib.c')
| -rw-r--r-- | src/lib/libcrypto/bn/bn_lib.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/lib/libcrypto/bn/bn_lib.c b/src/lib/libcrypto/bn/bn_lib.c index 89664fbb97..cd06563a5d 100644 --- a/src/lib/libcrypto/bn/bn_lib.c +++ b/src/lib/libcrypto/bn/bn_lib.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: bn_lib.c,v 1.82 2023/04/19 10:51:22 jsing Exp $ */ | 1 | /* $OpenBSD: bn_lib.c,v 1.83 2023/04/19 10:54:49 jsing Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -900,6 +900,25 @@ BN_is_negative(const BIGNUM *a) | |||
| 900 | return a->neg != 0; | 900 | return a->neg != 0; |
| 901 | } | 901 | } |
| 902 | 902 | ||
| 903 | char * | ||
| 904 | BN_options(void) | ||
| 905 | { | ||
| 906 | static int init = 0; | ||
| 907 | static char data[16]; | ||
| 908 | |||
| 909 | if (!init) { | ||
| 910 | init++; | ||
| 911 | #ifdef BN_LLONG | ||
| 912 | snprintf(data,sizeof data, "bn(%d,%d)", | ||
| 913 | (int)sizeof(BN_ULLONG) * 8, (int)sizeof(BN_ULONG) * 8); | ||
| 914 | #else | ||
| 915 | snprintf(data,sizeof data, "bn(%d,%d)", | ||
| 916 | (int)sizeof(BN_ULONG) * 8, (int)sizeof(BN_ULONG) * 8); | ||
| 917 | #endif | ||
| 918 | } | ||
| 919 | return (data); | ||
| 920 | } | ||
| 921 | |||
| 903 | /* | 922 | /* |
| 904 | * Bits of security, see SP800-57, section 5.6.11, table 2. | 923 | * Bits of security, see SP800-57, section 5.6.11, table 2. |
| 905 | */ | 924 | */ |
