Changes done for unlinking OpenSSL 0.9.8 and OpenSSL 1.0.2 from build (#57)
This PR updates the build to succeed without relying on existing OpenSSL versions. Changes include: 1. Removed OpenSSL 0.9.8 and 1.0.2 components from VSB configuration 2. Removed ipcrypto and ipssl from ipnet root Makefile (ipComps and VARLIST) 3. Updated ipcom/src/ipcom_auth.c for compatibility with OpenSSL 3.5.0 4. Added OpenSSL 3.5.0 include paths where required 5. Removed script from vxworks.krnl.mak which was renaming old OpenSSL library files 6. Removed script from ossl350_prepare/Makefile which was copying OpenSSL 3.5.0 headers to target/h 7. Adapted OpenSSL 3.5.0 headers to ipcom types during build 8. Modified ipnet CDF to switch dependency from INCLUDE_IPSSL to INCLUDE_IPCRYPTO 9. Components: WebCli and NTP are by default disabled Note : There may still be build issues, as target/h/openssl and old OpenSSL source files remain in master. Co-authored-by: subhamgdeb <subhamgdeb> Reviewed-on: http://13.234.246.121:3000/Neominds/ossl35vx69/pulls/57 Reviewed-by: Siddhant Singh <siddhant.singh@neominds.in> Co-authored-by: Subham <subham.gangdeb@neominds.in> Co-committed-by: Subham <subham.gangdeb@neominds.in>
This commit is contained in:
@@ -74,6 +74,16 @@ extern "C" {
|
||||
* 5 TYPES
|
||||
****************************************************************************
|
||||
*/
|
||||
#ifdef IPCRYPTO_USE_TYPE_MAPPING
|
||||
typedef struct _AES_CMAC_CONTEXT
|
||||
{
|
||||
Ip_u8 IV[AES_BLOCKSIZE]; /* IV initialization vector */
|
||||
Ip_u32 ivLength; /* IV length */
|
||||
Ip_u8 k1[AES_BLOCKSIZE]; /* k1 subkey */
|
||||
Ip_u8 k2[AES_BLOCKSIZE]; /* k2 subkey */
|
||||
AES_KEY aesKey; /* AES_KEY used for cipher */
|
||||
} AES_CMAC_CTX;
|
||||
#endif
|
||||
|
||||
/* Forward declaration */
|
||||
struct env_md_st;
|
||||
|
||||
@@ -48,6 +48,7 @@ ifdef _WRS_CONFIG_COMPONENT_IPSSL
|
||||
OBJS += wrProxySslLib.o
|
||||
|
||||
override ADDED_CFLAGS += -D_WRS_CONFIG_SSL
|
||||
EXTRA_INCLUDE += -I$(VSB_DIR)/3pp/openssl-3.5.0/include
|
||||
|
||||
# wrProxySslLib.c needs ipnet header files, this is the way to reach them
|
||||
|
||||
|
||||
@@ -22,10 +22,14 @@ use OpenSSL::stackhash qw(generate_stack_macros);
|
||||
# define HEADER_ASN1_H
|
||||
# endif
|
||||
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
# include <stdio.h>
|
||||
# if defined(IPCRYPTO_USE_TYPE_MAPPING)
|
||||
# include <ipcrypto_iptype_map.h>
|
||||
# else
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
# include <stdio.h>
|
||||
# endif
|
||||
# include <time.h>
|
||||
# endif
|
||||
# include <time.h>
|
||||
# include <openssl/e_os2.h>
|
||||
# include <openssl/opensslconf.h>
|
||||
# include <openssl/bio.h>
|
||||
|
||||
@@ -23,8 +23,12 @@ use OpenSSL::stackhash qw(generate_stack_macros);
|
||||
|
||||
# include <openssl/e_os2.h>
|
||||
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
# include <stdio.h>
|
||||
# if defined(IPCRYPTO_USE_TYPE_MAPPING)
|
||||
# include <ipcrypto_iptype_map.h>
|
||||
# else
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
# include <stdio.h>
|
||||
# endif
|
||||
# endif
|
||||
# include <stdarg.h>
|
||||
|
||||
|
||||
@@ -18,8 +18,12 @@
|
||||
# endif
|
||||
|
||||
# include <openssl/e_os2.h>
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
# include <stdio.h>
|
||||
# if defined(IPCRYPTO_USE_TYPE_MAPPING)
|
||||
# include <ipcrypto_iptype_map.h>
|
||||
# else
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
# include <stdio.h>
|
||||
# endif
|
||||
# endif
|
||||
# include <openssl/opensslconf.h>
|
||||
# include <openssl/types.h>
|
||||
|
||||
@@ -28,8 +28,12 @@ use OpenSSL::stackhash qw(generate_stack_macros generate_lhash_macros);
|
||||
# include <openssl/e_os2.h>
|
||||
# include <openssl/types.h>
|
||||
# include <openssl/conferr.h>
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
# include <stdio.h>
|
||||
# if defined(IPCRYPTO_USE_TYPE_MAPPING)
|
||||
# include <ipcrypto_iptype_map.h>
|
||||
# else
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
# include <stdio.h>
|
||||
# endif
|
||||
# endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -24,12 +24,16 @@ use OpenSSL::stackhash qw(generate_stack_macros);
|
||||
# endif
|
||||
|
||||
# include <stdlib.h>
|
||||
# include <time.h>
|
||||
|
||||
# include <openssl/e_os2.h>
|
||||
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
# include <stdio.h>
|
||||
# if defined(IPCRYPTO_USE_TYPE_MAPPING)
|
||||
# include <ipcrypto_iptype_map.h>
|
||||
# else
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
# include <stdio.h>
|
||||
# endif
|
||||
# include <time.h>
|
||||
# endif
|
||||
|
||||
# include <openssl/safestack.h>
|
||||
|
||||
@@ -13,8 +13,12 @@
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
# include <stdio.h>
|
||||
# if defined(IPCRYPTO_USE_TYPE_MAPPING)
|
||||
# include <ipcrypto_iptype_map.h>
|
||||
# else
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
# include <stdio.h>
|
||||
# endif
|
||||
# endif
|
||||
# include <stdarg.h>
|
||||
# include <stddef.h>
|
||||
|
||||
@@ -83,8 +83,12 @@ int EVP_PKEY_CTX_get0_dh_kdf_ukm(EVP_PKEY_CTX *ctx, unsigned char **ukm);
|
||||
# define EVP_PKEY_DH_KDF_NONE 1
|
||||
# define EVP_PKEY_DH_KDF_X9_42 2
|
||||
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
# include <stdio.h>
|
||||
# if defined(IPCRYPTO_USE_TYPE_MAPPING)
|
||||
# include <ipcrypto_iptype_map.h>
|
||||
# else
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
# include <stdio.h>
|
||||
# endif
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_DH
|
||||
# include <openssl/e_os2.h>
|
||||
|
||||
@@ -31,8 +31,12 @@
|
||||
# include <openssl/dh.h>
|
||||
# endif
|
||||
# include <openssl/dsaerr.h>
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
# include <stdio.h>
|
||||
# if defined(IPCRYPTO_USE_TYPE_MAPPING)
|
||||
# include <ipcrypto_iptype_map.h>
|
||||
# else
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
# include <stdio.h>
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
|
||||
|
||||
@@ -224,7 +224,6 @@ extern "C" {
|
||||
# endif
|
||||
|
||||
/* Standard integer types */
|
||||
# define OPENSSL_NO_INTTYPES_H
|
||||
# define OPENSSL_NO_STDINT_H
|
||||
# if defined(OPENSSL_SYS_UEFI)
|
||||
typedef INT8 int8_t;
|
||||
@@ -239,13 +238,11 @@ typedef UINTN uintptr_t;
|
||||
# elif (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \
|
||||
defined(__osf__) || defined(__sgi) || defined(__hpux) || \
|
||||
defined(OPENSSL_SYS_VMS) || defined (__OpenBSD__)
|
||||
# include <inttypes.h>
|
||||
# undef OPENSSL_NO_INTTYPES_H
|
||||
/* Because the specs say that inttypes.h includes stdint.h if present */
|
||||
# include <stdint.h>
|
||||
# undef OPENSSL_NO_STDINT_H
|
||||
# elif defined(_MSC_VER) && _MSC_VER<1600
|
||||
/*
|
||||
* minimally required typdefs for systems not supporting inttypes.h or
|
||||
* minimally required typdefs for systems not supporting
|
||||
* stdint.h: currently just older VC++
|
||||
*/
|
||||
typedef signed char int8_t;
|
||||
|
||||
@@ -88,8 +88,12 @@ typedef enum {
|
||||
|
||||
const char *OSSL_EC_curve_nid2name(int nid);
|
||||
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
# include <stdio.h>
|
||||
# if defined(IPCRYPTO_USE_TYPE_MAPPING)
|
||||
# include <ipcrypto_iptype_map.h>
|
||||
# else
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
# include <stdio.h>
|
||||
# endif
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_EC
|
||||
# include <openssl/asn1.h>
|
||||
|
||||
@@ -13,8 +13,12 @@
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
# include <stdio.h>
|
||||
# if defined(IPCRYPTO_USE_TYPE_MAPPING)
|
||||
# include <ipcrypto_iptype_map.h>
|
||||
# else
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
# include <stdio.h>
|
||||
# endif
|
||||
# endif
|
||||
# include <stdarg.h>
|
||||
# include <stddef.h>
|
||||
|
||||
@@ -22,9 +22,13 @@ use OpenSSL::stackhash qw(generate_lhash_macros);
|
||||
|
||||
# include <openssl/e_os2.h>
|
||||
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
# include <stdio.h>
|
||||
# include <stdlib.h>
|
||||
# if defined(IPCRYPTO_USE_TYPE_MAPPING)
|
||||
# include <ipcrypto_iptype_map.h>
|
||||
# else
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
# include <stdio.h>
|
||||
# include <stdlib.h>
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# include <openssl/types.h>
|
||||
|
||||
@@ -18,8 +18,12 @@
|
||||
|
||||
# include <stdarg.h>
|
||||
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
# include <stdio.h>
|
||||
# if defined(IPCRYPTO_USE_TYPE_MAPPING)
|
||||
# include <ipcrypto_iptype_map.h>
|
||||
# else
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
# include <stdio.h>
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
|
||||
@@ -26,8 +26,12 @@ use OpenSSL::stackhash qw(generate_lhash_macros);
|
||||
|
||||
# include <openssl/e_os2.h>
|
||||
# include <openssl/bio.h>
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
# include <stdio.h>
|
||||
# if defined(IPCRYPTO_USE_TYPE_MAPPING)
|
||||
# include <ipcrypto_iptype_map.h>
|
||||
# else
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
# include <stdio.h>
|
||||
# endif
|
||||
# endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -22,8 +22,12 @@
|
||||
# include <openssl/evp.h>
|
||||
# include <openssl/x509.h>
|
||||
# include <openssl/pemerr.h>
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
# include <stdio.h>
|
||||
# if defined(IPCRYPTO_USE_TYPE_MAPPING)
|
||||
# include <ipcrypto_iptype_map.h>
|
||||
# else
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
# include <stdio.h>
|
||||
# endif
|
||||
# endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -26,8 +26,12 @@ use OpenSSL::stackhash qw(generate_stack_macros);
|
||||
# include <openssl/core.h>
|
||||
# include <openssl/x509.h>
|
||||
# include <openssl/pkcs12err.h>
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
# include <stdio.h>
|
||||
# if defined(IPCRYPTO_USE_TYPE_MAPPING)
|
||||
# include <ipcrypto_iptype_map.h>
|
||||
# else
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
# include <stdio.h>
|
||||
# endif
|
||||
# endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -29,8 +29,12 @@ use OpenSSL::stackhash qw(generate_stack_macros);
|
||||
# include <openssl/symhacks.h>
|
||||
# include <openssl/types.h>
|
||||
# include <openssl/pkcs7err.h>
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
# include <stdio.h>
|
||||
# if defined(IPCRYPTO_USE_TYPE_MAPPING)
|
||||
# include <ipcrypto_iptype_map.h>
|
||||
# else
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
# include <stdio.h>
|
||||
# endif
|
||||
# endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -27,8 +27,12 @@
|
||||
# endif
|
||||
# include <openssl/rsaerr.h>
|
||||
# include <openssl/safestack.h>
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
# include <stdio.h>
|
||||
# if defined(IPCRYPTO_USE_TYPE_MAPPING)
|
||||
# include <ipcrypto_iptype_map.h>
|
||||
# else
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
# include <stdio.h>
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# ifdef __cplusplus
|
||||
|
||||
@@ -29,7 +29,11 @@ use OpenSSL::stackhash qw(generate_stack_macros);
|
||||
#include <openssl/opensslconf.h>
|
||||
|
||||
#ifndef OPENSSL_NO_SRP
|
||||
# include <stdio.h>
|
||||
# if defined(IPCRYPTO_USE_TYPE_MAPPING)
|
||||
# include <ipcrypto_iptype_map.h>
|
||||
# else
|
||||
# include <stdio.h>
|
||||
# endif
|
||||
# include <string.h>
|
||||
# include <openssl/safestack.h>
|
||||
# include <openssl/bn.h>
|
||||
|
||||
@@ -32,8 +32,12 @@
|
||||
# include <openssl/ess.h>
|
||||
# include <openssl/x509.h>
|
||||
# include <openssl/x509v3.h>
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
# include <stdio.h>
|
||||
# if defined(IPCRYPTO_USE_TYPE_MAPPING)
|
||||
# include <ipcrypto_iptype_map.h>
|
||||
# else
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
# include <stdio.h>
|
||||
# endif
|
||||
# endif
|
||||
# ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
@@ -41,8 +41,12 @@ use OpenSSL::stackhash qw(generate_stack_macros);
|
||||
|
||||
# include <openssl/sha.h>
|
||||
# include <openssl/x509err.h>
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
# include <stdio.h>
|
||||
# if defined(IPCRYPTO_USE_TYPE_MAPPING)
|
||||
# include <ipcrypto_iptype_map.h>
|
||||
# else
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
# include <stdio.h>
|
||||
# endif
|
||||
# endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -26,8 +26,12 @@ use OpenSSL::stackhash qw(generate_stack_macros);
|
||||
# include <openssl/x509.h>
|
||||
# include <openssl/conf.h>
|
||||
# include <openssl/x509v3err.h>
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
# include <stdio.h>
|
||||
# if defined(IPCRYPTO_USE_TYPE_MAPPING)
|
||||
# include <ipcrypto_iptype_map.h>
|
||||
# else
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
# include <stdio.h>
|
||||
# endif
|
||||
# endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -30,6 +30,7 @@ EXTRA_INCLUDE += -I$(IPCOM_DIR)/config
|
||||
EXTRA_INCLUDE += -I$(IPCOM_DIR)/port/vxworks/config
|
||||
EXTRA_INCLUDE += -I$(IPCOM_DIR)/port/vxworks/include
|
||||
EXTRA_INCLUDE += -I$(TGT_DIR)/h/security
|
||||
EXTRA_INCLUDE += -I$(VSB_DIR)/3pp/openssl-3.5.0/include
|
||||
|
||||
ifneq ($(SPACE),user)
|
||||
OBJS = ipcrypto_cmd_cmp.o
|
||||
|
||||
@@ -16,6 +16,7 @@ LIB_FORMAT = both
|
||||
|
||||
include $(WIND_BASE)/target/h/make/defs.library
|
||||
|
||||
EXTRA_INCLUDE += -I$(VSB_DIR)/3pp/openssl-3.5.0/include
|
||||
EXTRA_INCLUDE += -I$(TGT_DIR)/h/security
|
||||
|
||||
EXTRA_DEFINE += -D_WRS_CONFIG_OPENSSL
|
||||
|
||||
@@ -84,7 +84,5 @@ install:
|
||||
mv providers/libcommon.a $(VSB_DIR)/$(VX_CPU_FAMILY)/$(CPU)/common/
|
||||
mv providers/libdefault.a $(VSB_DIR)/$(VX_CPU_FAMILY)/$(CPU)/common/
|
||||
mv providers/liblegacy.a $(VSB_DIR)/$(VX_CPU_FAMILY)/$(CPU)/common/
|
||||
cd $(VSB_DIR)/$(VX_CPU_FAMILY)/$(CPU)/common && mv libipcrypto.a libipcrypto._a
|
||||
cd $(VSB_DIR)/$(VX_CPU_FAMILY)/$(CPU)/common && mv libipcrypto_apps.a libipcrypto_apps._a
|
||||
cd $(VSB_DIR)/$(VX_CPU_FAMILY)/$(CPU)/common && mv libipssl.a libipssl._a
|
||||
|
||||
|
||||
|
||||
@@ -160,6 +160,8 @@ LIB_BASE_NAME = os
|
||||
# It must be after LIB_BASE_NAME
|
||||
include $(TGT_DIR)/h/make/defs.library
|
||||
|
||||
EXTRA_INCLUDE += -I$(VSB_DIR)/3pp/openssl-3.5.0/include
|
||||
|
||||
DOC_FILES= clockLib.c cpuset.c \
|
||||
edrLib.c edrShow.c edrSysDbgLib.c edrErrLogLib.c \
|
||||
envLib.c errnoLib.c excLib.c ffsLib.c hashLib.c intLib.c \
|
||||
|
||||
@@ -27,6 +27,8 @@ EXTRA_INCLUDE += -I$(IPCOM_DIR)/include
|
||||
EXTRA_INCLUDE += -I$(IPCOM_DIR)/config
|
||||
EXTRA_INCLUDE += -I$(IPCOM_DIR)/port/vxworks/config
|
||||
EXTRA_INCLUDE += -I$(IPCOM_DIR)/port/vxworks/include
|
||||
EXTRA_INCLUDE += -I$(VSB_DIR)/3pp/openssl-3.5.0/include
|
||||
|
||||
ifdef _WRS_CONFIG_CORE__BANNED_H
|
||||
ADDED_CFLAGS += -include banned.h
|
||||
endif
|
||||
|
||||
@@ -26,11 +26,4 @@ generate-headers:
|
||||
@if [ -d "$(INTERNAL_DST_DIR)" ]; then \
|
||||
rm -r $(INTERNAL_DST_DIR);\
|
||||
fi
|
||||
mkdir -p $(OPENSSL_DST_DIR)
|
||||
mkdir -p $(CRYPTO_DST_DIR)
|
||||
mkdir -p $(INTERNAL_DST_DIR)
|
||||
cp -r $(OSSL_BUILD_DIR)/include/openssl $(TGT_DIR)/h
|
||||
cp -r $(OSSL_BUILD_DIR)/include/crypto $(TGT_DIR)/h
|
||||
cp -r $(OSSL_BUILD_DIR)/include/internal $(TGT_DIR)/h
|
||||
cp -r $(OSSL_BUILD_DIR)/crypto/evp/evp_local.h $(OPENSSL_DST_DIR)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user