diff options
author | inoguchi <> | 2019-02-09 06:27:37 +0000 |
---|---|---|
committer | inoguchi <> | 2019-02-09 06:27:37 +0000 |
commit | 7a09aa52502e5c4598eda224db8dd8e132773449 (patch) | |
tree | 7a94d4b4e8a2db52f97ea7f9170c41a40ffacb17 /src/usr.bin/openssl/pkey.c | |
parent | 6126567f386c34c6cff5dc95e8e5072c34ba7b00 (diff) | |
download | openbsd-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.c | 16 |
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 | ||
184 | static void | 183 | static void |
185 | show_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 | |||
195 | static void | ||
196 | pkey_usage() | 184 | pkey_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 | ||