summaryrefslogtreecommitdiff
path: root/src/usr.bin/openssl/enc.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/enc.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/enc.c')
-rw-r--r--src/usr.bin/openssl/enc.c16
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
307static void 306static void
308show_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
318static void
319enc_usage(void) 307enc_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