diff options
author | Lawrence Teo <lteo@cvs.openbsd.org> | 2015-09-12 15:04:07 +0000 |
---|---|---|
committer | Lawrence Teo <lteo@cvs.openbsd.org> | 2015-09-12 15:04:07 +0000 |
commit | 475993abbad7749ad9554d861c94460b83c2d98b (patch) | |
tree | 56d6d1a4cc6e36d006b57ac20949c4d1d6fa73d2 /usr.bin/openssl | |
parent | 8d90add9c8baeb92c3c285888c5d4499b9eb452f (diff) |
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 'usr.bin/openssl')
-rw-r--r-- | usr.bin/openssl/prime.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.bin/openssl/prime.c b/usr.bin/openssl/prime.c index 673abc24055..55fac455e9b 100644 --- a/usr.bin/openssl/prime.c +++ b/usr.bin/openssl/prime.c @@ -1,4 +1,4 @@ -/* $OpenBSD: prime.c,v 1.7 2015/08/22 16:36:05 jsing Exp $ */ +/* $OpenBSD: prime.c,v 1.8 2015/09/12 15:04:06 lteo Exp $ */ /* ==================================================================== * Copyright (c) 2004 The OpenSSL Project. All rights reserved. * @@ -177,8 +177,7 @@ prime_main(int argc, char **argv) } } - BN_print(bio_out, bn); - BIO_printf(bio_out, " is %sprime\n", + BIO_printf(bio_out, "%s is %sprime\n", prime, BN_is_prime_ex(bn, prime_config.checks, NULL, NULL) ? "" : "not "); } |