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
e0f2ad9f
Commit
e0f2ad9f
authored
Feb 22, 2019
by
Yann Garcia
Browse files
Bug fixed on pskRecipInfog content
parent
4cddd0bd
Changes
1
Hide whitespace changes
Inline
Side-by-side
ttcn/Pki/LibItsPki_Functions.ttcn
View file @
e0f2ad9f
/**
/**
* @author ETSI / STF544
* @version $URL$
* $Id$
...
...
@@ -385,10 +385,10 @@ module LibItsPki_Functions {
)
return
boolean
{
var
boolean
v_ret
:=
false
;
log
(
"
>>> f_verifyEcdsa: p_tbs"
,
p_tbs
);
log
(
"
>>> f_verifyEcdsa: p_issuer"
,
p_issuer
);
log
(
"
>>> f_verifyEcdsa: p_signature_"
,
p_signature_
);
log
(
"
>>> f_verifyEcdsa: p_verification_key"
,
p_verification_key
);
log
(
">>> f_verifyEcdsa: p_tbs
=
"
,
p_tbs
);
log
(
">>> f_verifyEcdsa: p_issuer
=
"
,
p_issuer
);
log
(
">>> f_verifyEcdsa: p_signature_
=
"
,
p_signature_
);
log
(
">>> f_verifyEcdsa: p_verification_key
=
"
,
p_verification_key
);
if
(
ischosen
(
p_verification_key
.
ecdsaNistP256
))
{
if
(
ischosen
(
p_verification_key
.
ecdsaNistP256
.
compressed_y_0
))
{
...
...
@@ -1020,12 +1020,12 @@ module LibItsPki_Functions {
),
m_validityPeriod
(
f_getCurrentTime
()
/
1000
,
m_duration_
yea
rs
(
1
)
m_duration_
in_hou
rs
(
1
20
)
),
m_geographicRegion_identifiedRegion
(
{
m_identifiedRegion_country_only
(
12
),
m_identifiedRegion_country_only
(
3
4
)
m_identifiedRegion_country_only
(
250
),
// TODO PIXIT
m_identifiedRegion_country_only
(
3
80
)
}
)
)
...
...
@@ -1172,12 +1172,12 @@ module LibItsPki_Functions {
),
m_validityPeriod
(
f_getCurrentTime
()
/
1000
,
m_duration_
yea
rs
(
1
)
m_duration_
in_hou
rs
(
1
20
)
),
m_geographicRegion_identifiedRegion
(
{
m_identifiedRegion_country_only
(
12
),
m_identifiedRegion_country_only
(
3
4
)
m_identifiedRegion_country_only
(
250
),
// TODO PIXIT
m_identifiedRegion_country_only
(
3
80
)
}
)
)
...
...
@@ -1327,13 +1327,13 @@ module LibItsPki_Functions {
f_getCurrentTime
()
/
1000
,
m_duration_in_hours
(
120
)
// TODO Use PIXIT
),
omit
/*YANN TO restore
m_geographicRegion_identifiedRegion(
m_geographicRegion_identifiedRegion
(
{
m_identifiedRegion_country_only(
1
2), // TODO Use PIXIT
m_identifiedRegion_country_only(3
4
) // TODO Use PIXIT
m_identifiedRegion_country_only
(
2
50
),
// TODO Use PIXIT
m_identifiedRegion_country_only
(
3
80
)
// TODO Use PIXIT
}
)*/
,
omit
/*
'C0'O
*/
// TODO Use PIXIT
)
,
'00'O
//
'C0'O // TODO Use PIXIT
)
)
);
...
...
@@ -1622,13 +1622,7 @@ module LibItsPki_Functions {
p_ec_certificate
.
toBeSigned
.
certRequestPermissions
,
p_ec_certificate
.
toBeSigned
.
id
,
p_ec_certificate
.
toBeSigned
.
validityPeriod
,
p_ec_certificate
.
toBeSigned
.
region
,
/*m_geographicRegion_identifiedRegion(
{
m_identifiedRegion_country_only(250),
m_identifiedRegion_country_only(380)
}
)
,*/
p_ec_certificate
.
toBeSigned
.
region
,
p_ec_certificate
.
toBeSigned
.
assuranceLevel
)))
// Desired attributes
);
...
...
@@ -1897,6 +1891,7 @@ module LibItsPki_Functions {
var
Oct32
v_request_hash
;
var
Oct16
v_encrypted_sym_key
;
var
Oct16
v_aes_sym_key
;
var
HashedId8
v_aes_sym_key_hashed_id8
;
var
Oct16
v_authentication_vector
;
var
Oct12
v_nonce
;
var
octetstring
v_salt
;
...
...
@@ -1907,6 +1902,7 @@ module LibItsPki_Functions {
log
(
">>> f_await_http_inner_ec_request_response: p_strict_checks="
,
p_strict_checks
);
f_http_build_inner_ec_request
(
p_private_key
,
p_compressed_public_key
,
p_compressed_mode
,
v_aes_sym_key
,
v_encrypted_sym_key
,
v_authentication_vector
,
v_nonce
,
v_salt
,
v_ieee1609dot2_signed_and_encrypted_data
,
v_request_hash
);
v_aes_sym_key_hashed_id8
:=
f_HashedId8FromSha256
(
f_hashWithSha256
(
'
80
'
O
&
v_aes_sym_key
));
// Used to macth the response
f_init_default_headers_list
(
-
,
"inner_ec_request"
,
v_headers
);
f_http_send
(
v_headers
,
...
...
@@ -1927,7 +1923,7 @@ module LibItsPki_Functions {
mw_binary_body_ieee1609dot2_data
(
mw_enrolmentResponseMessage
(
mw_encryptedData
(
-
,
{
*
,
mw_recipientInfo_pskRecipInfo
(
v_aes_sym_key_hashed_id8
),
*
}
,
mw_SymmetricCiphertext_aes128ccm
)))))),
v_response
...
...
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