Commit 12cafc9b authored by Denis Filatov's avatar Denis Filatov
Browse files

Merge branch 'master' into devel

parents 9f0047ec a6399a11
Loading
Loading
Loading
Loading

.clang-format

0 → 100644
+115 −0
Original line number Diff line number Diff line
---
Language:        Cpp
# BasedOnStyle:  LLVM
AccessModifierOffset: -2
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: true
AlignConsecutiveDeclarations: true
AlignEscapedNewlines: Right
AlignOperands:   true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: false
BinPackArguments: true
BinPackParameters: true
BraceWrapping:   
  AfterClass:      false
  AfterControlStatement: false
  AfterEnum:       false
  AfterFunction:   false
  AfterNamespace:  false
  AfterObjCDeclaration: false
  AfterStruct:     false
  AfterUnion:      false
  AfterExternBlock: false
  BeforeCatch:     false
  BeforeElse:      false
  IndentBraces:    false
  SplitEmptyFunction: true
  SplitEmptyRecord: true
  SplitEmptyNamespace: true
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Attach
BreakBeforeInheritanceComma: false
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeColon
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit:     160
CommentPragmas:  '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 2
ContinuationIndentWidth: 2
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat:   false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:   
  - foreach
  - Q_FOREACH
  - BOOST_FOREACH
IncludeBlocks:   Preserve
IncludeCategories: 
  - Regex:           '^"(llvm|llvm-c|clang|clang-c)/'
    Priority:        2
  - Regex:           '^(<|"(gtest|gmock|isl|json)/)'
    Priority:        3
  - Regex:           '.*'
    Priority:        1
IncludeIsMainRegex: '(Test)?$'
IndentCaseLabels: true
IndentPPDirectives: None
IndentWidth:     2
IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
MacroBlockBegin: ''
MacroBlockEnd:   ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: All
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Right
RawStringFormats: 
  - Delimiter:       pb
    Language:        TextProto
    BasedOnStyle:    google
ReflowComments:  true
SortIncludes:    true
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles:  false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard:        Cpp11
TabWidth:        8
UseTab:          Never
...
+6 −0
Original line number Diff line number Diff line
@@ -13,4 +13,10 @@ run_dir=`pwd`
cd ./virtualization/docker
./build.sh #--force-stfubuntu
#./run.sh

if [ "$1" == "--remove" ]
then
    docker rmi --force etsiforge/etsi-its-ts:latest
fi

cd -
+149 −150
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ $$(foreach M, $$(modules), $$(eval $$(call IncludeModule, $$(if $$(filter /%, $
endef

all_includes := $(TTCN3_DIR)/include $(TTCN3_DIR)/src $(TOPDIR)/ccsrc/Framework /usr/include/jsoncpp
defines  += TITAN_RUNTIME_2 _NO_SOFTLINKS_ $(ATS)
defines  += TITAN_RUNTIME_2 _NO_SOFTLINKS_ $(ATS)  AS_USE_SSL
libs     += $(TTCN3_DIR)/lib/libttcn3-rt2-parallel.a -lstdc++fs

ifeq (Windows_NT,$(OS))
@@ -147,4 +147,3 @@ $(foreach S, $(ttcn_sources), $(eval $(outdir)/$(notdir $(patsubst %.ttcn, %.cc
$(foreach S, $(ttcn3_sources), $(eval $(outdir)/$(notdir $(patsubst %.ttcn3, %.cc, $(S))): $(S)))
$(foreach S, $(asn_sources),   $(eval $(outdir)/$(notdir $(patsubst %.asn, %.cc,   $(S))): $(S)))
$(foreach S, $(asn1_sources),  $(eval $(outdir)/$(notdir $(patsubst %.asn1, %.cc,  $(S))): $(S)))
+29 −17
Original line number Diff line number Diff line
@@ -71,7 +71,7 @@ PDU = CAM DENM MAPEM SPATEM SREM SSEM IVIM RTCMEM EtsiTs103097Data EtsiTs103097C
#EtsiTs102941Data

#patches
PATCHES = PsidGroupPermissions.c.diff
#PATCHES = PsidGroupPermissions.c.diff

ASN1C:=asn1c
#Override ASN1C instalation path
@@ -125,11 +125,16 @@ ASN_CONVERTER_SOURCES := \
	pdu_collection.c
CONVERTER_OBJS=${ASN_CONVERTER_SOURCES:.c=.o}
CFLAGS += $(ASN_MODULE_CFLAGS) -DPDU=CAM -DASN_PDU_COLLECTION -fPIC -I.
CC = gcc -std=c99
GEN_EXAMPLE=-no-gen-example 
ifeq (yes,$(DEBUG))
  CFLAGS += -g -O0 -DASN_EMIT_DEBUG=1
endif

all: Makefile $(ASN_LIBRARY)

$(LIB_MAKEFILE): $(addprefix $(ASN_DIR)/, $(ASN_FILES))
	$(ASN1C) -no-gen-example $(addprefix -pdu=,$(PDU)) -fcompound-names $^
	$(ASN1C) $(GEN_EXAMPLE) $(addprefix -pdu=,$(PDU)) -fcompound-names $^
	-for n in $(PATCHES); do git apply "$(SCRIPT_DIR)/$$n"; done

$(CONVERTER): $(ASN_LIBRARY) $(CONVERTER_OBJS) 
@@ -159,29 +164,36 @@ Makefile: $(SCRIPT_DIR)/Makefile
	cat $<                  >>$@
##########################################################

$(ASN_DIR)/../build/asn1/ISO_TS_14816/AVIAEINumberingAndDataStructures.asn: $(ASN_DIR)/../build/asn1/ISO_TS_14816
$(ASN_DIR)/../build/asn1/ISO_TS_14816/AVIAEINumberingAndDataStructures.asn:
	mkdir -p "$(dir $@)"
	curl 'https://standards.iso.org/iso/14816/ISO14816%20ASN.1%20repository/ISO14816_AVIAEINumberingAndDataStructures.asn' | \
	sed -e 's/IssuerIdentifier/AVIAEIIssuerIdentifier/g' > "$@"

#../build/asn1/ISO_TS_14906/EfcDsrcApplication.asn: $(ASN_DIR)/../build/asn1/ISO_TS_14906
#../build/asn1/ISO_TS_14906/EfcDsrcApplication.asn:
#	mkdir -p "$(dir $@)"
#	curl -o "$@" 'https://standards.iso.org/iso/14906/ed-3/en/ISO14906(2018)EfcDsrcApplicationv6.asn'

#../build/asn1/ISO_TS_14906/EfcDsrcGeneric.asn: $(ASN_DIR)/../build/asn1/ISO_TS_14906
#../build/asn1/ISO_TS_14906/EfcDsrcGeneric.asn:
#	mkdir -p "$(dir $@)
#	curl -o "$@" 'https://standards.iso.org/iso/14906/ed-3/en/ISO14906(2018)EfcDsrcGenericv7.asn'

$(ASN_DIR)/../build/asn1/ISO_TS_17419/CITSapplMgmtIDs.asn: $(ASN_DIR)/../build/asn1/ISO_TS_17419
$(ASN_DIR)/../build/asn1/ISO_TS_17419/CITSapplMgmtIDs.asn:
	mkdir -p "$(dir $@)"
	curl -o "$@" 'https://standards.iso.org/iso/ts/17419/TS%2017419%20ASN.1%20repository/TS17419_2014_CITSapplMgmtIDs.asn'

$(ASN_DIR)/../build/asn1/ISO_TS_19091/ISO-TS-19091-addgrp-C-2018-patched.asn: $(ASN_DIR)/../build/asn1/ISO_TS_19091
$(ASN_DIR)/../build/asn1/ISO_TS_19091/ISO-TS-19091-addgrp-C-2018-patched.asn:
	mkdir -p "$(dir $@)"
	curl 'https://standards.iso.org/iso/ts/19091/ed-2/en/ISO-TS-19091-addgrp-C-2018.asn' | \
	sed -e 's/\bHeadingConfidence\b/HeadingConfidenceDSRC/g' \
        -e 's/\bSpeedConfidence\b/SpeedConfidenceDSRC/g' \
        -e 's/\bHeading\b/HeadingDSRC/g' > "$@"

$(ASN_DIR)/../build/asn1/ISO_TS_17419/CITSdataDictionary1.asn: $(ASN_DIR)/../build/asn1/ISO_TS_17419
$(ASN_DIR)/../build/asn1/ISO_TS_17419/CITSdataDictionary1.asn:
	mkdir -p "$(dir $@)"
	curl -o "$@" 'https://standards.iso.org/iso/17419/ed-1/en/17419.1.asn'

$(ASN_DIR)/../build/asn1/ISO_TS_17419/CITSdataDictionary2.asn: $(ASN_DIR)/../build/asn1/ISO_TS_17419
$(ASN_DIR)/../build/asn1/ISO_TS_17419/CITSdataDictionary2.asn:
	mkdir -p "$(dir $@)"
	curl -o "$@" 'https://standards.iso.org/iso/17419/ed-1/en/17419.2.asn'

#../build/asn1/ISO_TS_19091/AddGrpC.asn:
@@ -190,15 +202,15 @@ $(ASN_DIR)/../build/asn1/ISO_TS_17419/CITSdataDictionary2.asn: $(ASN_DIR)/../bui
#../build/asn1/ISO_TS_19091/DSRC_REGION_noCircular.asn
#../build/asn1/ISO_TS_19091/REGION.asn

$(ASN_DIR)/../build/asn1/ISO_TS_19321/IVI.asn: $(ASN_DIR)/../build/asn1/ISO_TS_19321
	curl 'https://standards.iso.org/iso/ts/19321/ed-2/en/ISO19321IVIv2.asn' | sed -s 's/\bCITSdataDictionary1\b/CITSapplMgmtIDs/g' > "$@"

$(ASN_DIR)/../build/asn1/ISO_TS_19321/IVI.asn:
	mkdir -p "$(dir $@)"
	curl 'https://standards.iso.org/iso/ts/19321/ed-2/en/ISO19321IVIv2.asn' | \
	sed -e 's/\bCITSdataDictionary1\b/CITSapplMgmtIDs/g' \
	    -e 's/,\s*\.\.\.\s*,\s*[0-9]\+/,.../g' \
	> "$@"

#../build/asn1/ISO_TS_24534-3/ElectronicRegistrationIdentificationVehicleDataModule.asn: ../build/asn1/ISO_TS_24534-3
#$(ASN_DIR)/../build/asn1/ISO_TS_24534-3/ElectronicRegistrationIdentificationVehicleDataModule.asn:
#	mkdir -p "$(dir $@)"
#	curl -o "$@" 'https://standards.iso.org/iso/24534/-3/ISO%2024534-3%20ASN.1%20repository/ISO24534-3_ElectronicRegistrationIdentificationVehicleDataModule_ForBallot.asn'


$(addprefix $(ASN_DIR)/, ../build/asn1/ISO_TS_24534-3 ../build/asn1/ISO_TS_19321 ../build/asn1/ISO_TS_19091 ../build/asn1/ISO_TS_17419 ../build/asn1/ISO_TS_14906 ../build/asn1/ISO_TS_14816):
	mkdir -p "$@"

endif
+0 −15
Original line number Diff line number Diff line
@@ -15,19 +15,4 @@

namespace LibItsPki__Functions {

  INTEGER fx__get__root__ca__certificate(const CHARSTRING &p__iut_certificate, const BOOLEAN &p__explicit_type, OCTETSTRING &p__certificate) {
    loggers::get_instance().log_msg(">>> fx__get__root__ca__certificate: ", p__iut_certificate);

    CHARSTRING c("800300810038811b45545349205465737420524341204320636572746966696361746500000000001e19cf808466a8c001028002026e810201018002027081030201380102a08"
                 "0010f80012482080301fffc03ff0003800125820a0401ffffff04ff00000080018982060201e002ff1f80018a82060201c002ff3f80018b820e0601000000fff806ff00000000"
                 "0780018c820a0401ffffe004ff00001f8002027d8204010101ff00018d0001600001610001620001630001640001650001660102c0208001018002026f82060201fe02ff01c08"
                 "08083ee2cb68fe4618d3aff28e38b8ebdd1875221ee686c36434cc5c3d7829402d4df80805204e6e5a7fd85f9f2044a5e57646a89d0ab73e1413dda9615456fa1ea1ddf9d4834"
                 "51a36b7116bbc4f8fe9b4bb54478d4195c95b083ab80d77098a86f17e088"); // CERT_IUT_A_RCA
    // CHARSTRING
    // c("800300810079811b45545349205465737420524341204320636572746966696361746500000000001e19cf808466a88101011a0645a1042d654819f89082043b1a67c001028002026e810201018002027081030201380101a080010980012482080301fffc03ff0003800125820a0401ffffff04ff00000080018982060201e002ff1f80018a82060201c002ff3f80018b820e0601000000fff806ff000000000780018c820a0401ffffe004ff00001f8002027d8204010101ff00018d8002026f82060201fe02ff010102c0008082cab9d2e83ba971bcc5c7295ffcc4b98ca415745cf03c230d6b79a7afafeadfa38080828b5146c0160df69389e5b26e4a8a25e1ff0141c577cc24eb1626184995513f3f808068c5ab4b07fa9eef841e1d6471a310eb35333520273a6ca1cca4126b32a128d5ef56aed4439046ca0263e28c5bdd459a382837c3c97af9fd150640c44910fdbc");
    // // CERT_IUT_C_RCA
    p__certificate = str2oct(c);
    return 0;
  }

} // End of namespace LibItsPki__Functions
Loading