]>
git.ipfire.org Git - thirdparty/openssl.git/blob - apps/list.c
2 * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
4 * Licensed under the Apache License 2.0 (the "License"). You may not use
5 * this file except in compliance with the License. You can obtain a copy
6 * in the file LICENSE in the source distribution or at
7 * https://www.openssl.org/source/license.html
11 #include <openssl/evp.h>
12 #include <openssl/err.h>
13 #include <openssl/provider.h>
14 #include <openssl/safestack.h>
15 #include <openssl/kdf.h>
17 #include "app_params.h"
22 static int verbose
= 0;
24 static void legacy_cipher_fn(const EVP_CIPHER
*c
,
25 const char *from
, const char *to
, void *arg
)
28 BIO_printf(arg
, " %s\n", EVP_CIPHER_name(c
));
34 BIO_printf(arg
, " %s => %s\n", from
, to
);
38 DEFINE_STACK_OF(EVP_CIPHER
)
39 static int cipher_cmp(const EVP_CIPHER
* const *a
,
40 const EVP_CIPHER
* const *b
)
42 int ret
= EVP_CIPHER_number(*a
) - EVP_CIPHER_number(*b
);
45 ret
= strcmp(OSSL_PROVIDER_name(EVP_CIPHER_provider(*a
)),
46 OSSL_PROVIDER_name(EVP_CIPHER_provider(*b
)));
51 static void collect_ciphers(EVP_CIPHER
*cipher
, void *stack
)
53 STACK_OF(EVP_CIPHER
) *cipher_stack
= stack
;
55 if (sk_EVP_CIPHER_push(cipher_stack
, cipher
) > 0)
56 EVP_CIPHER_up_ref(cipher
);
59 static void list_ciphers(void)
61 STACK_OF(EVP_CIPHER
) *ciphers
= sk_EVP_CIPHER_new(cipher_cmp
);
64 BIO_printf(bio_out
, "Legacy:\n");
65 EVP_CIPHER_do_all_sorted(legacy_cipher_fn
, bio_out
);
67 BIO_printf(bio_out
, "Provided:\n");
68 EVP_CIPHER_do_all_provided(NULL
, collect_ciphers
, ciphers
);
69 sk_EVP_CIPHER_sort(ciphers
);
70 for (i
= 0; i
< sk_EVP_CIPHER_num(ciphers
); i
++) {
71 const EVP_CIPHER
*c
= sk_EVP_CIPHER_value(ciphers
, i
);
72 STACK_OF(OPENSSL_CSTRING
) *names
=
73 sk_OPENSSL_CSTRING_new(name_cmp
);
75 EVP_CIPHER_names_do_all(c
, collect_names
, names
);
77 BIO_printf(bio_out
, " ");
78 print_names(bio_out
, names
);
79 BIO_printf(bio_out
, " @ %s\n",
80 OSSL_PROVIDER_name(EVP_CIPHER_provider(c
)));
82 sk_OPENSSL_CSTRING_free(names
);
85 print_param_types("retrievable algorithm parameters",
86 EVP_CIPHER_gettable_params(c
), 4);
87 print_param_types("retrievable operation parameters",
88 EVP_CIPHER_gettable_ctx_params(c
), 4);
89 print_param_types("settable operation parameters",
90 EVP_CIPHER_settable_ctx_params(c
), 4);
93 sk_EVP_CIPHER_pop_free(ciphers
, EVP_CIPHER_free
);
96 static void list_md_fn(const EVP_MD
*m
,
97 const char *from
, const char *to
, void *arg
)
100 BIO_printf(arg
, " %s\n", EVP_MD_name(m
));
103 from
= "<undefined>";
106 BIO_printf((BIO
*)arg
, " %s => %s\n", from
, to
);
110 DEFINE_STACK_OF(EVP_MD
)
111 static int md_cmp(const EVP_MD
* const *a
, const EVP_MD
* const *b
)
113 int ret
= EVP_MD_number(*a
) - EVP_MD_number(*b
);
116 ret
= strcmp(OSSL_PROVIDER_name(EVP_MD_provider(*a
)),
117 OSSL_PROVIDER_name(EVP_MD_provider(*b
)));
122 static void collect_digests(EVP_MD
*md
, void *stack
)
124 STACK_OF(EVP_MD
) *digest_stack
= stack
;
126 if (sk_EVP_MD_push(digest_stack
, md
) > 0)
130 static void list_digests(void)
132 STACK_OF(EVP_MD
) *digests
= sk_EVP_MD_new(md_cmp
);
135 BIO_printf(bio_out
, "Legacy:\n");
136 EVP_MD_do_all_sorted(list_md_fn
, bio_out
);
138 BIO_printf(bio_out
, "Provided:\n");
139 EVP_MD_do_all_provided(NULL
, collect_digests
, digests
);
140 sk_EVP_MD_sort(digests
);
141 for (i
= 0; i
< sk_EVP_MD_num(digests
); i
++) {
142 const EVP_MD
*m
= sk_EVP_MD_value(digests
, i
);
143 STACK_OF(OPENSSL_CSTRING
) *names
=
144 sk_OPENSSL_CSTRING_new(name_cmp
);
146 EVP_MD_names_do_all(m
, collect_names
, names
);
148 BIO_printf(bio_out
, " ");
149 print_names(bio_out
, names
);
150 BIO_printf(bio_out
, " @ %s\n",
151 OSSL_PROVIDER_name(EVP_MD_provider(m
)));
153 sk_OPENSSL_CSTRING_free(names
);
156 print_param_types("retrievable algorithm parameters",
157 EVP_MD_gettable_params(m
), 4);
158 print_param_types("retrievable operation parameters",
159 EVP_MD_gettable_ctx_params(m
), 4);
160 print_param_types("settable operation parameters",
161 EVP_MD_settable_ctx_params(m
), 4);
164 sk_EVP_MD_pop_free(digests
, EVP_MD_free
);
167 DEFINE_STACK_OF(EVP_MAC
)
168 static int mac_cmp(const EVP_MAC
* const *a
, const EVP_MAC
* const *b
)
170 int ret
= EVP_MAC_number(*a
) - EVP_MAC_number(*b
);
173 ret
= strcmp(OSSL_PROVIDER_name(EVP_MAC_provider(*a
)),
174 OSSL_PROVIDER_name(EVP_MAC_provider(*b
)));
179 static void collect_macs(EVP_MAC
*mac
, void *stack
)
181 STACK_OF(EVP_MAC
) *mac_stack
= stack
;
183 if (sk_EVP_MAC_push(mac_stack
, mac
) > 0)
187 static void list_macs(void)
189 STACK_OF(EVP_MAC
) *macs
= sk_EVP_MAC_new(mac_cmp
);
192 BIO_printf(bio_out
, "Provided MACs:\n");
193 EVP_MAC_do_all_provided(NULL
, collect_macs
, macs
);
194 sk_EVP_MAC_sort(macs
);
195 for (i
= 0; i
< sk_EVP_MAC_num(macs
); i
++) {
196 const EVP_MAC
*m
= sk_EVP_MAC_value(macs
, i
);
197 STACK_OF(OPENSSL_CSTRING
) *names
=
198 sk_OPENSSL_CSTRING_new(name_cmp
);
200 EVP_MAC_names_do_all(m
, collect_names
, names
);
202 BIO_printf(bio_out
, " ");
203 print_names(bio_out
, names
);
204 BIO_printf(bio_out
, " @ %s\n",
205 OSSL_PROVIDER_name(EVP_MAC_provider(m
)));
207 sk_OPENSSL_CSTRING_free(names
);
210 print_param_types("retrievable algorithm parameters",
211 EVP_MAC_gettable_params(m
), 4);
212 print_param_types("retrievable operation parameters",
213 EVP_MAC_gettable_ctx_params(m
), 4);
214 print_param_types("settable operation parameters",
215 EVP_MAC_settable_ctx_params(m
), 4);
218 sk_EVP_MAC_pop_free(macs
, EVP_MAC_free
);
224 DEFINE_STACK_OF(EVP_KDF
)
225 static int kdf_cmp(const EVP_KDF
* const *a
, const EVP_KDF
* const *b
)
227 int ret
= EVP_KDF_number(*a
) - EVP_KDF_number(*b
);
230 ret
= strcmp(OSSL_PROVIDER_name(EVP_KDF_provider(*a
)),
231 OSSL_PROVIDER_name(EVP_KDF_provider(*b
)));
236 static void collect_kdfs(EVP_KDF
*kdf
, void *stack
)
238 STACK_OF(EVP_KDF
) *kdf_stack
= stack
;
240 sk_EVP_KDF_push(kdf_stack
, kdf
);
244 static void list_kdfs(void)
246 STACK_OF(EVP_KDF
) *kdfs
= sk_EVP_KDF_new(kdf_cmp
);
249 BIO_printf(bio_out
, "Provided KDFs and PDFs:\n");
250 EVP_KDF_do_all_provided(NULL
, collect_kdfs
, kdfs
);
251 sk_EVP_KDF_sort(kdfs
);
252 for (i
= 0; i
< sk_EVP_KDF_num(kdfs
); i
++) {
253 const EVP_KDF
*k
= sk_EVP_KDF_value(kdfs
, i
);
254 STACK_OF(OPENSSL_CSTRING
) *names
=
255 sk_OPENSSL_CSTRING_new(name_cmp
);
257 EVP_KDF_names_do_all(k
, collect_names
, names
);
259 BIO_printf(bio_out
, " ");
260 print_names(bio_out
, names
);
261 BIO_printf(bio_out
, " @ %s\n",
262 OSSL_PROVIDER_name(EVP_KDF_provider(k
)));
264 sk_OPENSSL_CSTRING_free(names
);
267 print_param_types("retrievable algorithm parameters",
268 EVP_KDF_gettable_params(k
), 4);
269 print_param_types("retrievable operation parameters",
270 EVP_KDF_gettable_ctx_params(k
), 4);
271 print_param_types("settable operation parameters",
272 EVP_KDF_settable_ctx_params(k
), 4);
275 sk_EVP_KDF_pop_free(kdfs
, EVP_KDF_free
);
278 static void list_missing_help(void)
283 for (fp
= functions
; fp
->name
!= NULL
; fp
++) {
284 if ((o
= fp
->help
) != NULL
) {
285 /* If there is help, list what flags are not documented. */
286 for ( ; o
->name
!= NULL
; o
++) {
287 if (o
->helpstr
== NULL
)
288 BIO_printf(bio_out
, "%s %s\n", fp
->name
, o
->name
);
290 } else if (fp
->func
!= dgst_main
) {
291 /* If not aliased to the dgst command, */
292 BIO_printf(bio_out
, "%s *\n", fp
->name
);
297 static void list_objects(void)
299 int max_nid
= OBJ_new_nid(0);
301 char *oid_buf
= NULL
;
304 /* Skip 0, since that's NID_undef */
305 for (i
= 1; i
< max_nid
; i
++) {
306 const ASN1_OBJECT
*obj
= OBJ_nid2obj(i
);
307 const char *sn
= OBJ_nid2sn(i
);
308 const char *ln
= OBJ_nid2ln(i
);
312 * If one of the retrieved objects somehow generated an error,
313 * we ignore it. The check for NID_undef below will detect the
314 * error and simply skip to the next NID.
318 if (OBJ_obj2nid(obj
) == NID_undef
)
321 if ((n
= OBJ_obj2txt(NULL
, 0, obj
, 1)) == 0) {
322 BIO_printf(bio_out
, "# None-OID object: %s, %s\n", sn
, ln
);
329 oid_buf
= OPENSSL_realloc(oid_buf
, n
+ 1);
330 if (oid_buf
== NULL
) {
331 BIO_printf(bio_err
, "ERROR: Memory allocation\n");
336 if (OBJ_obj2txt(oid_buf
, oid_size
, obj
, 1) < 0)
338 if (ln
== NULL
|| strcmp(sn
, ln
) == 0)
339 BIO_printf(bio_out
, "%s = %s\n", sn
, oid_buf
);
341 BIO_printf(bio_out
, "%s = %s, %s\n", sn
, ln
, oid_buf
);
344 OPENSSL_free(oid_buf
);
347 static void list_options_for_command(const char *command
)
352 for (fp
= functions
; fp
->name
!= NULL
; fp
++)
353 if (strcmp(fp
->name
, command
) == 0)
355 if (fp
->name
== NULL
) {
356 BIO_printf(bio_err
, "Invalid command '%s'; type \"help\" for a list.\n",
361 if ((o
= fp
->help
) == NULL
)
364 for ( ; o
->name
!= NULL
; o
++) {
367 if (o
->name
== OPT_HELP_STR
368 || o
->name
== OPT_MORE_STR
369 || o
->name
== OPT_SECTION_STR
370 || o
->name
[0] == '\0')
372 BIO_printf(bio_out
, "%s %c\n", o
->name
, c
== '\0' ? '-' : c
);
374 /* Always output the -- marker since it is sometimes documented. */
375 BIO_printf(bio_out
, "- -\n");
378 static void list_type(FUNC_TYPE ft
, int one
)
384 memset(&dc
, 0, sizeof(dc
));
386 calculate_columns(functions
, &dc
);
388 for (fp
= functions
; fp
->name
!= NULL
; fp
++) {
392 BIO_printf(bio_out
, "%s\n", fp
->name
);
394 if (i
% dc
.columns
== 0 && i
> 0)
395 BIO_printf(bio_out
, "\n");
396 BIO_printf(bio_out
, "%-*s", dc
.width
, fp
->name
);
401 BIO_printf(bio_out
, "\n\n");
404 static void list_pkey(void)
408 for (i
= 0; i
< EVP_PKEY_asn1_get_count(); i
++) {
409 const EVP_PKEY_ASN1_METHOD
*ameth
;
410 int pkey_id
, pkey_base_id
, pkey_flags
;
411 const char *pinfo
, *pem_str
;
412 ameth
= EVP_PKEY_asn1_get0(i
);
413 EVP_PKEY_asn1_get0_info(&pkey_id
, &pkey_base_id
, &pkey_flags
,
414 &pinfo
, &pem_str
, ameth
);
415 if (pkey_flags
& ASN1_PKEY_ALIAS
) {
416 BIO_printf(bio_out
, "Name: %s\n", OBJ_nid2ln(pkey_id
));
417 BIO_printf(bio_out
, "\tAlias for: %s\n",
418 OBJ_nid2ln(pkey_base_id
));
420 BIO_printf(bio_out
, "Name: %s\n", pinfo
);
421 BIO_printf(bio_out
, "\tType: %s Algorithm\n",
422 pkey_flags
& ASN1_PKEY_DYNAMIC
?
423 "External" : "Builtin");
424 BIO_printf(bio_out
, "\tOID: %s\n", OBJ_nid2ln(pkey_id
));
427 BIO_printf(bio_out
, "\tPEM string: %s\n", pem_str
);
433 static void list_pkey_meth(void)
436 size_t meth_count
= EVP_PKEY_meth_get_count();
438 for (i
= 0; i
< meth_count
; i
++) {
439 const EVP_PKEY_METHOD
*pmeth
= EVP_PKEY_meth_get0(i
);
440 int pkey_id
, pkey_flags
;
442 EVP_PKEY_meth_get0_info(&pkey_id
, &pkey_flags
, pmeth
);
443 BIO_printf(bio_out
, "%s\n", OBJ_nid2ln(pkey_id
));
444 BIO_printf(bio_out
, "\tType: %s Algorithm\n",
445 pkey_flags
& ASN1_PKEY_DYNAMIC
? "External" : "Builtin");
449 static void list_engines(void)
451 #ifndef OPENSSL_NO_ENGINE
454 BIO_puts(bio_out
, "Engines:\n");
455 e
= ENGINE_get_first();
457 BIO_printf(bio_out
, "%s\n", ENGINE_get_id(e
));
458 e
= ENGINE_get_next(e
);
461 BIO_puts(bio_out
, "Engine support is disabled.\n");
465 static void list_disabled(void)
467 BIO_puts(bio_out
, "Disabled algorithms:\n");
468 #ifdef OPENSSL_NO_ARIA
469 BIO_puts(bio_out
, "ARIA\n");
472 BIO_puts(bio_out
, "BF\n");
474 #ifdef OPENSSL_NO_BLAKE2
475 BIO_puts(bio_out
, "BLAKE2\n");
477 #ifdef OPENSSL_NO_CAMELLIA
478 BIO_puts(bio_out
, "CAMELLIA\n");
480 #ifdef OPENSSL_NO_CAST
481 BIO_puts(bio_out
, "CAST\n");
483 #ifdef OPENSSL_NO_CMAC
484 BIO_puts(bio_out
, "CMAC\n");
486 #ifdef OPENSSL_NO_CMS
487 BIO_puts(bio_out
, "CMS\n");
489 #ifdef OPENSSL_NO_COMP
490 BIO_puts(bio_out
, "COMP\n");
492 #ifdef OPENSSL_NO_DES
493 BIO_puts(bio_out
, "DES\n");
495 #ifdef OPENSSL_NO_DGRAM
496 BIO_puts(bio_out
, "DGRAM\n");
499 BIO_puts(bio_out
, "DH\n");
501 #ifdef OPENSSL_NO_DSA
502 BIO_puts(bio_out
, "DSA\n");
504 #if defined(OPENSSL_NO_DTLS)
505 BIO_puts(bio_out
, "DTLS\n");
507 #if defined(OPENSSL_NO_DTLS1)
508 BIO_puts(bio_out
, "DTLS1\n");
510 #if defined(OPENSSL_NO_DTLS1_2)
511 BIO_puts(bio_out
, "DTLS1_2\n");
514 BIO_puts(bio_out
, "EC\n");
516 #ifdef OPENSSL_NO_EC2M
517 BIO_puts(bio_out
, "EC2M\n");
519 #ifdef OPENSSL_NO_ENGINE
520 BIO_puts(bio_out
, "ENGINE\n");
522 #ifdef OPENSSL_NO_GOST
523 BIO_puts(bio_out
, "GOST\n");
525 #ifdef OPENSSL_NO_IDEA
526 BIO_puts(bio_out
, "IDEA\n");
528 #ifdef OPENSSL_NO_MD2
529 BIO_puts(bio_out
, "MD2\n");
531 #ifdef OPENSSL_NO_MD4
532 BIO_puts(bio_out
, "MD4\n");
534 #ifdef OPENSSL_NO_MD5
535 BIO_puts(bio_out
, "MD5\n");
537 #ifdef OPENSSL_NO_MDC2
538 BIO_puts(bio_out
, "MDC2\n");
540 #ifdef OPENSSL_NO_OCB
541 BIO_puts(bio_out
, "OCB\n");
543 #ifdef OPENSSL_NO_OCSP
544 BIO_puts(bio_out
, "OCSP\n");
546 #ifdef OPENSSL_NO_PSK
547 BIO_puts(bio_out
, "PSK\n");
549 #ifdef OPENSSL_NO_RC2
550 BIO_puts(bio_out
, "RC2\n");
552 #ifdef OPENSSL_NO_RC4
553 BIO_puts(bio_out
, "RC4\n");
555 #ifdef OPENSSL_NO_RC5
556 BIO_puts(bio_out
, "RC5\n");
558 #ifdef OPENSSL_NO_RMD160
559 BIO_puts(bio_out
, "RMD160\n");
561 #ifdef OPENSSL_NO_RSA
562 BIO_puts(bio_out
, "RSA\n");
564 #ifdef OPENSSL_NO_SCRYPT
565 BIO_puts(bio_out
, "SCRYPT\n");
567 #ifdef OPENSSL_NO_SCTP
568 BIO_puts(bio_out
, "SCTP\n");
570 #ifdef OPENSSL_NO_SEED
571 BIO_puts(bio_out
, "SEED\n");
573 #ifdef OPENSSL_NO_SM2
574 BIO_puts(bio_out
, "SM2\n");
576 #ifdef OPENSSL_NO_SM3
577 BIO_puts(bio_out
, "SM3\n");
579 #ifdef OPENSSL_NO_SM4
580 BIO_puts(bio_out
, "SM4\n");
582 #ifdef OPENSSL_NO_SOCK
583 BIO_puts(bio_out
, "SOCK\n");
585 #ifdef OPENSSL_NO_SRP
586 BIO_puts(bio_out
, "SRP\n");
588 #ifdef OPENSSL_NO_SRTP
589 BIO_puts(bio_out
, "SRTP\n");
591 #ifdef OPENSSL_NO_SSL3
592 BIO_puts(bio_out
, "SSL3\n");
594 #ifdef OPENSSL_NO_TLS1
595 BIO_puts(bio_out
, "TLS1\n");
597 #ifdef OPENSSL_NO_TLS1_1
598 BIO_puts(bio_out
, "TLS1_1\n");
600 #ifdef OPENSSL_NO_TLS1_2
601 BIO_puts(bio_out
, "TLS1_2\n");
603 #ifdef OPENSSL_NO_WHIRLPOOL
604 BIO_puts(bio_out
, "WHIRLPOOL\n");
607 BIO_puts(bio_out
, "ZLIB\n");
611 /* Unified enum for help and list commands. */
612 typedef enum HELPLIST_CHOICE
{
613 OPT_ERR
= -1, OPT_EOF
= 0, OPT_HELP
, OPT_ONE
, OPT_VERBOSE
,
614 OPT_COMMANDS
, OPT_DIGEST_COMMANDS
, OPT_MAC_ALGORITHMS
, OPT_OPTIONS
,
615 OPT_DIGEST_ALGORITHMS
, OPT_CIPHER_COMMANDS
, OPT_CIPHER_ALGORITHMS
,
616 OPT_PK_ALGORITHMS
, OPT_PK_METHOD
, OPT_ENGINES
, OPT_DISABLED
,
617 OPT_KDF_ALGORITHMS
, OPT_MISSING_HELP
, OPT_OBJECTS
620 const OPTIONS list_options
[] = {
622 OPT_SECTION("General"),
623 {"help", OPT_HELP
, '-', "Display this summary"},
625 OPT_SECTION("Output"),
626 {"1", OPT_ONE
, '-', "List in one column"},
627 {"verbose", OPT_VERBOSE
, '-', "Verbose listing"},
628 {"commands", OPT_COMMANDS
, '-', "List of standard commands"},
629 {"digest-commands", OPT_DIGEST_COMMANDS
, '-',
630 "List of message digest commands"},
631 {"digest-algorithms", OPT_DIGEST_ALGORITHMS
, '-',
632 "List of message digest algorithms"},
633 {"kdf-algorithms", OPT_KDF_ALGORITHMS
, '-',
634 "List of key derivation and pseudo random function algorithms"},
635 {"mac-algorithms", OPT_MAC_ALGORITHMS
, '-',
636 "List of message authentication code algorithms"},
637 {"cipher-commands", OPT_CIPHER_COMMANDS
, '-', "List of cipher commands"},
638 {"cipher-algorithms", OPT_CIPHER_ALGORITHMS
, '-',
639 "List of cipher algorithms"},
640 {"public-key-algorithms", OPT_PK_ALGORITHMS
, '-',
641 "List of public key algorithms"},
642 {"public-key-methods", OPT_PK_METHOD
, '-',
643 "List of public key methods"},
644 {"engines", OPT_ENGINES
, '-',
645 "List of loaded engines"},
646 {"disabled", OPT_DISABLED
, '-',
647 "List of disabled features"},
648 {"missing-help", OPT_MISSING_HELP
, '-',
649 "List missing detailed help strings"},
650 {"options", OPT_OPTIONS
, 's',
651 "List options for specified command"},
652 {"objects", OPT_OBJECTS
, '-',
653 "List built in objects (OID<->name mappings)"},
657 int list_main(int argc
, char **argv
)
661 int one
= 0, done
= 0;
663 unsigned int commands
:1;
664 unsigned int digest_commands
:1;
665 unsigned int digest_algorithms
:1;
666 unsigned int kdf_algorithms
:1;
667 unsigned int mac_algorithms
:1;
668 unsigned int cipher_commands
:1;
669 unsigned int cipher_algorithms
:1;
670 unsigned int pk_algorithms
:1;
671 unsigned int pk_method
:1;
672 unsigned int engines
:1;
673 unsigned int disabled
:1;
674 unsigned int missing_help
:1;
675 unsigned int objects
:1;
676 unsigned int options
:1;
679 verbose
= 0; /* Clear a possible previous call */
681 prog
= opt_init(argc
, argv
, list_options
);
682 while ((o
= opt_next()) != OPT_EOF
) {
684 case OPT_EOF
: /* Never hit, but suppresses warning */
687 BIO_printf(bio_err
, "%s: Use -help for summary.\n", prog
);
690 opt_help(list_options
);
698 case OPT_DIGEST_COMMANDS
:
699 todo
.digest_commands
= 1;
701 case OPT_DIGEST_ALGORITHMS
:
702 todo
.digest_algorithms
= 1;
704 case OPT_KDF_ALGORITHMS
:
705 todo
.kdf_algorithms
= 1;
707 case OPT_MAC_ALGORITHMS
:
708 todo
.mac_algorithms
= 1;
710 case OPT_CIPHER_COMMANDS
:
711 todo
.cipher_commands
= 1;
713 case OPT_CIPHER_ALGORITHMS
:
714 todo
.cipher_algorithms
= 1;
716 case OPT_PK_ALGORITHMS
:
717 todo
.pk_algorithms
= 1;
728 case OPT_MISSING_HELP
:
729 todo
.missing_help
= 1;
735 list_options_for_command(opt_arg());
743 if (opt_num_rest() != 0) {
744 BIO_printf(bio_err
, "Extra arguments given.\n");
749 list_type(FT_general
, one
);
750 if (todo
.digest_commands
)
751 list_type(FT_md
, one
);
752 if (todo
.digest_algorithms
)
754 if (todo
.kdf_algorithms
)
756 if (todo
.mac_algorithms
)
758 if (todo
.cipher_commands
)
759 list_type(FT_cipher
, one
);
760 if (todo
.cipher_algorithms
)
762 if (todo
.pk_algorithms
)
770 if (todo
.missing_help
)