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
647b7e24
Commit
647b7e24
authored
Dec 05, 2018
by
Yann Garcia
Browse files
Final validation of Enrolment request/response
parent
fdc671be
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
.TITAN_properties
View file @
647b7e24
...
...
@@ -289,13 +289,13 @@
</FileProperties>
</FileResource>
<FileResource>
<FilePath>
ccsrc/Ports/LibIts_ports/Pki_ports/AdapterControlP
kiPort.cc
</FilePath>
<FilePath>
ccsrc/Ports/LibIts_ports/Pki_ports/AdapterControlP
ort_Pki.partC
</FilePath>
<FileProperties>
<ExcludeFromBuild>
true
</ExcludeFromBuild>
</FileProperties>
</FileResource>
<FileResource>
<FilePath>
ccsrc/Ports/LibIts_ports/Pki_ports/AdapterControlP
kiPort.hh
</FilePath>
<FilePath>
ccsrc/Ports/LibIts_ports/Pki_ports/AdapterControlP
ort_Pki.partH
</FilePath>
<FileProperties>
<ExcludeFromBuild>
true
</ExcludeFromBuild>
</FileProperties>
...
...
ttcn/AtsPki/ItsPki_TestCases.ttcn
View file @
647b7e24
This diff is collapsed.
Click to expand it.
LibIts
@
f10fbd8c
Compare
a9d34302
...
f10fbd8c
Subproject commit
a9d34302019d60f227ffc340f92a9a65c806bc0
2
Subproject commit
f10fbd8c89c6daac283cb28a548150f604af0a6
2
ttcn/TestCodec/TestCodec_Pki.ttcn
View file @
647b7e24
...
...
@@ -156,6 +156,7 @@ module TestCodec_Pki {
var
Ieee1609Dot2Data
v_dec_ieee1609dot2_encrypted_and_signed_data
;
var
Ieee1609Dot2Data
v_dec_ieee1609dot2_signed_data
;
var
bitstring
v_ieee1609dot2_signed_and_encrypted_data_msg
;
var
Oct32
v_request_hash
;
var
Oct16
v_aes_sym_key
;
var
Oct16
v_encrypted_sym_key
;
var
Oct16
v_authentication_vector
;
...
...
@@ -181,7 +182,7 @@ module TestCodec_Pki {
// Secure InnerEcRequestSignedForPoP message
v_inner_ec_request_signed_for_pop_msg
:=
encvalue
(
m_etsiTs102941Data_inner_ec_request_signed_for_pop
(
v_inner_ec_request_signed_for_pop
));
if
(
f_build_pki_secured_message
(
v_private_key
,
valueof
(
m_signerIdentifier_self
),
int2oct
(
0
,
8
),
v_publicKeyCompressed
,
v_compressedMode
,
''
O
,
bit2oct
(
v_inner_ec_request_signed_for_pop_msg
),
v_ieee1609dot2_signed_and_encrypted_data
,
v_aes_sym_key
,
v_encrypted_sym_key
,
v_authentication_vector
,
v_nonce
)
==
false
)
{
if
(
f_build_pki_secured_message
(
v_private_key
,
valueof
(
m_signerIdentifier_self
),
int2oct
(
0
,
8
),
v_publicKeyCompressed
,
v_compressedMode
,
''
O
,
bit2oct
(
v_inner_ec_request_signed_for_pop_msg
),
v_ieee1609dot2_signed_and_encrypted_data
,
v_aes_sym_key
,
v_encrypted_sym_key
,
v_authentication_vector
,
v_nonce
,
v_request_hash
)
==
false
)
{
setverdict
(
fail
,
"Failed to secure InnerEcRequest message"
);
stop
;
}
...
...
@@ -367,6 +368,7 @@ module TestCodec_Pki {
var
InnerEcResponse
v_inner_ec_response
;
var
Ieee1609Dot2Data
v_ieee1609dot2_signed_and_encrypted_data
;
var
bitstring
v_ieee1609dot2_signed_and_encrypted_data_msg
;
var
Oct32
v_request_hash
;
var
Oct16
v_aes_sym_key
;
var
Oct16
v_encrypted_sym_key
;
var
Oct16
v_authentication_vector
;
...
...
@@ -451,9 +453,9 @@ module TestCodec_Pki {
// Build secured PKI message
v_enc_msg
:=
encvalue
(
m_etsiTs102941Data_inner_ec_response
(
v_inner_ec_response
));
if
(
ischosen
(
v_cert_ts_a_ea
.
toBeSigned
.
encryptionKey
.
publicKey
.
eciesNistP256
.
compressed_y_0
))
{
v_ret
:=
f_build_pki_secured_message
(
v_private_key_cert_iut_a_ea
,
valueof
(
m_signerIdentifier_digest
(
v_hashed_id8_cert_iut_a_ea
)),
int2oct
(
0
,
8
),
v_cert_ts_a_ea
.
toBeSigned
.
encryptionKey
.
publicKey
.
eciesNistP256
.
compressed_y_0
,
0
,
''
O
,
bit2oct
(
v_enc_msg
),
v_ieee1609dot2_signed_and_encrypted_data
,
v_aes_sym_key
,
v_encrypted_sym_key
,
v_authentication_vector
,
v_nonce
);
v_ret
:=
f_build_pki_secured_message
(
v_private_key_cert_iut_a_ea
,
valueof
(
m_signerIdentifier_digest
(
v_hashed_id8_cert_iut_a_ea
)),
int2oct
(
0
,
8
),
v_cert_ts_a_ea
.
toBeSigned
.
encryptionKey
.
publicKey
.
eciesNistP256
.
compressed_y_0
,
0
,
''
O
,
bit2oct
(
v_enc_msg
),
v_ieee1609dot2_signed_and_encrypted_data
,
v_aes_sym_key
,
v_encrypted_sym_key
,
v_authentication_vector
,
v_nonce
,
v_request_hash
);
}
else
{
v_ret
:=
f_build_pki_secured_message
(
v_private_key_cert_iut_a_ea
,
valueof
(
m_signerIdentifier_digest
(
v_hashed_id8_cert_iut_a_ea
)),
int2oct
(
0
,
8
),
v_cert_ts_a_ea
.
toBeSigned
.
encryptionKey
.
publicKey
.
eciesNistP256
.
compressed_y_1
,
1
,
''
O
,
bit2oct
(
v_enc_msg
),
v_ieee1609dot2_signed_and_encrypted_data
,
v_aes_sym_key
,
v_encrypted_sym_key
,
v_authentication_vector
,
v_nonce
);
v_ret
:=
f_build_pki_secured_message
(
v_private_key_cert_iut_a_ea
,
valueof
(
m_signerIdentifier_digest
(
v_hashed_id8_cert_iut_a_ea
)),
int2oct
(
0
,
8
),
v_cert_ts_a_ea
.
toBeSigned
.
encryptionKey
.
publicKey
.
eciesNistP256
.
compressed_y_1
,
1
,
''
O
,
bit2oct
(
v_enc_msg
),
v_ieee1609dot2_signed_and_encrypted_data
,
v_aes_sym_key
,
v_encrypted_sym_key
,
v_authentication_vector
,
v_nonce
,
v_request_hash
);
}
if
(
v_ret
==
false
)
{
setverdict
(
fail
,
"Failed to secure InnerEcResponse message"
);
...
...
@@ -572,6 +574,7 @@ module TestCodec_Pki {
var
Ieee1609Dot2Data
v_ieee1609dot2_signed_and_encrypted_data
;
var
bitstring
v_ieee1609dot2_signed_and_encrypted_data_msg
;
var
Ieee1609Dot2Data
v_dec_ieee1609dot2_encrypted_and_signed_data
;
var
Oct32
v_request_hash
;
var
Oct16
v_aes_sym_key
;
var
Oct16
v_encrypted_sym_key
;
var
Oct16
v_authentication_vector
;
...
...
@@ -664,9 +667,9 @@ module TestCodec_Pki {
// Build secured PKI message
v_enc_msg
:=
encvalue
(
m_etsiTs102941Data_authorization_validation_response
(
v_authorization_validation_response
));
if
(
ischosen
(
v_cert_ts_a_ea
.
toBeSigned
.
encryptionKey
.
publicKey
.
eciesNistP256
.
compressed_y_0
))
{
v_ret
:=
f_build_pki_secured_message
(
v_private_key_cert_iut_a_ea
,
valueof
(
m_signerIdentifier_digest
(
v_hashed_id8_cert_iut_a_ea
)),
int2oct
(
0
,
8
),
v_cert_ts_a_ea
.
toBeSigned
.
encryptionKey
.
publicKey
.
eciesNistP256
.
compressed_y_0
,
0
,
''
O
,
bit2oct
(
v_enc_msg
),
v_ieee1609dot2_signed_and_encrypted_data
,
v_aes_sym_key
,
v_encrypted_sym_key
,
v_authentication_vector
,
v_nonce
);
v_ret
:=
f_build_pki_secured_message
(
v_private_key_cert_iut_a_ea
,
valueof
(
m_signerIdentifier_digest
(
v_hashed_id8_cert_iut_a_ea
)),
int2oct
(
0
,
8
),
v_cert_ts_a_ea
.
toBeSigned
.
encryptionKey
.
publicKey
.
eciesNistP256
.
compressed_y_0
,
0
,
''
O
,
bit2oct
(
v_enc_msg
),
v_ieee1609dot2_signed_and_encrypted_data
,
v_aes_sym_key
,
v_encrypted_sym_key
,
v_authentication_vector
,
v_nonce
,
v_request_hash
);
}
else
{
v_ret
:=
f_build_pki_secured_message
(
v_private_key_cert_iut_a_ea
,
valueof
(
m_signerIdentifier_digest
(
v_hashed_id8_cert_iut_a_ea
)),
int2oct
(
0
,
8
),
v_cert_ts_a_ea
.
toBeSigned
.
encryptionKey
.
publicKey
.
eciesNistP256
.
compressed_y_1
,
1
,
''
O
,
bit2oct
(
v_enc_msg
),
v_ieee1609dot2_signed_and_encrypted_data
,
v_aes_sym_key
,
v_encrypted_sym_key
,
v_authentication_vector
,
v_nonce
);
v_ret
:=
f_build_pki_secured_message
(
v_private_key_cert_iut_a_ea
,
valueof
(
m_signerIdentifier_digest
(
v_hashed_id8_cert_iut_a_ea
)),
int2oct
(
0
,
8
),
v_cert_ts_a_ea
.
toBeSigned
.
encryptionKey
.
publicKey
.
eciesNistP256
.
compressed_y_1
,
1
,
''
O
,
bit2oct
(
v_enc_msg
),
v_ieee1609dot2_signed_and_encrypted_data
,
v_aes_sym_key
,
v_encrypted_sym_key
,
v_authentication_vector
,
v_nonce
,
v_request_hash
);
}
if
(
v_ret
==
false
)
{
setverdict
(
fail
,
"Failed to secure InnerEcResponse message"
);
...
...
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