summaryrefslogtreecommitdiff
path: root/src/usr.bin/openssl/ec.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/ec.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/ec.c')
-rw-r--r--src/usr.bin/openssl/ec.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/usr.bin/openssl/ec.c b/src/usr.bin/openssl/ec.c
index f2dad6dfef..917a7a15e5 100644
--- a/src/usr.bin/openssl/ec.c
+++ b/src/usr.bin/openssl/ec.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ec.c,v 1.11 2018/02/07 05:47:55 jsing Exp $ */ 1/* $OpenBSD: ec.c,v 1.12 2019/02/09 06:27:37 inoguchi Exp $ */
2/* 2/*
3 * Written by Nils Larsch for the OpenSSL project. 3 * Written by Nils Larsch for the OpenSSL project.
4 */ 4 */
@@ -60,7 +60,6 @@
60 60
61#ifndef OPENSSL_NO_EC 61#ifndef OPENSSL_NO_EC
62 62
63#include <ctype.h>
64#include <stdio.h> 63#include <stdio.h>
65#include <stdlib.h> 64#include <stdlib.h>
66#include <string.h> 65#include <string.h>
@@ -240,17 +239,6 @@ static struct option ec_options[] = {
240}; 239};
241 240
242static void 241static void
243show_ciphers(const OBJ_NAME *name, void *arg)
244{
245 static int n;
246
247 if (!islower((unsigned char)*name->name))
248 return;
249
250 fprintf(stderr, " -%-24s%s", name->name, (++n % 3 ? "" : "\n"));
251}
252
253static void
254ec_usage(void) 242ec_usage(void)
255{ 243{
256 fprintf(stderr, 244 fprintf(stderr,
@@ -263,7 +251,7 @@ ec_usage(void)
263 fprintf(stderr, "\n"); 251 fprintf(stderr, "\n");
264 252
265 fprintf(stderr, "Valid ciphername values:\n\n"); 253 fprintf(stderr, "Valid ciphername values:\n\n");
266 OBJ_NAME_do_all_sorted(OBJ_NAME_TYPE_CIPHER_METH, show_ciphers, NULL); 254 OBJ_NAME_do_all_sorted(OBJ_NAME_TYPE_CIPHER_METH, show_cipher, NULL);
267 fprintf(stderr, "\n"); 255 fprintf(stderr, "\n");
268} 256}
269 257