From a2911aca708333d0aa73876f4fece0da3b4b7475 Mon Sep 17 00:00:00 2001 From: lteo <> Date: Sat, 12 Sep 2015 15:04:06 +0000 Subject: 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@ --- src/usr.bin/openssl/prime.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/usr.bin/openssl/prime.c') 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 @@ -/* $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 "); } -- cgit v1.2.3-55-g6feb