diff options
author | lteo <> | 2015-09-12 15:04:06 +0000 |
---|---|---|
committer | lteo <> | 2015-09-12 15:04:06 +0000 |
commit | b6b9746992a205b72af1ef1e0f427cbe3eb1a096 (patch) | |
tree | bf88bdd1d7e2530030ef6294668edc34d80a57e0 /src | |
parent | 5b9ca35cbf458add3c0c5e9326f133e7ab812cb9 (diff) | |
download | openbsd-b6b9746992a205b72af1ef1e0f427cbe3eb1a096.tar.gz openbsd-b6b9746992a205b72af1ef1e0f427cbe3eb1a096.tar.bz2 openbsd-b6b9746992a205b72af1ef1e0f427cbe3eb1a096.zip |
Fix the openssl(1) prime command: When checking a decimal number for
primality, do not unnecessarily convert the original decimal number to
hex in the output.
Hex numbers explicitly specified with -hex remain unchanged.
ok beck@ deraadt@ jsing@ miod@
Diffstat (limited to 'src')
-rw-r--r-- | src/usr.bin/openssl/prime.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/usr.bin/openssl/prime.c b/src/usr.bin/openssl/prime.c index 673abc2405..55fac455e9 100644 --- a/src/usr.bin/openssl/prime.c +++ b/src/usr.bin/openssl/prime.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: prime.c,v 1.7 2015/08/22 16:36:05 jsing Exp $ */ | 1 | /* $OpenBSD: prime.c,v 1.8 2015/09/12 15:04:06 lteo Exp $ */ |
2 | /* ==================================================================== | 2 | /* ==================================================================== |
3 | * Copyright (c) 2004 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 2004 The OpenSSL Project. All rights reserved. |
4 | * | 4 | * |
@@ -177,8 +177,7 @@ prime_main(int argc, char **argv) | |||
177 | } | 177 | } |
178 | } | 178 | } |
179 | 179 | ||
180 | BN_print(bio_out, bn); | 180 | BIO_printf(bio_out, "%s is %sprime\n", prime, |
181 | BIO_printf(bio_out, " is %sprime\n", | ||
182 | BN_is_prime_ex(bn, prime_config.checks, | 181 | BN_is_prime_ex(bn, prime_config.checks, |
183 | NULL, NULL) ? "" : "not "); | 182 | NULL, NULL) ? "" : "not "); |
184 | } | 183 | } |