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:
@@ -1,21 +1,11 @@
|
||||
/* 02comp_ipnet_ssl.cdf - IPSSL configuration file */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Wind River Systems, Inc.
|
||||
* Copyright (c) 2014, 2016, 2018, 2021-2022, 2024 Wind River Systems, Inc.
|
||||
*
|
||||
* The right to copy, distribute or otherwise make use of this software
|
||||
* may be licensed only pursuant to the terms of an applicable Wind River
|
||||
* license agreement. No license to Wind River intellectual property rights
|
||||
* is granted herein. All rights not licensed by Wind River are reserved
|
||||
* by Wind River.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
modification history
|
||||
--------------------
|
||||
01a,10sep07,mze re-added missing LINK_SYMS
|
||||
*/
|
||||
|
||||
Folder FOLDER_SSL
|
||||
{
|
||||
NAME SSL Components
|
||||
@@ -25,10 +15,14 @@ Folder FOLDER_SSL
|
||||
|
||||
Component INCLUDE_IPSSL
|
||||
{
|
||||
NAME SSL
|
||||
NAME SSL module
|
||||
_CHILDREN FOLDER_SSL
|
||||
SYNOPSIS SSL Library
|
||||
SYNOPSIS This component includes Wind River SSL in the image
|
||||
and loads the ciphers.
|
||||
CONFIGLETTES ipssl_config.c
|
||||
INIT_RTN ipssl_init();
|
||||
_INIT_ORDER usrToolsInit
|
||||
INIT_AFTER INCLUDE_IPCRYPTO
|
||||
MODULES ipssl.o
|
||||
REQUIRES INCLUDE_IPCRYPTO
|
||||
}
|
||||
@@ -37,7 +31,9 @@ Component INCLUDE_IPSSL_USE_CMDS
|
||||
{
|
||||
NAME SSL Cmds
|
||||
_CHILDREN FOLDER_SSL
|
||||
SYNOPSIS SSL Cmds
|
||||
MODULES ipssl_cmds.o
|
||||
SYNOPSIS This component enables the command-interpreter commands \
|
||||
ciphers: s_client, s_server, s_time, ssl_clt, and ssl_srv.
|
||||
LINK_SYMS ipssl_cmd_ssl_srv \
|
||||
ipssl_cmd_ssl_clt \
|
||||
s_time_main \
|
||||
@@ -46,13 +42,3 @@ Component INCLUDE_IPSSL_USE_CMDS
|
||||
REQUIRES INCLUDE_IPSSL
|
||||
}
|
||||
|
||||
Component INCLUDE_IPSSL_USE_TEST_CMDS
|
||||
{
|
||||
NAME SSL Test Cmds
|
||||
_CHILDREN FOLDER_SSL
|
||||
SYNOPSIS SSL Test Cmds
|
||||
LINK_SYMS ssltest_main
|
||||
REQUIRES INCLUDE_IPSSL
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,175 @@
|
||||
/*
|
||||
******************************************************************************
|
||||
* INTERPEAK SOURCE FILE
|
||||
*
|
||||
* Document no: @(#) $Name: VXWORKS_ITER40_2019102207 $ $RCSfile: ipssl.c,v $ $Revision: 1.18 $
|
||||
* $Source: /home/interpeak/CVSRoot/ipssl2/src/ipssl.c,v $
|
||||
* $Author: rboden $
|
||||
* $State: Exp $ $Locker: $
|
||||
*
|
||||
* Copyright Interpeak AB 2000-2004 <www.interpeak.se>. All rights reserved.
|
||||
* Design and implementation by Roger Boden <roger@interpeak.se>
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 1 DESCRIPTION
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 2 CONFIGURATION
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
#include "ipssl_config.h"
|
||||
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 3 INCLUDE FILES
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
#include <ipcom_type.h>
|
||||
#include <ipcom_cstyle.h>
|
||||
#include <ipcom_os.h>
|
||||
#include <ipcom_sock.h>
|
||||
#include <ipcom_err.h>
|
||||
#include <ipcom_clib.h>
|
||||
|
||||
#include <ipssl.h>
|
||||
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 4 DEFINES
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 5 TYPES
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 6 EXTERN PROTOTYPES
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
void ssl_load_ciphers(void);
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 7 LOCAL PROTOTYPES
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
IP_PUBLIC Ip_fd ipssl_get_stdio_fd(void);
|
||||
IP_PUBLIC const char *ipssl_version(void);
|
||||
IP_GLOBAL int SSL_library_init(void);
|
||||
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 8 DATA
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 9 STATIC FUNCTIONS
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 10 GLOBAL FUNCTIONS
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
IP_GLOBAL int
|
||||
SSL_library_init(void)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 11 PUBLIC FUNCTIONS
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
/*
|
||||
*===========================================================================
|
||||
* ipssl_create
|
||||
*===========================================================================
|
||||
*/
|
||||
IP_PUBLIC Ip_err
|
||||
ipssl_create()
|
||||
{
|
||||
ssl_load_ciphers();
|
||||
return IPCOM_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
*===========================================================================
|
||||
* ipssl_get_stdio_fd
|
||||
*===========================================================================
|
||||
*/
|
||||
IP_PUBLIC Ip_fd
|
||||
ipssl_get_stdio_fd(void)
|
||||
{
|
||||
#if IPCOM_USE_SHELL == IPCOM_SHELL_IPCOM
|
||||
Ipcom_proc *proc;
|
||||
|
||||
/* Find my shell socket. */
|
||||
proc = ipcom_proc_self();
|
||||
if(proc != IP_NULL)
|
||||
return proc->shell_fd;
|
||||
else
|
||||
return IP_INVALID_SOCKET;
|
||||
#endif
|
||||
|
||||
return ipcom_fileno(ip_stdin);
|
||||
}
|
||||
|
||||
/*
|
||||
*===========================================================================
|
||||
* ipssl_start
|
||||
*===========================================================================
|
||||
*/
|
||||
IP_PUBLIC Ip_err
|
||||
ipssl_start(void)
|
||||
{
|
||||
return IPCOM_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
*===========================================================================
|
||||
* ipssl_version
|
||||
*===========================================================================
|
||||
* Description:
|
||||
* Parameters:
|
||||
* Returns:
|
||||
*
|
||||
*/
|
||||
IP_PUBLIC const char *
|
||||
ipssl_version(void)
|
||||
{
|
||||
return "@(#) IPSSL $Name: VXWORKS_ITER40_2019102207 $ - INTERPEAK_COPYRIGHT_STRING";
|
||||
}
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* END OF FILE
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user