diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/regress/lib/libcrypto/bn/bn_convert.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/regress/lib/libcrypto/bn/bn_convert.c b/src/regress/lib/libcrypto/bn/bn_convert.c index 147bb6839a..69f7da43b1 100644 --- a/src/regress/lib/libcrypto/bn/bn_convert.c +++ b/src/regress/lib/libcrypto/bn/bn_convert.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: bn_convert.c,v 1.2 2023/05/27 15:50:56 jsing Exp $ */ | 1 | /* $OpenBSD: bn_convert.c,v 1.3 2023/06/23 10:50:47 tb Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2023 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2023 Joel Sing <jsing@openbsd.org> |
| 4 | * | 4 | * |
| @@ -214,6 +214,16 @@ test_bn_asc2bn(void) | |||
| 214 | } | 214 | } |
| 215 | } | 215 | } |
| 216 | 216 | ||
| 217 | /* | ||
| 218 | * While it makes little sense to call BN_asc2bn() with a NULL bn, | ||
| 219 | * check for consistent behavior. | ||
| 220 | */ | ||
| 221 | if (!BN_asc2bn(NULL, "1") || !BN_asc2bn(NULL, "-1") || | ||
| 222 | !BN_asc2bn(NULL, "0x1") || !BN_asc2bn(NULL, "-0x1")) { | ||
| 223 | fprintf(stderr, "FAIL: BN_asc2bn() with NULL BIGNUM failed\n"); | ||
| 224 | goto failure; | ||
| 225 | } | ||
| 226 | |||
| 217 | failed = 0; | 227 | failed = 0; |
| 218 | 228 | ||
| 219 | failure: | 229 | failure: |
