Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TTCN-3 Libraries
LibIts
Commits
ee052906
Commit
ee052906
authored
Nov 08, 2018
by
Yann Garcia
Browse files
Change module EtsiTs102941MessagesItss into EtsiTs102941MessagesCa
parent
b951e6f1
Changes
3
Hide whitespace changes
Inline
Side-by-side
ttcn/Common/LibItsCommon_TypesAndValues.ttcn
View file @
ee052906
...
...
@@ -152,7 +152,7 @@ module LibItsCommon_TypesAndValues {
const
integer
c_its_aid_IVI
:=
139
;
const
integer
c_its_aid_TLC
:=
140
;
const
integer
c_its_aid_GN
:=
141
;
const
integer
c_its_aid_SCR
:=
3
5
;
// Secured Certificate Request
const
integer
c_its_aid_SCR
:=
62
3
;
// Secured Certificate Request
, https://standards.ieee.org/products-services/regauth/psid/public.html
}
}
with
{
...
...
ttcn/Pki/LibItsPki_Functions.ttcn
View file @
ee052906
...
...
@@ -565,7 +565,8 @@ module LibItsPki_Functions {
),
m_headerInfo_inner_ec_request
(
c_its_aid_SCR
,
f_getCurrentTimeUtc
())
f_getCurrentTimeUtc
()
)
);
// Signed the encoded InnerEcRequestSignedForPop
v_tbs_signed
:=
f_signWithEcdsaNistp256WithSha256
(
bit2oct
(
encvalue
(
v_tbs
)),
int2oct
(
0
,
32
),
p_private_key
);
...
...
@@ -591,7 +592,7 @@ module LibItsPki_Functions {
}
// End of function f_generate_inner_ec_request_signed_for_pop
function
f_generate_inner_ec_response
(
in
octetstring
p_inner_ec_request_hash
ed_id
,
in
octetstring
p_inner_ec_request_hash
,
in
EtsiTs103097Certificate
p_certificate
,
out
InnerEcResponse
p_inner_ec_response
)
return
boolean
{
...
...
@@ -600,7 +601,7 @@ module LibItsPki_Functions {
// Build the Proof of Possession InnerEcResponse
p_inner_ec_response
:=
valueof
(
m_innerEcResponse_ok
(
substr
(
p_inner_ec_request_hash
ed_id
,
0
,
16
),
substr
(
p_inner_ec_request_hash
,
0
,
16
),
p_certificate
)
);
...
...
@@ -697,12 +698,13 @@ module LibItsPki_Functions {
p_eaHashedId8
,
v_key_tag
,
valueof
(
m_certificate_subject_attributes
(
m_certificate_subject_attributes
(
// FIXME Review subjectPermissions
p_ec_certificate
.
toBeSigned
.
appPermissions
,
{
{
subjectPermissions
:=
{
all_
:=
NULL
},
minChainLength
:=
1
,
chainLengthRange
:=
0
,
eeType
:=
'00000000'B
}
},
p_ec_certificate
.
toBeSigned
.
id
,
p_ec_certificate
.
toBeSigned
.
validityPeriod
,
p_ec_certificate
.
toBeSigned
.
region
,
p_ec_certificate
.
toBeSigned
.
assuranceLevel
,
p_ec_certificate
.
toBeSigned
.
appPermissions
p_ec_certificate
.
toBeSigned
.
assuranceLevel
))));
v_hash_shared_at_request
:=
f_hashWithSha256
(
bit2oct
(
encvalue
(
p_inner_at_request
.
sharedAtRequest
)));
log
(
"v_hash_shared_at_request="
,
v_hash_shared_at_request
);
...
...
@@ -858,12 +860,21 @@ module LibItsPki_Functions {
}
// End of function f_generate_authorization_validation_request
function
f_generate_authorization_validation_response
(
in
InnerAtRequest
p_inner_at
_request
,
in
Certificate
p_
c
ertificate
,
in
octetstring
p_authorization_validation
_request
_hash
,
in
Certificate
SubjectAttributes
p_
C
ertificate
_subject_attributes
,
out
AuthorizationValidationResponse
p_authorization_validation_response
)
return
boolean
{
// TODO
return
false
;
// Local variables
// Build the Proof of Possession InnerEcResponse
p_authorization_validation_response
:=
valueof
(
m_authorizationValidationResponse_ok
(
substr
(
p_authorization_validation_request_hash
,
0
,
16
),
p_Certificate_subject_attributes
)
);
return
true
;
}
// End of function f_generate_authorization_validation_response
}
// End of group authorization_validation_xxx
...
...
ttcn/Pki/LibItsPki_Templates.ttcn
View file @
ee052906
...
...
@@ -83,8 +83,8 @@ module LibItsPki_Templates {
}
// End of template m_etsiTs102941Data_authorization_validation_request
template
(
value
)
EtsiTs102941Data
m_etsiTs102941Data_authorization_validation_response
(
in
template
(
value
)
AuthorizationValidationResponse
p_authorization_validation_response
)
:=
{
in
template
(
value
)
AuthorizationValidationResponse
p_authorization_validation_response
)
:=
{
version
:=
PkiProtocolVersion
,
content
:=
{
authorizationValidationResponse
:=
p_authorization_validation_response
...
...
@@ -319,6 +319,23 @@ module LibItsPki_Templates {
ecSignature
:=
p_ecSignature
}
// End of template m_authorizationValidationRequest
template
(
present
)
AuthorizationValidationRequest
mw_authorizationValidationRequest
(
template
(
present
)
SharedAtRequest
p_sharedAtRequest
:=
?
,
template
(
present
)
EcSignature
p_ecSignature
:=
?
)
:=
{
sharedAtRequest
:=
p_sharedAtRequest
,
ecSignature
:=
p_ecSignature
}
// End of template mw_authorizationValidationRequest
template
(
value
)
AuthorizationValidationResponse
m_authorizationValidationResponse_ok
(
template
(
value
)
Oct16
p_requestHash
,
template
(
value
)
CertificateSubjectAttributes
p_confirmedSubjectAttributes
)
:=
{
requestHash
:=
p_requestHash
,
responseCode
:=
ok
,
confirmedSubjectAttributes
:=
p_confirmedSubjectAttributes
}
// End of template m_authorizationValidationResponse_ok
template
(
present
)
AuthorizationValidationResponse
mw_authorizationValidationResponse_ok
(
template
(
present
)
Oct16
p_requestHash
:=
?
,
template
(
present
)
CertificateSubjectAttributes
p_confirmedSubjectAttributes
:=
?
...
...
@@ -381,16 +398,14 @@ module LibItsPki_Templates {
)
:=
{
ecSignature
:=
p_ecSignature
}
// End of template mw_ec_signature_ext_payload
template
(
omit
)
CertificateSubjectAttributes
m_certificate_subject_attributes
(
in
template
(
value
)
SequenceOfPsidSsp
p_appPermissions
,
in
template
(
value
)
SequenceOfPsidGroupPermissions
p_certIssuePermissions
,
in
template
(
omit
)
CertificateId
p_id
:=
omit
,
in
template
(
omit
)
ValidityPeriod
p_validityPeriod
:=
omit
,
in
template
(
omit
)
GeographicRegion
p_region
:=
omit
,
in
template
(
omit
)
SubjectAssurance
p_assuranceLevel
:=
omit
,
in
template
(
omit
)
SequenceOfPsidSsp
p_appPermissions
:=
omit
,
in
template
(
omit
)
SequenceOfPsidGroupPermissions
p_certIssuePermissions
:=
omit
in
template
(
omit
)
SubjectAssurance
p_assuranceLevel
:=
omit
)
:=
{
id
:=
p_id
,
validityPeriod
:=
p_validityPeriod
,
...
...
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