Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ITS - Intelligent Transport Systems
ITS
Commits
a597b36e
Commit
a597b36e
authored
Sep 11, 2018
by
Denis Filatov
Browse files
fix minCertLength in RCA,AA,EA
parent
1f0fe4bb
Changes
2
Hide whitespace changes
Inline
Side-by-side
tools/itscertgen/asn1certgen/asn1certgen.xslt
View file @
a597b36e
...
...
@@ -88,14 +88,30 @@
<xsl:template
match =
"subject"
>
<xsl:variable
name=
"eeType"
>
<xsl:choose>
<xsl:when
test=
"@type = 'AT'"
>
0
</xsl:when>
<xsl:when
test=
"@type = 'AA'"
>
0
</xsl:when>
<xsl:when
test=
"@type = 'ROOT'"
>
0
</xsl:when>
<xsl:when
test=
"@type = 'EC'"
>
1
</xsl:when>
<xsl:when
test=
"@type = 'AA'"
>
0
</xsl:when>
<xsl:when
test=
"@type = 'AT'"
>
0
</xsl:when>
<xsl:when
test=
"@type = 'TLM'"
>
0
</xsl:when>
<xsl:when
test=
"@type = 'EA'"
>
1
</xsl:when>
<xsl:when
test=
"@type = 'EC'"
>
1
</xsl:when>
<xsl:otherwise>
2
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable
name=
"minChainLength"
>
<xsl:choose>
<xsl:when
test=
"@type = 'ROOT'"
>
2
</xsl:when>
<xsl:when
test=
"@type = 'AA'"
>
1
</xsl:when>
<xsl:when
test=
"@type = 'EA'"
>
1
</xsl:when>
<xsl:otherwise>
0
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable
name=
"chainLengthRange"
>
<xsl:choose>
<xsl:when
test=
"@type = 'ROOT'"
>
0
</xsl:when>
<xsl:otherwise>
0
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<toBeSigned>
<id><none></none></id>
...
...
@@ -108,6 +124,8 @@
<xsl:apply-templates
select=
"attribute[@type='its_aid_ssp_list']"
/>
<xsl:apply-templates
select=
"attribute[@type='its_aid_list']"
>
<xsl:with-param
name=
"eeType"
select=
"$eeType"
/>
<xsl:with-param
name=
"minChainLength"
select=
"$minChainLength"
/>
<xsl:with-param
name=
"chainLengthRange"
select=
"$chainLengthRange"
/>
</xsl:apply-templates>
<xsl:apply-templates
select=
"attribute[@type='encryption_key']"
/>
<xsl:apply-templates
select=
"attribute[@type='verification_key']"
/>
...
...
@@ -136,6 +154,8 @@
<xsl:template
match=
"attribute[@type='its_aid_list']"
>
<xsl:param
name=
"eeType"
/>
<xsl:param
name=
"minChainLength"
/>
<xsl:param
name=
"chainLengthRange"
/>
<certIssuePermissions>
<PsidGroupPermissions>
<subjectPermissions>
...
...
@@ -143,8 +163,8 @@
<xsl:apply-templates
mode=
"certIssuePermissions"
select=
"aid"
/>
</explicit>
</subjectPermissions>
<minChainLength>
1
</minChainLength>
<chainLengthRange>
0
</chainLengthRange>
<minChainLength>
<xsl:value-of
select=
"$minChainLength"
/>
</minChainLength>
<chainLengthRange>
<xsl:value-of
select=
"$chainLengthRange"
/>
</chainLengthRange>
<eeType><xsl:value-of
select=
"$eeType"
/></eeType>
</PsidGroupPermissions>
</certIssuePermissions>
...
...
tools/itscertgen/asn1certgen/asncodec/PsidGroupPermissions.c
View file @
a597b36e
...
...
@@ -52,8 +52,8 @@ static int asn_DFL_4_set_0(void **sptr) {
return
0
;
}
static
int
asn_DFL_5_cmp_0
(
const
void
*
sptr
)
{
uint8_t
def_buf
[]
=
{
0
};
BIT_STRING_t
def
=
{
&
def_buf
[
0
]
,
1
,
7
};
const
uint8_t
*
def_buf
[]
=
{
0
};
BIT_STRING_t
def
v
=
{
def_buf
,
1
,
7
};
return
BIT_STRING_compare
(
&
asn_DEF_EndEntityType
,
sptr
,
&
def
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment