Commit 8c809dc8 authored by Yann Garcia's avatar Yann Garcia

Merge branch 'STF525' of https://forge.etsi.org/gitlab/ITS/ITS into STF525

parents b5b43e17 e71dfbb9
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
......@@ -395,10 +395,10 @@ int security_ecc::generate_and_derive_ephemeral_key(const encryption_algotithm p
int result = ::ECDH_compute_key(
(unsigned char*)static_cast<const unsigned char*>(_secret_key),
_secret_key.lengthof(),
ec_point, // From sender's public key
_ec_key, // From recipient's private key
ec_point, // From recipient's public key
_ec_key, // From ephemeral's private key
nullptr);
if (result == -1) {
if (result != _secret_key.lengthof()) {
loggers::get_instance().warning("security_ecc::generate_and_derive_ephemeral_key (1): Failed to generate shared secret key");
::EC_POINT_free(ec_point);
return -1;
......@@ -438,7 +438,7 @@ int security_ecc::generate_and_derive_ephemeral_key(const encryption_algotithm p
hmac_256.generate(static_cast<const unsigned char*>(_enc_sym_key), _enc_sym_key.lengthof(), static_cast<const unsigned char*>(k2), k2.lengthof(), _tag);
loggers::get_instance().log_msg("security_ecc::generate_and_derive_ephemeral_key (1): _tag: ", _tag);
// Generate random IV (nonce
// Generate random IV (nonce)
BIGNUM* r = ::BN_new();
::BN_pseudo_rand(r, nonce_length * 8, -1, 0);
_nonce = int2oct(0, nonce_length);
......@@ -517,7 +517,7 @@ int security_ecc::generate_and_derive_ephemeral_key(const encryption_algotithm p
ec_point, // From recipient's private key
_ec_key, // From sender's public key
nullptr);
if (result == -1) {
if (result != _secret_key.lengthof()) {
loggers::get_instance().warning("security_ecc::generate_and_derive_ephemeral_key (2): Failed to compute shared secret key");
::EC_POINT_free(ec_point);
return -1;
......
......@@ -469,7 +469,14 @@ int security_services::sign_payload(const OCTETSTRING& p_unsecured_gn_payload, O
// Set secured field according to the payload!
header_info.psid() = converter::get_instance().string_to_int(p_params[params::its_aid]);
header_info.expiryTime().set_to_omit();
header_info.generationLocation().set_to_omit();
if (p_params[params::its_aid].compare("37") == 0) { // Only used by AtsRSUSimulator
// Mandatory for DENM payload
OPTIONAL<IEEE1609dot2BaseTypes::ThreeDLocation> location(IEEE1609dot2BaseTypes::ThreeDLocation(_latitude, _longitude, _elevation));
header_info.generationLocation() = location;
loggers::get_instance().log_msg("security_services::sign_payload: generationLocation: ", header_info.generationLocation());
} else {
header_info.generationLocation().set_to_omit();
}
header_info.p2pcdLearningRequest().set_to_omit();
header_info.missingCrlIdentifier().set_to_omit();
if (_params[params::encrypted_mode].compare("1") == 0) {
......
......@@ -49,13 +49,13 @@ LogEventTypes:= Yes
[TESTPORT_PARAMETERS]
# Multiple HTTP component ports for ITS-S, EA and TC_SECPKI_AA_AUTH_RCV_*
#system.httpEcPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/TCP(server=ea.utopia.plugtests2019.innovation.keynectis.net)"
#system.httpAtVPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/TCP(server=ea.utopia.plugtests2019.innovation.keynectis.net)"
#system.httpAtPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/TCP(server=aa.utopia.plugtests2019.innovation.keynectis.net)"
system.httpEcPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/TCP(server=ea.utopia.plugtests2019.innovation.keynectis.net)"
system.httpAtVPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/TCP(server=ea.utopia.plugtests2019.innovation.keynectis.net)"
system.httpAtPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/TCP(server=aa.utopia.plugtests2019.innovation.keynectis.net)"
# Multiple HTTP component ports for TC_SECPKI_AA_AUTHVAL_*
system.httpAtVPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/TCP(debug=1,server_mode=1,server=192.168.1.252,local_port=8080)"
system.httpAtPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/TCP(server=aa.utopia.plugtests2019.innovation.keynectis.net)"
#system.httpAtVPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/TCP(debug=1,server_mode=1,server=192.168.1.252,local_port=8080)"
#system.httpAtPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/TCP(server=aa.utopia.plugtests2019.innovation.keynectis.net)"
[EXECUTE]
# The EnrolmentResponse message shall be sent by the EA to the ITS-S across the interface at reference point S3 in response to a received EnrolmentRequest message
......@@ -82,7 +82,7 @@ system.httpAtPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/
#ItsPki_TestCases.TC_SECPKI_EA_AUTHVAL_RCV_01_BV
#
#ItsPki_TestCases.TC_SECPKI_AA_AUTH_RCV_01_BV
ItsPki_TestCases.TC_SECPKI_AA_AUTH_RCV_01_BV
#ItsPki_TestCases.TC_SECPKI_AA_AUTH_RCV_03_BI
#ItsPki_TestCases.TC_SECPKI_AA_AUTH_RCV_04_BI
#ItsPki_TestCases.TC_SECPKI_AA_AUTH_RCV_05_BI
......@@ -96,7 +96,7 @@ system.httpAtPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/
#ItsPki_TestCases.TC_SECPKI_AA_AUTH_RCV_13_BI
#ItsPki_TestCases.TC_SECPKI_AA_AUTH_RCV_14_BI
ItsPki_TestCases.TC_SECPKI_AA_AUTHVAL_01_BV
#ItsPki_TestCases.TC_SECPKI_AA_AUTHVAL_01_BV
[MAIN_CONTROLLER]
# The options herein control the behavior of MC.
......
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
#!/bin/bash
# Turn on debug mode
#set -vx
#set -e
# Colors and Prompt
export PS1="\w\$ "
export PS1="\D{%Y-%m-%d %H:%M:%S} \w\n\$ "
export EDITOR=emacs
set -o emacs
# Home working directories
export HOME_FRAMEWORKS=${HOME}/frameworks
export HOME_LIB=${HOME}/lib
export HOME_BIN=${HOME}/bin
export HOME_ETC=${HOME}/etc
export HOME_TMP=${HOME}/tmp
export HOME_DOCS=${HOME}/docs
# Home common include directory
export HOME_INC=${HOME}/include
# Update PATH environment variable
export PATH=${HOME_BIN}:${PATH}
# Update LD_LIBRARY_PATH environment variable
if [ -z "${LD_LIBRARY_PATH}" ]
then
export LD_LIBRARY_PATH=${HOME_LIB}:/usr/local/lib:${HOME}/dev/etsi_its/lib
else
export LD_LIBRARY_PATH=${HOME_LIB}:/usr/local/lib:${HOME}/dev/etsi_its/lib:${LD_LIBRARY_PATH}
fi
# Add JAVA support
#export JAVA_VERSION=1.8.0_92
#export JAVA_JDK=jdk${JAVA_VERSION}
#if [ -d "${HOME_FRAMEWORKS}/${JAVA_JDK}" ]
#then
# export JAVA_HOME=${HOME_FRAMEWORKS}/${JAVA_JDK}/bin
#else
# unset JAVA_VERSION
# unset JAVA_JDK
#fi
# Add TITAN support
export TOP=${HOME_FRAMEWORKS}/titan/titan.core
export TTCN3_DIR=${TOP}/Install
if [ -d ${TTCN3_DIR} ]
then
export TTCN3_BROWSER=mozilla
export PATH=${TTCN3_DIR}/bin:${PATH}
export LD_LIBRARY_PATH=${TTCN3_DIR}/lib:${LD_LIBRARY_PATH}
export MANPATH=${TTCN3_DIR}/man:${MANPATH}
export TTCN3_LICENSE_FILE=${TTCN3_DIR}/etc/license/license.dat
export PATH_DEV_TTCN=${HOME}/dev/ttcn3
# ITS support
export PATH_DEV_ITS=${HOME}/dev/etsi_its
# Emergency Communication support
export PATH_DEV_EMCOM=${HOME}/dev/etsi_emcom
# Mobile-Edge Computing support
export PATH_DEV_MEC=${HOME}/dev/etsi_mec
# Validation folder
export VALIDATION_DIR=${HOME}
fi
# Start ssh-agent at login
#if [ -f "/usr/bin/ssh-agent" ]
#then
# eval `/usr/bin/ssh-agent -s`
# ssh-add -l
# ssh-add ${HOME}/.ssh/git_server_ssh_key_name
#fi
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
https://github.com/eclipse/titan.core.git
https://github.com/eclipse/titan.TestPorts.Common_Components.Abstract_Socket.git
https://github.com/eclipse/titan.TestPorts.HTTPmsg.git
https://github.com/eclipse/titan.TestPorts.LANL2asp.git
https://github.com/eclipse/titan.TestPorts.PCAPasp.git
https://github.com/eclipse/titan.TestPorts.PIPEasp.git
https://github.com/eclipse/titan.TestPorts.SCTPasp.git
https://github.com/eclipse/titan.TestPorts.SIPmsg.git
https://github.com/eclipse/titan.TestPorts.SQLasp.git
https://github.com/eclipse/titan.TestPorts.TCPasp.git
https://github.com/eclipse/titan.TestPorts.TELNETasp.git
https://github.com/eclipse/titan.TestPorts.UDPasp.git
......@@ -16,29 +18,118 @@ https://github.com/eclipse/titan.ProtocolModules.DNS.git
https://github.com/eclipse/titan.ProtocolModules.ICMP.git
https://github.com/eclipse/titan.ProtocolModules.ICMPv6.git
https://github.com/eclipse/titan.ProtocolModules.IP.git
https://github.com/eclipse/titan.ProtocolModules.RTP.git
https://github.com/eclipse/titan.ProtocolModules.RTSP.git
https://github.com/eclipse/titan.ProtocolModules.SMPP.git
https://github.com/eclipse/titan.ProtocolModules.SMTP.git
https://github.com/eclipse/titan.ProtocolModules.SNMP.git
https://github.com/eclipse/titan.ProtocolModules.TCP.git
https://github.com/eclipse/titan.ProtocolModules.UDP.git
https://github.com/eclipse/titan.EclipsePlug-ins.git
https://github.com/eclipse/titan.ProtocolModules.XMPP.git
https://github.com/eclipse/titan.misc.git
https://github.com/eclipse/titan.TestPorts.LDAPasp_RFC4511.git
https://github.com/eclipse/titan.TestPorts.LDAPmsg.git
https://github.com/eclipse/titan.TestPorts.Common_Components.Socket-API.git
https://github.com/eclipse/titan.TestPorts.SSHCLIENTasp.git
https://github.com/eclipse/titan.TestPorts.STDINOUTmsg.git
https://github.com/eclipse/titan.TestPorts.SUNRPCasp.git
https://github.com/eclipse/titan.TestPorts.UNIX_DOMAIN_SOCKETasp.git
https://github.com/eclipse/titan.TestPorts.IPL4asp.git
https://github.com/eclipse/titan.ProtocolModules.FrameRelay.git
https://github.com/eclipse/titan.ProtocolModules.H248_v2.git
https://github.com/eclipse/titan.ProtocolModules.IMAP_4rev1.git
https://github.com/eclipse/titan.ProtocolModules.ICAP.git
https://github.com/eclipse/titan.ProtocolModules.IKEv2.git
https://github.com/eclipse/titan.ProtocolModules.IPsec.git
https://github.com/eclipse/titan.ProtocolModules.IUA.git
https://github.com/eclipse/titan.ProtocolModules.JSON_v07_2006.git
https://github.com/eclipse/titan.ProtocolModules.L2TP.git
https://github.com/eclipse/titan.ProtocolModules.M3UA.git
https://github.com/eclipse/titan.ProtocolModules.MIME.git
https://github.com/eclipse/titan.ProtocolModules.MSRP.git
https://github.com/eclipse/titan.ProtocolModules.PPP.git
https://github.com/eclipse/titan.ProtocolModules.ProtoBuff.git
https://github.com/eclipse/titan.ProtocolModules.RADIUS_ProtocolModule_Generator.git
https://github.com/eclipse/titan.ProtocolModules.SRTP.git
https://github.com/eclipse/titan.ProtocolModules.WebSocket.git
https://github.com/eclipse/titan.ProtocolModules.HTTP2.0.git
https://github.com/eclipse/titan.Libraries.TCCUsefulFunctions.git
https://git.eclipse.org/r/titan/titan.ApplicationLibraries.CoAP
https://git.eclipse.org/r/titan/titan.ApplicationLibraries.MQTT
https://git.eclipse.org/r/titan/titan.ProtocolModules.CoAP.git
https://git.eclipse.org/r/titan/titan.ProtocolModules.MQTT.git
https://git.eclipse.org/r/titan/titan.ProtocolModules.SCTP.git
https://git.eclipse.org/r/titan/titan.ProtocolModules.SDP.git
https://git.eclipse.org/r/titan/titan.ProtocolModules.TLS.git
https://git.eclipse.org/r/titan/titan.TestPorts.GPIO.git
https://git.eclipse.org/r/titan/titan.TestPorts.Serial.git
https://git.eclipse.org/r/titan/titan.TestPorts.SocketCANasp.git
https://git.eclipse.org/r/titan/titan.TestPorts.Thrift_TPG.git
git://git.eclipse.org/gitroot/titan/titan.ApplicationLibraries.CoAP.git
git://git.eclipse.org/gitroot/titan/titan.ApplicationLibraries.HTTP.git
git://git.eclipse.org/gitroot/titan/titan.ApplicationLibraries.LWM2M.git
git://git.eclipse.org/gitroot/titan/titan.ApplicationLibraries.MBT.git
git://git.eclipse.org/gitroot/titan/titan.ApplicationLibraries.MQTT.git
git://git.eclipse.org/gitroot/titan/titan.Applications.IoT_Functiontest_Framework.git
git://git.eclipse.org/gitroot/titan/titan.Applications.IoT_Loadtest_Framework.git
git://git.eclipse.org/gitroot/titan/titan.Applications.RIoT.git
git://git.eclipse.org/gitroot/titan/titan.Libraries.CLL.git
git://git.eclipse.org/gitroot/titan/titan.Libraries.ServiceFramework.git
git://git.eclipse.org/gitroot/titan/titan.Libraries.TLS.git
git://git.eclipse.org/gitroot/titan/titan.Libraries.Web_GUI.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolEmulations.M3UA.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolEmulations.SCCP.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolEmulations.SCTP.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolEmulations.SUA.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.5G_system_TS29502_Nsmf_v15.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.5G_system_TS29503_Nudm_v15.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.5G_system_TS29508_Nsmf_v15.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.5G_system_TS29509_Nausf_v15.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.5G_system_TS29510_Nnrf_v15.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.5G_system_TS29511_N5g_eir_v15.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.5G_system_TS29512_Npcf_v15.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.5G_system_TS29514_Npcf_v15.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.5G_system_TS29518_Namf_v15.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.5G_system_TS29520_Nnwdaf_v15.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.5G_system_TS29571_CommonData_v15.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.5G_system_TS29572_Nlmf_v15.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.5G_system_TS29594_Nchf_v15.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.5G_system_TS32291_Nchf_v15.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.BSSAPP_v7.3.0.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.BSSGP_v13.0.0.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.BSSMAP_v11.2.0.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.CoAP.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.DSS1_ETSI.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.DUA.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.EAP.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.GCP_31r1.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.GRE.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.GTP_v13.5.0.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.GTPv2_v13.7.0.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.GTPv2_v15.2.0.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.HTTP2.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.ISUP_Q.762.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.JSON_Generic.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.LLC_v7.1.0.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.M2PA.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.M2UA.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.MobileL3_v13.4.0.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.MongoDB.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.MQTT.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.NAS_EPS_15.2.0.1.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.NDP.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.NS_v7.3.0.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.NTAF.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.OPC_UA.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.PFCP_v15.1.0.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.ROSE.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.SCTP.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.SDP.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.SGsAP_13.2.0.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.SNDCP_v7.0.0.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.STOMP.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.STUN.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.STUN_RFC5389.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.SUA.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.TLS.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.V5.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.WTP.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.XML_RPC.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.XTDP.git
git://git.eclipse.org/gitroot/titan/titan.Servers.GTP_Tunnel_Daemon.git
git://git.eclipse.org/gitroot/titan/titan.Servers.IP_Daemon_Dynamic.git
git://git.eclipse.org/gitroot/titan/titan.Servers.SCTP_Daemon_Dynamic.git
git://git.eclipse.org/gitroot/titan/titan.TestPorts.GPIO.git
git://git.eclipse.org/gitroot/titan/titan.TestPorts.MTP3asp.git
git://git.eclipse.org/gitroot/titan/titan.TestPorts.Serial.git
git://git.eclipse.org/gitroot/titan/titan.TestPorts.SocketCANasp.git
git://git.eclipse.org/gitroot/titan/titan.TestPorts.Thrift_TPG.git
......@@ -53,6 +53,7 @@ ifneq ($(filter dmalloc, $(packages)),)
endif
ifneq ($(filter thread, $(packages)),)
cflags += -pthread
defines += USE_THREADS
libs += -lpthread
endif
......@@ -79,6 +80,11 @@ ifneq ($(filter openssl, $(packages)),)
endif
endif
ifneq ($(filter googletest, $(packages)),)
includes += /usr/local/include
libs += -L/usr/local/lib -lgtest -lgtest_main
endif
ifneq ($(filter cxml, $(packages)),)
predirs += $(PROJECTROOT)/cxml
endif
......
######################################################################
##
## Created by: Denis Filatov
##
## Copyleft (c) 2015
## This code is provided under the CeCill-C license agreement.
######################################################################
export LANG=en_US
ALL_CONFIGURATIONS := POSIX WIN32
.PHONY: all clean tests docs cleandocs distr DUMMY
ifeq ($(ARCH),)
ARCH = $(shell gcc -dumpmachine)
GCC := gcc
GPP := g++
else
GCC := $(addprefix $(addsuffix -,$(ARCH)), gcc)
GPP := $(addprefix $(addsuffix -,$(ARCH)), g++)
endif
LINK := $(GCC)
JAVA := java
JAVAC := javac
JAR := jar
ifneq ($(findstring w32,$(ARCH)),)
packages := $(filter-out readline threads, $(packages))
CFG += WIN32
else
CFG += POSIX
endif
cflags := -Wall -fPIC $(cflags)
jflags := -g
ifeq ($(DEBUG),)
DEBUG=no
endif
ifeq ($(DEBUG),yes)
cflags += -ggdb -O0
defines += DEBUG
dsuffix = -d
else
defines += NDEBUG
cflags += -O2
endif
ifneq ($(filter readline, $(packages)),)
defines += USE_READLINE
libs += -lreadline
endif
ifneq ($(filter dmalloc, $(packages)),)
defines += DMALLOC DMALLOC_FUNC_CHECK
libs += -ldmalloc
dsuffix = -dmalloc
endif
ifneq ($(filter thread, $(packages)),)
cflags += -pthread
defines += USE_THREADS
libs += -lpthread
endif
ifneq ($(filter profile, $(packages)),)
cflags += -pg
endif
ifneq ($(filter openssl, $(packages)),)
ifneq ($(findstring 64, $(ARCH)),)
OPENSSL_ARCH:=Win64
else
OPENSSL_ARCH:=Win32
endif
ifneq ($(findstring mingw32,$(ARCH)),)
includes += C:/OpenSSL/$(OPENSSL_ARCH)/include
libs += C:/OpenSSL/$(OPENSSL_ARCH)/lib/MinGW/libeay32.a C:/OpenSSL/$(OPENSSL_ARCH)/lib/MinGW/ssleay32.a
else
ifneq ($(findstring cygwin,$(ARCH)),)
includes += C:/OpenSSL/$(OPENSSL_ARCH)/include
cflags += -LC:/OpenSSL/$(OPENSSL_ARCH)/lib
endif
libs += -lm -lssl -lcrypto
endif
endif
ifneq ($(filter googletest, $(packages)),)
includes += /usr/local/include
libs += -L/usr/local/lib -lgtest -lgtest_main
endif
ifneq ($(filter cxml, $(packages)),)
predirs += $(PROJECTROOT)/cxml
endif
ifneq ($(filter cshared, $(packages)),)
predirs += $(PROJECTROOT)/cshared
endif
ifeq ($(testdir), )
testdir := tests
endif
ifeq ($(PROJECTROOT),)
PROJECTROOT := .
endif
ifeq ($(BUILDROOT),)
BUILDROOT := $(PROJECTROOT)
endif
includes += $(PROJECTROOT)
includes += $(foreach cfg,$(CFG),$(includes-$(cfg)))
defines += $(foreach cfg,$(CFG),$(defines-$(cfg)))
libs += $(foreach cfg,$(CFG),$(libs-$(cfg)))
sources += $(foreach cfg,$(CFG),$(sources-$(cfg)))
headers += $(foreach cfg,$(CFG),$(headers-$(cfg)))
tests += $(foreach cfg,$(CFG),$(tests-$(cfg)))
distfiles += $(foreach cfg,$(CFG),$(distfiles-$(cfg)))
predirs += $(foreach cfg,$(CFG),$(predirs-$(cfg)))
postdirs += $(foreach cfg,$(CFG),$(postdirs-$(cfg)))
tests := $(addprefix $(addsuffix /,$(testdir)),$(tests))
sources := $(addprefix $(addsuffix /,$(srcdir)),$(sources))
csources := $(filter %.c, $(sources))
ccsources := $(filter %.cc, $(sources))
cppsources := $(filter %.cpp, $(sources))
jvsources := $(filter %.java, $(jsources))
headers := $(addprefix $(addsuffix /,$(incdir)),$(headers))
cflags += $(addprefix -I, $(includes)) $(addprefix -D, $(defines))
outdir := $(BUILDROOT)/$(ARCH)$(dsuffix)
objdir := $(outdir)/o-$(PROJECT)
cobjects := $(patsubst %.c, $(objdir)/%.o, $(csources))
ccobjects := $(patsubst %.cc, $(objdir)/%.o, $(ccsources))
ccpobjects:= $(patsubst %.cc, $(objdir)/%.o, $(ccpsources))
objects := $(cobjects) $(ccobjects) $(cppobjects)
jvobjects := $(patsubst %.java, $(objdir)/%.class, $(jvsources))
jobjects := $(jvobjects)
testbins := $(patsubst %.c, $(outdir)/%, $(tests))
jtestbins := $(patsubst %.java, $(outdir)/%, $(tests))
dirs := $(objdir) $(outdir)/tests
alibnames := $(patsubst %, $(outdir)/lib%.a, $(alibs))
solibnames := $(patsubst %, $(outdir)/lib%.so, $(solibs))
binnames := $(patsubst %, $(outdir)/%, $(bins))
jbinnames := $(patsubst %, $(outdir)/%, $(jbins))
ldflags += $(patsubst %, -L%, $(outdir) $(libdirs))
cpflags :=
ifneq ($(filter cxml, $(packages)),)
libs += $(outdir)/libcxml.a
endif
ifneq ($(filter cshared, $(packages)),)
libs += $(outdir)/libcshared.a
endif
ifneq (,$(sort $(ccobjects) $(cppobjects)))
LINK := $(GPP)
endif
all: $(dirs) $(predirs) $(alibnames) $(solibnames) $(binnames) $(jbinnames) $(postdirs)
tests: all $(testbins) $(jtestbins)
$(predirs) $(postdirs): DUMMY
$(MAKE) -C $@ DEBUG=$(DEBUG)
$(alibnames): $(outdir)/lib%.a : $(objects)
ar rcs $@ $^
$(solibnames): $(outdir)/lib%.so : $(objects)
$(LINK) $(cflags) -shared $(ldflags) -o $@ $^ $(csharedlib) $(libs)
$(binnames): $(outdir)/% : $(objects)
$(LINK) $(cflags) $(ldflags) -o $@ $^ $(csharedlib) $(libs)
$(jbinnames): $(outdir)/% : $(jobjects)
$(JAR) cf -C$(objdir) $@ $^
$(testbins): $(alibnames)
$(testbins): $(outdir)/tests/% : tests/%.c
$(LINK) $(cflags) -o $@ $< $(alibnames) $(libs)
$(jtestbins): $(jbinnames)
$(jtestbins): $(outdir)/tests/% : tests/%.java
$(JAR) cf $@ $^
$(dirs):
mkdir -p $@
$(cobjects): $(objdir)/%.o: %.c
@mkdir -p $(dir $@)
$(GCC) $(cflags) -o $@ -MMD -MF $(objdir)/$*.d -c $<
$(ccobjects): $(objdir)/%.o: %.cc
@mkdir -p $(dir $@)
$(GPP) $(cflags) -o $@ -MMD -MF $(objdir)/$*.d -c $<
$(cppobjects): $(objdir)/%.o: %.cpp
@mkdir -p $(dir $@)
$(GPP) $(cflags) -o $@ -MMD -MF $(objdir)/$*.d -c $<
$(jvobjects): $(objdir)/%.class: %.java
@mkdir -p $(dir $@)
$(JAVAC) -d $(dir $@) $(jflags) $<
clean:
rm -rf $(outdir) $(wildcard $(addsuffix /*~, . $(predirs) $(postdirs)))
distfiles += $(wildcard Makefile $(DOXYFILE))
dist:
-rm -rf $(PROJECT) $(PROJECT)-$(shell date -u '+%Y%m%d').tar.gz
mkdir $(PROJECT)
cp --parents $(sources) $(headers) $(distfiles) $(addprefix tests/, $(tests)) $(PROJECT)
tar -zcvf $(PROJECT)-$(shell date -u '+%Y%m%d').tar.gz $(PROJECT)
rm -rf $(PROJECT)
# tar -zcvf $(PROJECT)-$(shell date -u '+%Y%m%d').tar.gz $(sources) $(headers) $(distfiles) $(addprefix tests/, $(tests))
ifneq (,$(DOXYFILE))
docs: $(DOXYFILE)
doxygen $(DOXYFILE)
cleandocs:
rm -rf doc/html
endif
include $(wildcard $(addsuffix /*.d, $(objdir)))

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29728.190
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lib_its_security", "lib_its_security\lib_its_security.vcxproj", "{76A8854A-3F0C-4124-9AE0-2578B1D59342}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lib_its_security_tests_unit", "test\lib_its_security_tests_unit.vcxproj", "{5151573E-B7B3-44B4-BA0B-5410831C3D9D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{76A8854A-3F0C-4124-9AE0-2578B1D59342}.Debug|x64.ActiveCfg = Debug|x64
{76A8854A-3F0C-4124-9AE0-2578B1D59342}.Debug|x64.Build.0 = Debug|x64
{76A8854A-3F0C-4124-9AE0-2578B1D59342}.Debug|x86.ActiveCfg = Debug|Win32
{76A8854A-3F0C-4124-9AE0-2578B1D59342}.Debug|x86.Build.0 = Debug|Win32
{76A8854A-3F0C-4124-9AE0-2578B1D59342}.Release|x64.ActiveCfg = Release|x64
{76A8854A-3F0C-4124-9AE0-2578B1D59342}.Release|x64.Build.0 = Release|x64
{76A8854A-3F0C-4124-9AE0-2578B1D59342}.Release|x86.ActiveCfg = Release|Win32
{76A8854A-3F0C-4124-9AE0-2578B1D59342}.Release|x86.Build.0 = Release|Win32
{5151573E-B7B3-44B4-BA0B-5410831C3D9D}.Debug|x64.ActiveCfg = Debug|x64
{5151573E-B7B3-44B4-BA0B-5410831C3D9D}.Debug|x64.Build.0 = Debug|x64
{5151573E-B7B3-44B4-BA0B-5410831C3D9D}.Debug|x86.ActiveCfg = Debug|Win32
{5151573E-B7B3-44B4-BA0B-5410831C3D9D}.Debug|x86.Build.0 = Debug|Win32
{5151573E-B7B3-44B4-BA0B-5410831C3D9D}.Release|x64.ActiveCfg = Release|x64
{5151573E-B7B3-44B4-BA0B-5410831C3D9D}.Release|x64.Build.0 = Release|x64
{5151573E-B7B3-44B4-BA0B-5410831C3D9D}.Release|x86.ActiveCfg = Release|Win32
{5151573E-B7B3-44B4-BA0B-5410831C3D9D}.Release|x86.Build.0 = Release|Win32
{A5E5C89A-7B89-443A-9972-E0145DBA3B7E}.Debug|x64.ActiveCfg = Debug|x64
{A5E5C89A-7B89-443A-9972-E0145DBA3B7E}.Debug|x64.Build.0 = Debug|x64
{A5E5C89A-7B89-443A-9972-E0145DBA3B7E}.Debug|x86.ActiveCfg = Debug|Win32
{A5E5C89A-7B89-443A-9972-E0145DBA3B7E}.Debug|x86.Build.0 = Debug|Win32
{A5E5C89A-7B89-443A-9972-E0145DBA3B7E}.Release|x64.ActiveCfg = Release|x64
{A5E5C89A-7B89-443A-9972-E0145DBA3B7E}.Release|x64.Build.0 = Release|x64
{A5E5C89A-7B89-443A-9972-E0145DBA3B7E}.Release|x86.ActiveCfg = Release|Win32
{A5E5C89A-7B89-443A-9972-E0145DBA3B7E}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {CE997533-FD4F-42FF-A3AE-6D3E2AFBCDA8}
EndGlobalSection
EndGlobal
PROJECTROOT = ..
BUILDROOT = ../build
PROJECT = ItsSecurity
DEBUG = yes
testdir = tests
alibs = $(PROJECT)
solibs = $(PROJECT)
sources := lib_its_security.c
sources-WIN32 :=
headers := lib_its_security.h
cflags += -Werror
include ../common.mk
This diff is collapsed.
This diff is collapsed.
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
<ProjectGuid>{76A8854A-3F0C-4124-9AE0-2578B1D59342}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>libitssecurity</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">