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
82720e15
Commit
82720e15
authored
Oct 19, 2018
by
garciay
Browse files
STF545: Review TPlan
parent
919a3f42
Changes
2
Show whitespace changes
Inline
Side-by-side
ttcn/Pki/LibItsPki_Functions.ttcn
View file @
82720e15
...
@@ -481,9 +481,11 @@ module LibItsPki_Functions {
...
@@ -481,9 +481,11 @@ module LibItsPki_Functions {
var
boolean
v_ret
;
var
boolean
v_ret
;
// 1. Decrypt the data
// 1. Decrypt the data
if
((
p_check_security
==
true
)
and
(
f_decrypt
(
v_private_enc_key
,
p_ieee1609dot2_encrypted_and_signed_data
,
v_ieee1609dot2_signed_data
)
==
false
))
{
if
(
f_decrypt
(
v_private_enc_key
,
p_ieee1609dot2_encrypted_and_signed_data
,
v_ieee1609dot2_signed_data
)
==
false
)
{
if
(
p_check_security
==
true
)
{
return
false
;
return
false
;
}
}
}
log
(
"v_ieee1609dot2_signed_data= "
,
v_ieee1609dot2_signed_data
);
log
(
"v_ieee1609dot2_signed_data= "
,
v_ieee1609dot2_signed_data
);
// 2. Check the signature
// 2. Check the signature
...
@@ -503,9 +505,11 @@ module LibItsPki_Functions {
...
@@ -503,9 +505,11 @@ module LibItsPki_Functions {
p_peer_certificate
.
toBeSigned
.
verifyKeyIndicator
.
verificationKey
.
ecdsaNistP256
.
compressed_y_1
,
p_peer_certificate
.
toBeSigned
.
verifyKeyIndicator
.
verificationKey
.
ecdsaNistP256
.
compressed_y_1
,
1
);
1
);
}
}
if
((
v_ret
==
false
)
and
(
p_check_security
==
true
))
{
if
(
v_ret
==
false
)
{
if
(
p_check_security
==
true
)
{
return
false
;
return
false
;
}
}
}
// 3. Retrun the PKI message
// 3. Retrun the PKI message
v_etsi_ts_102941_data_msg
:=
oct2bit
(
v_ieee1609dot2_signed_data
.
content
.
signedData
.
tbsData
.
payload
.
data
.
content
.
unsecuredData
);
v_etsi_ts_102941_data_msg
:=
oct2bit
(
v_ieee1609dot2_signed_data
.
content
.
signedData
.
tbsData
.
payload
.
data
.
content
.
unsecuredData
);
...
@@ -513,9 +517,11 @@ module LibItsPki_Functions {
...
@@ -513,9 +517,11 @@ module LibItsPki_Functions {
return
false
;
return
false
;
}
}
if
((
p_check_security
==
true
)
and
(
p_etsi_ts_102941_data
.
version
!=
PkiProtocolVersion
))
{
if
(
p_etsi_ts_102941_data
.
version
!=
PkiProtocolVersion
)
{
if
(
p_check_security
==
true
)
{
return
false
;
return
false
;
}
}
}
return
true
;
return
true
;
}
// End of function f_verify_pki_message
}
// End of function f_verify_pki_message
...
...
ttcn/Pki/LibItsPki_Pixits.ttcn
0 → 100644
View file @
82720e15
module
LibItsPki_Pixits
{
}
// End of module LibItsPki_Pixits
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