summaryrefslogtreecommitdiff
path: root/src/usr.bin/openssl/pkey.c
diff options
context:
space:
mode:
authorinoguchi <>2019-02-09 06:27:37 +0000
committerinoguchi <>2019-02-09 06:27:37 +0000
commit7a09aa52502e5c4598eda224db8dd8e132773449 (patch)
tree7a94d4b4e8a2db52f97ea7f9170c41a40ffacb17 /src/usr.bin/openssl/pkey.c
parent6126567f386c34c6cff5dc95e8e5072c34ba7b00 (diff)
downloadopenbsd-7a09aa52502e5c4598eda224db8dd8e132773449.tar.gz
openbsd-7a09aa52502e5c4598eda224db8dd8e132773449.tar.bz2
openbsd-7a09aa52502e5c4598eda224db8dd8e132773449.zip
Summarize the 4 same name functions and move it to apps.c
ok tb@ jsing@
Diffstat (limited to 'src/usr.bin/openssl/pkey.c')
-rw-r--r--src/usr.bin/openssl/pkey.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/usr.bin/openssl/pkey.c b/src/usr.bin/openssl/pkey.c
index a5ed21fc3b..f7e7e87e48 100644
--- a/src/usr.bin/openssl/pkey.c
+++ b/src/usr.bin/openssl/pkey.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: pkey.c,v 1.12 2019/02/05 12:45:47 inoguchi Exp $ */ 1/* $OpenBSD: pkey.c,v 1.13 2019/02/09 06:27:37 inoguchi Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2006 3 * project 2006
4 */ 4 */
@@ -56,7 +56,6 @@
56 * 56 *
57 */ 57 */
58 58
59#include <ctype.h>
60#include <stdio.h> 59#include <stdio.h>
61#include <string.h> 60#include <string.h>
62 61
@@ -182,17 +181,6 @@ static struct option pkey_options[] = {
182}; 181};
183 182
184static void 183static void
185show_ciphers(const OBJ_NAME *name, void *arg)
186{
187 static int n;
188
189 if (!islower((unsigned char)*name->name))
190 return;
191
192 fprintf(stderr, " -%-24s%s", name->name, (++n % 3 ? "" : "\n"));
193}
194
195static void
196pkey_usage() 184pkey_usage()
197{ 185{
198 fprintf(stderr, 186 fprintf(stderr,
@@ -205,7 +193,7 @@ pkey_usage()
205 fprintf(stderr, "\n"); 193 fprintf(stderr, "\n");
206 194
207 fprintf(stderr, "Valid ciphername values:\n\n"); 195 fprintf(stderr, "Valid ciphername values:\n\n");
208 OBJ_NAME_do_all_sorted(OBJ_NAME_TYPE_CIPHER_METH, show_ciphers, NULL); 196 OBJ_NAME_do_all_sorted(OBJ_NAME_TYPE_CIPHER_METH, show_cipher, NULL);
209 fprintf(stderr, "\n"); 197 fprintf(stderr, "\n");
210} 198}
211 199