created COMPONENT for LIST command. (#79)

Reviewed-on: http://13.234.246.121:3000/Neominds/ossl35vx69/pulls/79
Co-authored-by: siddhant <siddhant.singh@neominds.in>
Co-committed-by: siddhant <siddhant.singh@neominds.in>
This commit is contained in:
2026-07-30 20:48:00 +05:30
committed by neelimap
parent 86208d2959
commit bc24b5948d
3 changed files with 40 additions and 0 deletions
@@ -70,6 +70,14 @@ Component INCLUDE_DGST_CMD
REQUIRES INCLUDE_IPCRYPTO INCLUDE_IPCOM_SHELL_CMD
}
Component INCLUDE_LIST_CMD
{
NAME OpenSSL list shell command
SYNOPSIS This component includes the OpenSSL list shell command.
_CHILDREN FOLDER_OPENSSL_3_5_0_USE_CMDS
REQUIRES INCLUDE_IPCRYPTO INCLUDE_IPCOM_SHELL_CMD
}
Component INCLUDE_DHPARAM_CMD
{
NAME OpenSSL dhparam shell command
@@ -62,6 +62,7 @@ extern int verify_main(int argc, char ** argv);
extern int asn1parse_main(int argc, char ** argv);
extern int req_main(int argc,char *argv[]);
extern int dgst_main(int argc,char *argv[]);
extern int list_main(int argc, char **argv);
/*
* dh command has been obsoleted by dhparam since OpenSSL 1.1.1.
* extern int dh_main(int argc,char *argv[]);
@@ -187,6 +188,10 @@ static int ipcrypto_req_main(int argc,char *argv[]);
static int ipcrypto_dgst_main(int argc,char *argv[]);
#endif
#ifdef INCLUDE_LIST_CMD
static int ipcrypto_list_main(int argc, char ** argv);
#endif
#ifdef INCLUDE_DH_CMD
static int ipcrypto_dh_main(int argc,char *argv[]);
#endif
@@ -384,6 +389,14 @@ ipcrypto_dgst_main(int argc,char *argv[])
}
#endif
#ifdef INCLUDE_LIST_CMD
static int ipcrypto_list_main(int argc, char ** argv)
{
ipcrypto_cmds_startup();
return list_main(argc, argv);
}
#endif
#ifdef INCLUDE_DH_CMD
static int
ipcrypto_dh_main(int argc,char *argv[])
@@ -741,6 +754,11 @@ ipcrypto_configure(void)
#if defined(INCLUDE_DGST_CMD)
(void)ipcrypto_shell_add_cmd("dgst", "dgst [options] [file ...]", "Message Digest Calculation", ipcrypto_dgst_main);
#endif
#if defined(INCLUDE_LIST_CMD)
(void)ipcrypto_shell_add_cmd("list", "list [option]",
"lists which ciphers, providers, or other modules are available in the build",
ipcrypto_list_main);
#endif
#ifndef OPENSSL_NO_DH
#if defined(INCLUDE_DH_CMD)
@@ -26,11 +26,13 @@
#include <openssl/safestack.h>
#include <openssl/ssl.h>
#include <openssl/tls1.h>
#include <openssl/trace.h>
#include "apps.h"
#include "app_params.h"
#include "progs.h"
#include "opt.h"
#include "names.h"
#include "app_trace.h"
static int verbose = 0;
static const char *select_name = NULL;
@@ -1768,6 +1770,18 @@ int list_main(int argc, char **argv)
verbose = 0; /* Clear a possible previous call */
#ifndef OPENSSL_NO_TRACE
setup_trace(getenv("OPENSSL_TRACE"));
#endif
#if defined(OPENSSL_SYS_VXWORKS_SUPPORT)
if (bio_err == NULL)
bio_err = dup_bio_err(FORMAT_TEXT);
if (bio_out == NULL)
bio_out = dup_bio_out(FORMAT_TEXT);
#endif
prog = opt_init(argc, argv, list_options);
while ((o = opt_next()) != OPT_EOF) {
switch (o) {