diff options
| author | lteo <> | 2015-09-12 15:04:06 +0000 |
|---|---|---|
| committer | lteo <> | 2015-09-12 15:04:06 +0000 |
| commit | a2911aca708333d0aa73876f4fece0da3b4b7475 (patch) | |
| tree | bf88bdd1d7e2530030ef6294668edc34d80a57e0 /src | |
| parent | 55878a118f9914f78e196c906ef6d76b6f2e269c (diff) | |
| download | openbsd-a2911aca708333d0aa73876f4fece0da3b4b7475.tar.gz openbsd-a2911aca708333d0aa73876f4fece0da3b4b7475.tar.bz2 openbsd-a2911aca708333d0aa73876f4fece0da3b4b7475.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 | } |
