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/enc.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/enc.c')
-rw-r--r-- | src/usr.bin/openssl/enc.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/src/usr.bin/openssl/enc.c b/src/usr.bin/openssl/enc.c index 7daeafe9d7..863a048c12 100644 --- a/src/usr.bin/openssl/enc.c +++ b/src/usr.bin/openssl/enc.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: enc.c,v 1.16 2019/01/18 22:47:34 naddy Exp $ */ | 1 | /* $OpenBSD: enc.c,v 1.17 2019/02/09 06:27:37 inoguchi Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -56,7 +56,6 @@ | |||
56 | * [including the GNU Public Licence.] | 56 | * [including the GNU Public Licence.] |
57 | */ | 57 | */ |
58 | 58 | ||
59 | #include <ctype.h> | ||
60 | #include <stdio.h> | 59 | #include <stdio.h> |
61 | #include <stdlib.h> | 60 | #include <stdlib.h> |
62 | #include <string.h> | 61 | #include <string.h> |
@@ -305,17 +304,6 @@ static struct option enc_options[] = { | |||
305 | }; | 304 | }; |
306 | 305 | ||
307 | static void | 306 | static void |
308 | show_ciphers(const OBJ_NAME *name, void *arg) | ||
309 | { | ||
310 | static int n; | ||
311 | |||
312 | if (!islower((unsigned char)*name->name)) | ||
313 | return; | ||
314 | |||
315 | fprintf(stderr, " -%-24s%s", name->name, (++n % 3 ? "" : "\n")); | ||
316 | } | ||
317 | |||
318 | static void | ||
319 | enc_usage(void) | 307 | enc_usage(void) |
320 | { | 308 | { |
321 | fprintf(stderr, "usage: enc -ciphername [-AadePp] [-base64] " | 309 | fprintf(stderr, "usage: enc -ciphername [-AadePp] [-base64] " |
@@ -328,7 +316,7 @@ enc_usage(void) | |||
328 | fprintf(stderr, "\n"); | 316 | fprintf(stderr, "\n"); |
329 | 317 | ||
330 | fprintf(stderr, "Valid ciphername values:\n\n"); | 318 | fprintf(stderr, "Valid ciphername values:\n\n"); |
331 | OBJ_NAME_do_all_sorted(OBJ_NAME_TYPE_CIPHER_METH, show_ciphers, NULL); | 319 | OBJ_NAME_do_all_sorted(OBJ_NAME_TYPE_CIPHER_METH, show_cipher, NULL); |
332 | fprintf(stderr, "\n"); | 320 | fprintf(stderr, "\n"); |
333 | } | 321 | } |
334 | 322 | ||