changes to integrate components in CDF for OpenSSL 3.5.0 shell commands. (#61)

**NOTE:** Reverted back the dependency of ip_net components like diameter and eap from IPCRYPTO to IPSSL.

Reviewed-on: http://13.234.246.121:3000/Neominds/ossl35vx69/pulls/61
Reviewed-by: Subham Gangdeb <subham.gangdeb@neominds.in>
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:42:24 +05:30
committed by neelimap
parent dc59cdaed0
commit 973af768af
16 changed files with 1262 additions and 944 deletions
@@ -1,15 +1,9 @@
/*
******************************************************************************
* INTERPEAK CONFIGURATION SOURCE FILE
* Copyright (c) 2006-2014, 2016, 2021, 2024 Wind River Systems, Inc.
*
* Document no: @(#) $Name: VXWORKS_ITER40_2019102207 $ $RCSfile: ipssl_config.c,v $ $Revision: 1.10 $
* $Source: /home/interpeak/CVSRoot/ipssl2/config/ipssl_config.c,v $
* $Author: rboden $
* $State: Exp $ $Locker: $
*
* Copyright Interpeak AB 2000-2003 <www.interpeak.se>. All rights reserved.
* Design and implementation by Roger Boden <roger@interpeak.se>
******************************************************************************
* The right to copy, distribute, modify or otherwise make use
* of this software may be licensed only pursuant to the terms
* of an applicable Wind River license agreement.
*/
@@ -24,21 +18,16 @@
* 2 INCLUDE FILES
****************************************************************************
*/
#include "ipssl.h"
#include "ipssl_config.h"
#include <ipcom_type.h>
#include <ipcom_cstyle.h>
#include <ipcom_shell.h>
#include <ipcom_os.h>
#include <ipcom_err.h>
#include <ipcrypto_util.h>
#include <ipcrypto_shell.h>
/*
****************************************************************************
* 3 DEFINES
****************************************************************************
*/
#define IPSSL_USE_TEST_CMDS
#define IPSSL_USE_CMDS
#ifdef PRJ_BUILD
@@ -48,108 +37,59 @@
#ifdef INCLUDE_IPSSL_USE_TEST_CMDS
#define IPSSL_USE_TEST_CMDS
#endif
#ifdef INCLUDE_IPSSL_USE_CMDS
#define IPSSL_USE_CMDS
#endif
#endif /* PRJ_BUILD */
#if defined(IPSSL_USE_CMDS) && !defined(IP_PORT_VXWORKS) || defined(INCLUDE_IPSSL_USE_CMDS)
/*
*===========================================================================
* IPSSL_USE_CIPHERS_CMD
*===========================================================================
* Define to include the ciphers shell command
*/
#ifndef IP_PORT_LAS
#if defined(IPSSL_USE_CMDS) && defined(INCLUDE_IPSSL_USE_CMDS)
#define IPSSL_USE_CIPHERS_CMD
#endif
/*
*===========================================================================
* IPSSL_USE_S_CLIENT_CMD
*===========================================================================
* Define to include the s_client shell command
*/
#if !defined(IP_PORT_ITRON) && !defined(IP_PORT_LAS)
#define IPSSL_USE_S_CLIENT_CMD
#endif
/*
*===========================================================================
* IPSSL_USE_S_SERVER_CMD
*===========================================================================
* Define to include the s_server shell command
*/
#if !defined(IP_PORT_ITRON) && !defined(IP_PORT_LAS)
#define IPSSL_USE_S_SERVER_CMD
#endif
/*
*===========================================================================
* IPSSL_USE_S_TIME_CMD
*===========================================================================
* Define to include the s_time shell command
*/
#ifndef IP_PORT_LAS
#define IPSSL_USE_S_TIME_CMD
#endif
/*
*===========================================================================
* IPSSL_USE_SSL_SRV_CMD
*===========================================================================
* Define to include the ssl_srv shell command
*/
#ifndef IP_PORT_LAS
#ifdef INCLUDE_IPNET
#define IPSSL_USE_SSL_SRV_CMD
#endif
/*
*===========================================================================
* IPSSL_USE_SSL_CLT_CMD
*===========================================================================
* Define to include the ssl_clt shell command
*/
#ifndef IP_PORT_LAS
#define IPSSL_USE_SSL_CLT_CMD
#endif
#endif /*INCLUDE_IPNET*/
#endif /* IPSSL_USE_CMDS */
/*
****************************************************************************
* 4 TYPES
****************************************************************************
*/
/*
****************************************************************************
* 5 EXTERN PROTOTYPES
****************************************************************************
*/
extern int ipssl_init(void);
/*
****************************************************************************
* 6 LOCAL PROTOTYPES
****************************************************************************
*/
#ifdef IPSSL_USE_CMDS
IP_PUBLIC void ipcrypto_cmds_startup(void);
void ipcrypto_cmds_startup(void);
#ifndef OPENSSL_NO_STDIO
#ifdef IPSSL_USE_CIPHERS_CMD
IP_PUBLIC int ciphers_main(int argc, char** argv);
int ciphers_main(int argc, char** argv);
#endif
#ifdef IPSSL_USE_S_CLIENT_CMD
IP_PUBLIC int s_client_main(int argc, char** argv);
int s_client_main(int argc, char** argv);
#endif
#ifdef IPSSL_USE_S_SERVER_CMD
IP_PUBLIC int s_server_main(int argc, char** argv);
int s_server_main(int argc, char** argv);
#endif
#ifdef IPSSL_USE_S_TIME_CMD
IP_PUBLIC int s_time_main(int argc, char** argv);
int s_time_main(int argc, char** argv);
#endif
#ifdef IPSSL_USE_SSL_CLT_CMD
int ipssl_cmd_ssl_clt(int argc, char** argv);
#endif
#ifdef IPSSL_USE_SSL_SRV_CMD
int ipssl_cmd_ssl_srv(int argc, char** argv);
#endif
#ifdef IPSSL_USE_TEST_CMDS
int ssltest_main(int argc, char** argv);
#endif
IP_PUBLIC Ip_err ipssl_configure(void);
#endif /*OPENSSL_NO_STDIO*/
#endif /*IPSSL_USE_CMDS*/
/*
****************************************************************************
@@ -163,48 +103,48 @@ IP_PUBLIC Ip_err ipssl_configure(void);
****************************************************************************
*/
#ifdef IPSSL_USE_CIPHERS_CMD
IP_GLOBAL int
ipssl_ciphers(int argc, char** argv)
{
ipcrypto_cmds_startup();
return ciphers_main(argc, argv);
}
#endif
#ifdef IPSSL_USE_S_TIME_CMD
IP_GLOBAL int
ipssl_s_time(int argc, char** argv)
{
ipcrypto_cmds_startup();
return s_time_main(argc, argv);
}
#endif
#ifdef IPSSL_USE_S_CLIENT_CMD
IP_GLOBAL int
ipssl_s_client(int argc, char** argv)
{
ipcrypto_cmds_startup();
return s_client_main(argc, argv);
}
#endif
#ifdef IPSSL_USE_S_SERVER_CMD
IP_GLOBAL int
ipssl_s_server(int argc, char** argv)
{
ipcrypto_cmds_startup();
return s_server_main(argc, argv);
}
#endif
/*
****************************************************************************
* 9 GLOBAL FUNCTIONS
****************************************************************************
*/
#if defined(IPSSL_USE_CIPHERS_CMD) && !defined(OPENSSL_NO_STDIO)
int
ipssl_ciphers(int argc, char** argv)
{
ipcrypto_cmds_startup();
return ciphers_main(argc, argv);
}
#endif
#if defined(IPSSL_USE_S_TIME_CMD) && !defined(OPENSSL_NO_STDIO)
int
ipssl_s_time(int argc, char** argv)
{
ipcrypto_cmds_startup();
return s_time_main(argc, argv);
}
#endif
#if defined(IPSSL_USE_S_CLIENT_CMD) && !defined(OPENSSL_NO_STDIO)
int
ipssl_s_client(int argc, char** argv)
{
ipcrypto_cmds_startup();
return s_client_main(argc, argv);
}
#endif
#if defined(IPSSL_USE_S_SERVER_CMD) && !defined(OPENSSL_NO_STDIO)
int
ipssl_s_server(int argc, char** argv)
{
ipcrypto_cmds_startup();
return s_server_main(argc, argv);
}
#endif
/*
****************************************************************************
* 10 PUBLIC FUNCTIONS
@@ -216,41 +156,36 @@ ipssl_s_server(int argc, char** argv)
* ipssl_configure
*===========================================================================
*/
IP_PUBLIC Ip_err
int
ipssl_configure(void)
{
#ifndef OPENSSL_NO_STDIO
#ifdef IPSSL_USE_CIPHERS_CMD
ipcom_shell_add_cmd("ciphers", "ciphers", "SSL Cipher Suites", ipssl_ciphers,
IPCOM_PRIORITY_DEFAULT, IPCOM_PROC_STACK_MAX);
(void)ipcrypto_shell_add_cmd("ciphers", "ciphers", "SSL Cipher Suites", ipssl_ciphers);
#endif
#ifdef IPSSL_USE_S_CLIENT_CMD
ipcom_shell_add_cmd("s_client", "s_client", "SSL client", ipssl_s_client,
IPCOM_PRIORITY_DEFAULT, IPCOM_PROC_STACK_MAX);
(void)ipcrypto_shell_add_cmd("s_client", "s_client", "SSL client", ipssl_s_client);
#endif
#ifdef IPSSL_USE_S_SERVER_CMD
ipcom_shell_add_cmd("s_server", "s_server", "SSL server", ipssl_s_server,
IPCOM_PRIORITY_DEFAULT, IPCOM_PROC_STACK_MAX);
(void)ipcrypto_shell_add_cmd("s_server", "s_server", "SSL server", ipssl_s_server);
#endif
#ifdef IPSSL_USE_S_TIME_CMD
ipcom_shell_add_cmd("s_time", "s_time", "Time SSL connection", ipssl_s_time,
IPCOM_PRIORITY_DEFAULT, IPCOM_PROC_STACK_MAX);
(void)ipcrypto_shell_add_cmd("s_time", "s_time", "Time SSL connection", ipssl_s_time);
#endif
#ifdef _WRS_CONFIG_IPNET_COREIP
#ifdef IPSSL_USE_SSL_CLT_CMD
ipcom_shell_add_cmd("ssl_clt", "ssl_clt", "SSL client for performance measurements ", ipssl_cmd_ssl_clt,
IPCOM_PRIORITY_DEFAULT, IPCOM_PROC_STACK_MAX);
(void)ipcrypto_shell_add_cmd("ssl_clt", "ssl_clt", "SSL client for performance measurements ", ipssl_cmd_ssl_clt);
#endif
#ifdef IPSSL_USE_SSL_SRV_CMD
ipcom_shell_add_cmd("ssl_srv", "ssl_srv", "SSL server for performance measurements ", ipssl_cmd_ssl_srv,
IPCOM_PRIORITY_DEFAULT, IPCOM_PROC_STACK_MAX);
(void)ipcrypto_shell_add_cmd("ssl_srv", "ssl_srv", "SSL server for performance measurements ", ipssl_cmd_ssl_srv);
#endif
#ifdef IPSSL_USE_TEST_CMDS
ipcom_shell_add_cmd("ssltest", "ssltest", "ssltest", ssltest_main,
IPCOM_PRIORITY_DEFAULT, (64*1024-1));
#endif /*_WRS_CONFIG_IPNET_COREIP*/
#endif
return IPCOM_SUCCESS;
return 0;
}
@@ -259,4 +194,3 @@ ipssl_configure(void)
* END OF FILE
****************************************************************************
*/