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:
@@ -205,7 +205,6 @@ _VARLIST = \
|
||||
COMPONENT_IPWPS \
|
||||
COMPONENT_IPAPPL \
|
||||
COMPONENT_IPCAVIUM \
|
||||
COMPONENT_IPCRYPTO \
|
||||
COMPONENT_IPXINC \
|
||||
COMPONENT_IPDHCPC6 \
|
||||
COMPONENT_IPDHCPR \
|
||||
@@ -241,7 +240,6 @@ _VARLIST = \
|
||||
COMPONENT_IPRIPNG \
|
||||
COMPONENT_IPSNTP \
|
||||
COMPONENT_IPSSH \
|
||||
COMPONENT_IPSSL \
|
||||
COMPONENT_IPTCP \
|
||||
COMPONENT_IPSCTP \
|
||||
COMPONENT_WLAN \
|
||||
@@ -362,7 +360,6 @@ IpComps := \
|
||||
IPAPPLDIR.ipappl \
|
||||
IPCAVIUMDIR.ipcavium \
|
||||
IPCOMDIR.ipcom \
|
||||
IPCRYPTODIR.ipcrypto \
|
||||
IPDHCPC6DIR.ipdhcpc6 \
|
||||
IPDHCPRDIR.ipdhcpr \
|
||||
IPDHCPS6DIR.ipdhcps6 \
|
||||
@@ -402,7 +399,6 @@ IpComps := \
|
||||
IPSCTPDIR.ipsctp \
|
||||
IPSNTPDIR.ipsntp \
|
||||
IPSSHDIR.ipssh \
|
||||
IPSSL2DIR.ipssl2 \
|
||||
IPTCPDIR.iptcp \
|
||||
IPWLANDIR.ipwlan \
|
||||
IPWPSDIR.ipwps \
|
||||
|
||||
@@ -743,7 +743,7 @@ config IPFTP_USE_TLS
|
||||
bool "Enable FTP with TLS"
|
||||
default n
|
||||
depends on COMPONENT_IPAPPL && MSP_KERNEL
|
||||
select COMPONENT_IPSSL
|
||||
select COMPONENT_IPCRYPTO
|
||||
help
|
||||
Enable FTP with TLS
|
||||
|
||||
@@ -876,7 +876,7 @@ menu "Diameter Components"
|
||||
|
||||
config IPDIAMETER_SEC_KEY_DB
|
||||
bool "Enable DIAMETER Secure key DB "
|
||||
depends on (COMPONENT_IPDIAMETERP || COMPONENT_IPDIAMETERC) && COMPONENT_IPSSL
|
||||
depends on (COMPONENT_IPDIAMETERP || COMPONENT_IPDIAMETERC) && COMPONENT_IPCRYPTO
|
||||
default n
|
||||
help
|
||||
This option enables Secure Key database support for Diameter components.
|
||||
@@ -1159,7 +1159,7 @@ config IPSNTP_SYSLOG_PRIORITY
|
||||
#
|
||||
config COMPONENT_IPNTP
|
||||
bool "Enable NTP"
|
||||
default y
|
||||
default n
|
||||
depends on !FEATURE_IPNET_INET6_ONLY && (MSP_KERNEL || MSP_RTP) && COMPONENT_IPSNTP && SUPPORTS_NTP
|
||||
help
|
||||
This option enables the Network Time protocol (NTP / RFC 1305) component.
|
||||
@@ -1331,22 +1331,6 @@ config COMPONENT_IPCRYPTO
|
||||
help
|
||||
This option enables ipcrypto, a port of the openssl encryption library, excluding the SSL part which is found in the ipssl component. If this option is deselected INCLUDE_IPCRYPTO, INCLUDE_IPCRYPTO_USE_CMDS and INCLUDE_IPCRYPTO_USE_TEST_CMDS will not be available in a VxWorks Image Project (VIP).
|
||||
|
||||
choice
|
||||
prompt "Select openssl version to be built"
|
||||
depends on COMPONENT_IPCRYPTO
|
||||
default COMPONENT_IPCRYPTO_OPENSSL_1_0_2
|
||||
|
||||
config COMPONENT_IPCRYPTO_OPENSSL_0_9_8
|
||||
bool "Build openssl-0_9_8"
|
||||
help
|
||||
Select to build openssl-0_9_8
|
||||
|
||||
config COMPONENT_IPCRYPTO_OPENSSL_1_0_2
|
||||
bool "Build openssl-1_0_2"
|
||||
help
|
||||
Select to build openssl-1_0_2 without fips-140-2.
|
||||
endchoice
|
||||
|
||||
config COMPONENT_IPCRYPTO_USE_FIPS_140_2
|
||||
bool "Enable FIPS 140-2 validated crypto libraries"
|
||||
depends on MSP_KERNEL && !FEATURE_IPNET_INET6_ONLY && COMPONENT_IPCRYPTO_OPENSSL_0_9_8 && !DEFAULT_SIT_NB
|
||||
@@ -1472,7 +1456,7 @@ config IPEAP_USE_EAP_PEAP
|
||||
bool "Enable EAP PEAP"
|
||||
default y
|
||||
depends on COMPONENT_IPEAP
|
||||
select COMPONENT_IPSSL
|
||||
select COMPONENT_IPCRYPTO
|
||||
help
|
||||
This option enables EAP_PEAP support.
|
||||
|
||||
@@ -1494,18 +1478,18 @@ config IPEAP_USE_EAP_TLS
|
||||
bool "Enable EAP TLS"
|
||||
default y
|
||||
depends on COMPONENT_IPEAP
|
||||
select COMPONENT_IPSSL
|
||||
select COMPONENT_IPCRYPTO
|
||||
help
|
||||
This option enables EAP_TLS support.
|
||||
|
||||
|
||||
comment "EAP TTLS requires COMPONENT_IPSSL to be selected"
|
||||
depends on COMPONENT_IPEAP && !IPEAP_USE_EAP_TTLS && !COMPONENT_IPSSL
|
||||
comment "EAP TTLS requires COMPONENT_IPCRYPTO to be selected"
|
||||
depends on COMPONENT_IPEAP && !IPEAP_USE_EAP_TTLS && !COMPONENT_IPCRYPTO
|
||||
|
||||
config IPEAP_USE_EAP_TTLS
|
||||
bool "Enable EAP TTLS"
|
||||
default y
|
||||
depends on COMPONENT_IPEAP && COMPONENT_IPSSL
|
||||
depends on COMPONENT_IPEAP && COMPONENT_IPCRYPTO
|
||||
help
|
||||
This option enables EAP_TTLS support.
|
||||
|
||||
@@ -1538,7 +1522,7 @@ config IPEAP_USE_EAP_COMMON_TLS
|
||||
config IPEAP_USE_EAP_COMMON_SIM
|
||||
bool
|
||||
default y if IPEAP_USE_EAP_SIM || IPEAP_USE_EAP_AKA
|
||||
select COMPONENT_IPSSL
|
||||
select COMPONENT_IPCRYPTO
|
||||
help
|
||||
This is a hidden component and will be selected if EAP SIM, and/or EAP AKA will be selected.
|
||||
#
|
||||
|
||||
@@ -141,7 +141,7 @@ Component INCLUDE_IPFTPS_TLS {
|
||||
NAME FTP Server with TLS
|
||||
SYNOPSIS FTP Server with TLS
|
||||
MODULES ipftps_tls.o
|
||||
REQUIRES INCLUDE_IPFTPS INCLUDE_IPSSL
|
||||
REQUIRES INCLUDE_IPFTPS INCLUDE_IPCRYPTO
|
||||
CFG_PARAMS FTPS_TLS FTPS_TLS_CERT_FILE FTPS_TLS_KEY_FILE FTPS_TLS_SECRECT_KEY\
|
||||
ENABLE_ADVANCE_FTPS_KEY_PRIVACY
|
||||
_CHILDREN FOLDER_FTP
|
||||
@@ -678,7 +678,7 @@ Parameter ENABLE_ADVANCE_FTPS_KEY_PRIVACY {
|
||||
Parameter FTPS_TLS_KEY_FILE {
|
||||
NAME TLS key file
|
||||
SYNOPSIS
|
||||
REQUIRES INCLUDE_IPSSL
|
||||
REQUIRES INCLUDE_IPCRYPTO
|
||||
TYPE char *
|
||||
DEFAULT ""
|
||||
}
|
||||
@@ -686,7 +686,7 @@ Parameter FTPS_TLS_KEY_FILE {
|
||||
Parameter FTPS_TLS_CERT_FILE {
|
||||
NAME TLS certificate file
|
||||
SYNOPSIS
|
||||
REQUIRES INCLUDE_IPSSL
|
||||
REQUIRES INCLUDE_IPCRYPTO
|
||||
TYPE char *
|
||||
DEFAULT ""
|
||||
}
|
||||
@@ -694,7 +694,7 @@ Parameter FTPS_TLS_CERT_FILE {
|
||||
Parameter FTPS_TLS {
|
||||
NAME Enable FTP server with TLS
|
||||
SYNOPSIS
|
||||
REQUIRES INCLUDE_IPSSL
|
||||
REQUIRES INCLUDE_IPCRYPTO
|
||||
TYPE char *
|
||||
DEFAULT "0"
|
||||
}
|
||||
@@ -702,7 +702,7 @@ Parameter FTPS_TLS {
|
||||
Parameter FTPS_TLS_SECRECT_KEY {
|
||||
NAME TLS secret key
|
||||
SYNOPSIS
|
||||
REQUIRES INCLUDE_IPSSL
|
||||
REQUIRES INCLUDE_IPCRYPTO
|
||||
TYPE char *
|
||||
DEFAULT ""
|
||||
}
|
||||
|
||||
@@ -30,6 +30,8 @@ endif
|
||||
# COMPILATION DEFAULTS
|
||||
#############################################################################
|
||||
|
||||
IPIPDEFINE=-DIPCRYPTO_USE_TYPE_MAPPING
|
||||
|
||||
IPLD = $(IPCC)
|
||||
ifeq ("$(IPCOMPILER)","shc")
|
||||
IPCCOUT = -object=$@
|
||||
@@ -292,6 +294,7 @@ IPCFLAGS += -include=$(dir $<)$(IPLIBINC)$(IPINC)
|
||||
else
|
||||
IPDEF := $(IPDEFINE)
|
||||
IPINC := $(IPINCLUDE)
|
||||
|
||||
ifeq ($(IPPORT),vxworks)
|
||||
# Avoid including OpenSSL files from the VxWorks distribution
|
||||
IPCFLAGS := $(IPINC) $(IPLIBINC) $(IPEXTRACFLAGS) $(IPCFLAGS)
|
||||
@@ -304,6 +307,7 @@ endif
|
||||
# generic
|
||||
IPCFLAGS += $(IPDEF) $(IPLIBDEF)
|
||||
IPCFLAGS += $(IPLIBFLAG)
|
||||
IPCFLAGS += -I$(VSB_DIR)/3pp/openssl-3.5.0/include
|
||||
|
||||
|
||||
#############################################################################
|
||||
|
||||
@@ -222,22 +222,31 @@ IP_STATIC Ip_err ipcom_auth_userid_get(Ip_uid_t *userid)
|
||||
IP_STATIC Ip_err ipcom_auth_decode(const Ip_u8* in, int inl,
|
||||
Ip_u8* out, int* outl)
|
||||
{
|
||||
EVP_ENCODE_CTX ctx;
|
||||
EVP_ENCODE_CTX *ctx = IP_NULL;
|
||||
int i, outl_tmp = 0;
|
||||
|
||||
EVP_DecodeInit(&ctx);
|
||||
ctx = EVP_ENCODE_CTX_new();
|
||||
if (ctx == IP_NULL)
|
||||
return IPCOM_ERR_FAILED;
|
||||
|
||||
i = EVP_DecodeUpdate(&ctx, out, outl, in, inl);
|
||||
EVP_DecodeInit(ctx);
|
||||
|
||||
i = EVP_DecodeUpdate(ctx, out, outl, in, inl);
|
||||
outl_tmp = *outl + outl_tmp;
|
||||
if (i < 0)
|
||||
if (i < 0) {
|
||||
EVP_ENCODE_CTX_free(ctx);
|
||||
return IPCOM_ERR_FAILED;
|
||||
}
|
||||
|
||||
i = EVP_DecodeFinal(&ctx, out + outl_tmp, outl);
|
||||
if (i < 0)
|
||||
i = EVP_DecodeFinal(ctx, out + outl_tmp, outl);
|
||||
if (i < 0) {
|
||||
EVP_ENCODE_CTX_free(ctx);
|
||||
return IPCOM_ERR_FAILED;
|
||||
}
|
||||
outl_tmp = *outl + outl_tmp;
|
||||
*outl = outl_tmp;
|
||||
|
||||
EVP_ENCODE_CTX_free(ctx);
|
||||
return IPCOM_SUCCESS;
|
||||
}
|
||||
#endif /* IPCOM_AUTH_USE_HASH */
|
||||
@@ -660,7 +669,7 @@ IP_PUBLIC Ip_err ipcom_auth_hash_rtn_install(Ipcom_auth_hash_hook hash_rtn,
|
||||
IP_PUBLIC Ip_err ipcom_auth_default_hash_rtn(const char *password, const char *salt, Ip_size_t salt_len, char *buf)
|
||||
{
|
||||
char buf1[IPCOM_AUTH_PASSWORD_MAX];
|
||||
EVP_ENCODE_CTX ctx;
|
||||
EVP_ENCODE_CTX* ctx = IP_NULL;
|
||||
int outl;
|
||||
int i;
|
||||
unsigned char* unsigned_buf = (unsigned char*)buf;
|
||||
@@ -675,9 +684,15 @@ IP_PUBLIC Ip_err ipcom_auth_default_hash_rtn(const char *password, const char *s
|
||||
SHA256((unsigned char*)buf1, salt_len+ipcom_strlen(password), unsigned_buf);
|
||||
|
||||
/* Base64 encode hash */
|
||||
EVP_EncodeInit(&ctx);
|
||||
EVP_EncodeUpdate(&ctx, unsigned_buf, &outl, unsigned_buf, 32);
|
||||
EVP_EncodeFinal(&ctx, unsigned_buf+outl, &outl);
|
||||
ctx = EVP_ENCODE_CTX_new();
|
||||
if (ctx == IP_NULL)
|
||||
return IPCOM_ERR_FAILED;
|
||||
|
||||
EVP_EncodeInit(ctx);
|
||||
EVP_EncodeUpdate(ctx, unsigned_buf, &outl, unsigned_buf, 32);
|
||||
EVP_EncodeFinal(ctx, unsigned_buf + outl, &outl);
|
||||
|
||||
EVP_ENCODE_CTX_free(ctx);
|
||||
|
||||
/* Remove terminating line feed */
|
||||
for (i=(int)(ipcom_strlen((char*)unsigned_buf)-1); i>0 && unsigned_buf[i]=='\n';i--)
|
||||
@@ -687,6 +702,7 @@ IP_PUBLIC Ip_err ipcom_auth_default_hash_rtn(const char *password, const char *s
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
*===========================================================================
|
||||
* ipcom_auth_hash_get
|
||||
|
||||
@@ -102,7 +102,7 @@ Component INCLUDE_IPDIAMETERP_CMD {
|
||||
Component INCLUDE_IPDIAMETER_TLS_CFG {
|
||||
NAME Diameter TLS Configuration
|
||||
SYNOPSIS Diameter TLS configuration parameters
|
||||
REQUIRES INCLUDE_IPSSL
|
||||
REQUIRES INCLUDE_IPCRYPTO
|
||||
CFG_PARAMS DIAMETER_TLS_ENABLED \
|
||||
DIAMETER_TLS_CERTIFICATE \
|
||||
DIAMETER_TLS_ROOT_CERTIFICATE \
|
||||
@@ -275,7 +275,7 @@ Parameter DIAMETER_TLS_ENABLED {
|
||||
NAME Enable TLS
|
||||
SYNOPSIS Control whether TLS is enabled or not on the local node. \
|
||||
If set to "1", TLS is enabled on the local node; if set \
|
||||
to "0", it is disabled. If TLS is enabled, IPSSL and its \
|
||||
to "0", it is disabled. If TLS is enabled, IPCRYPTO and its \
|
||||
requirements must be built, the other Diameter TLS \
|
||||
configuration parameters must be configured properly, \
|
||||
and certiface files and private key file must be loaded.
|
||||
|
||||
@@ -36,7 +36,7 @@ Component INCLUDE_IPEAP {
|
||||
|
||||
#if defined(_WRS_CONFIG_IPEAP_USE_EAP_COMMON_TLS) || defined(_WRS_CONFIG_IPEAP_USE_EAP_SIM) || defined(_WRS_CONFIG_IPEAP_USE_EAP_AKA)
|
||||
Component INCLUDE_IPEAP {
|
||||
REQUIRES INCLUDE_IPSSL
|
||||
REQUIRES INCLUDE_IPCRYPTO
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user