Commit ea9ce2b8 authored by filatov's avatar filatov
Browse files

enc keys in profiles

parent da6e30d8
Loading
Loading
Loading
Loading
+9 −6
Original line number Original line Diff line number Diff line
outdir=certificates
outdir=certificates
in=profiles
in=profiles
xerdir=temp
xerdir=xer
depdir=temp
depdir=temp
keydir=certificates
keydir=certificates


asn1certgen=./asn1certgen
asn1certgen=../../tools/itscertgen/build/msvc/x64/Debug/asn1certgen.exe
#asn1certgen=../../tools/itscertgen/build/msvc/Debug/asn1certgen
xsl_cvt=../../tools/itscertgen/asn1certgen/asn1certgen.xslt
xsl_dep=../../tools/itscertgen/asn1certgen/prof2dep.xsl


profiles=$(wildcard $(in)/*.xml)
profiles=$(wildcard $(in)/*.xml)
certificates_oer=$(patsubst $(in)/%.xml, $(outdir)/%.oer, $(profiles))
certificates_oer=$(patsubst $(in)/%.xml, $(outdir)/%.oer, $(profiles))
certificates_xer=$(patsubst $(in)/%.xml, $(xerdir)/%.xer, $(profiles))
certificates_xer=$(patsubst $(in)/%.xml, $(xerdir)/%.xer, $(profiles))
deps=$(patsubst $(in)/%.xml, $(depdir)/%.dep, $(profiles))
deps=$(patsubst $(in)/%.xml, $(depdir)/%.dep, $(profiles))


all: $(sort $(outdir) $(xerdir) $(depdir) $(certificates_oer))
all: $(sort $(outdir) $(xerdir) $(depdir)) $(certificates_oer)


$(sort $(outdir) $(xerdir) $(depdir)):
$(sort $(outdir) $(xerdir) $(depdir)):
	mkdir -p $@
	mkdir -p $@
@@ -19,15 +22,15 @@ clear:
	rm -f $(certificates_oer) $(certificates_xer)
	rm -f $(certificates_oer) $(certificates_xer)


$(certificates_xer): $(xerdir)/%.xer : $(in)/%.xml
$(certificates_xer): $(xerdir)/%.xer : $(in)/%.xml
	xsltproc asn1certgen.xslt $< | xmllint --format -o $@ -
	xsltproc $(xsl_cvt) $< | xmllint --format -o $@ -


$(certificates_oer): $(outdir)/%.oer : $(xerdir)/%.xer 
$(certificates_oer): $(outdir)/%.oer : $(xerdir)/%.xer 
	$(asn1certgen) -o $(outdir) -K $(keydir) $<
	$(asn1certgen) -o $(outdir) -K $(keydir) $<


$(deps): $(depdir)/%.dep : $(in)/%.xml
$(deps): $(depdir)/%.dep : $(in)/%.xml
	-mkdir -p $(depdir)
	-mkdir -p $(depdir)
	xsltproc --param profile "'$*'" -o $@ prof2dep.xsl $<
	xsltproc --param profile "'$*'" -o $@ $(xsl_dep) $<


$(certificates_xer) : asn1certgen.xslt
$(certificates_xer) : $(xsl_cvt)


include $(deps)
include $(deps)

data/v3/asn1certgen.xslt

deleted100644 → 0
+0 −693

File deleted.

Preview size limit exceeded, changes collapsed.

data/v3/prof2dep.xsl

deleted100644 → 0
+0 −8
Original line number Original line Diff line number Diff line
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="profile"/>
<xsl:output method="text" />
<xsl:template match = "/">
<xsl:variable name="v" select="certificate/signer/@name"/>
<xsl:value-of select="concat('$(outdir)/', $profile, '.oer : ')"/><xsl:if test="$v"><xsl:value-of select="concat('$(outdir)/', $v , '.oer : ')"/></xsl:if>
</xsl:template>
</xsl:stylesheet>
 No newline at end of file
+6 −0
Original line number Original line Diff line number Diff line
@@ -8,6 +8,12 @@
				<ecc_point type="compressed"/>
				<ecc_point type="compressed"/>
			</public_key>
			</public_key>
		</attribute>
		</attribute>
		<!-- encryption_key -->
		<attribute type="encryption_key">
			<public_key sym_alg="0" algorithm="0">
				><ecc_point type="compressed"/>
			</public_key>
		</attribute>
		<!-- assurance_level -->
		<!-- assurance_level -->
		<attribute type="assurance_level">
		<attribute type="assurance_level">
			<assurance level="3"/>
			<assurance level="3"/>
+6 −0
Original line number Original line Diff line number Diff line
@@ -8,6 +8,12 @@
				<ecc_point type="compressed"/>
				<ecc_point type="compressed"/>
			</public_key>
			</public_key>
		</attribute>
		</attribute>
		<!-- encryption_key -->
		<attribute type="encryption_key">
			<public_key sym_alg="0" algorithm="0">
				><ecc_point type="compressed"/>
			</public_key>
		</attribute>
		<!-- assurance_level -->
		<!-- assurance_level -->
		<attribute type="assurance_level">
		<attribute type="assurance_level">
			<assurance level="3"/>
			<assurance level="3"/>
Loading