Loading ttcn/Pki/LibItsPki_Functions.ttcn +20 −24 Original line number Original line Diff line number Diff line Loading @@ -385,10 +385,10 @@ module LibItsPki_Functions { ) return boolean { ) return boolean { var boolean v_ret := false; var boolean v_ret := false; log(" >>> f_verifyEcdsa: p_tbs", p_tbs); log(">>> f_verifyEcdsa: p_tbs= ", p_tbs); log(" >>> f_verifyEcdsa: p_issuer", p_issuer); log(">>> f_verifyEcdsa: p_issuer= ", p_issuer); log(" >>> f_verifyEcdsa: p_signature_", p_signature_); log(">>> f_verifyEcdsa: p_signature_= ", p_signature_); log(" >>> f_verifyEcdsa: p_verification_key", p_verification_key); log(">>> f_verifyEcdsa: p_verification_key= ", p_verification_key); if (ischosen(p_verification_key.ecdsaNistP256)) { if (ischosen(p_verification_key.ecdsaNistP256)) { if (ischosen(p_verification_key.ecdsaNistP256.compressed_y_0)) { if (ischosen(p_verification_key.ecdsaNistP256.compressed_y_0)) { Loading Loading @@ -1020,12 +1020,12 @@ module LibItsPki_Functions { ), ), m_validityPeriod( m_validityPeriod( f_getCurrentTime() / 1000, f_getCurrentTime() / 1000, m_duration_years(1) m_duration_in_hours(120) ), ), m_geographicRegion_identifiedRegion( m_geographicRegion_identifiedRegion( { { m_identifiedRegion_country_only(12), m_identifiedRegion_country_only(250), // TODO PIXIT m_identifiedRegion_country_only(34) m_identifiedRegion_country_only(380) } } ) ) ) ) Loading Loading @@ -1172,12 +1172,12 @@ module LibItsPki_Functions { ), ), m_validityPeriod( m_validityPeriod( f_getCurrentTime() / 1000, f_getCurrentTime() / 1000, m_duration_years(1) m_duration_in_hours(120) ), ), m_geographicRegion_identifiedRegion( m_geographicRegion_identifiedRegion( { { m_identifiedRegion_country_only(12), m_identifiedRegion_country_only(250), // TODO PIXIT m_identifiedRegion_country_only(34) m_identifiedRegion_country_only(380) } } ) ) ) ) Loading Loading @@ -1327,13 +1327,13 @@ module LibItsPki_Functions { f_getCurrentTime() / 1000, f_getCurrentTime() / 1000, m_duration_in_hours(120) // TODO Use PIXIT m_duration_in_hours(120) // TODO Use PIXIT ), ), omit/*YANN TO restore m_geographicRegion_identifiedRegion( m_geographicRegion_identifiedRegion( { { m_identifiedRegion_country_only(12), // TODO Use PIXIT m_identifiedRegion_country_only(250), // TODO Use PIXIT m_identifiedRegion_country_only(34) // TODO Use PIXIT m_identifiedRegion_country_only(380) // TODO Use PIXIT } } )*/, ), omit/*'C0'O*/ // TODO Use PIXIT '00'O//'C0'O // TODO Use PIXIT ) ) ) ) ); ); Loading Loading @@ -1622,13 +1622,7 @@ module LibItsPki_Functions { p_ec_certificate.toBeSigned.certRequestPermissions, p_ec_certificate.toBeSigned.certRequestPermissions, p_ec_certificate.toBeSigned.id, p_ec_certificate.toBeSigned.id, p_ec_certificate.toBeSigned.validityPeriod, p_ec_certificate.toBeSigned.validityPeriod, p_ec_certificate.toBeSigned.region,/*m_geographicRegion_identifiedRegion( p_ec_certificate.toBeSigned.region, { m_identifiedRegion_country_only(250), m_identifiedRegion_country_only(380) } ) ,*/ p_ec_certificate.toBeSigned.assuranceLevel p_ec_certificate.toBeSigned.assuranceLevel ))) // Desired attributes ))) // Desired attributes ); ); Loading Loading @@ -1897,6 +1891,7 @@ module LibItsPki_Functions { var Oct32 v_request_hash; var Oct32 v_request_hash; var Oct16 v_encrypted_sym_key; var Oct16 v_encrypted_sym_key; var Oct16 v_aes_sym_key; var Oct16 v_aes_sym_key; var HashedId8 v_aes_sym_key_hashed_id8; var Oct16 v_authentication_vector; var Oct16 v_authentication_vector; var Oct12 v_nonce; var Oct12 v_nonce; var octetstring v_salt; var octetstring v_salt; Loading @@ -1907,6 +1902,7 @@ module LibItsPki_Functions { log(">>> f_await_http_inner_ec_request_response: p_strict_checks=", p_strict_checks); 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); 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_init_default_headers_list(-, "inner_ec_request", v_headers); f_http_send( f_http_send( v_headers, v_headers, Loading @@ -1927,7 +1923,7 @@ module LibItsPki_Functions { mw_binary_body_ieee1609dot2_data( mw_binary_body_ieee1609dot2_data( mw_enrolmentResponseMessage( mw_enrolmentResponseMessage( mw_encryptedData( mw_encryptedData( -, { *, mw_recipientInfo_pskRecipInfo(v_aes_sym_key_hashed_id8), * }, mw_SymmetricCiphertext_aes128ccm mw_SymmetricCiphertext_aes128ccm )))))), )))))), v_response v_response Loading Loading
ttcn/Pki/LibItsPki_Functions.ttcn +20 −24 Original line number Original line Diff line number Diff line Loading @@ -385,10 +385,10 @@ module LibItsPki_Functions { ) return boolean { ) return boolean { var boolean v_ret := false; var boolean v_ret := false; log(" >>> f_verifyEcdsa: p_tbs", p_tbs); log(">>> f_verifyEcdsa: p_tbs= ", p_tbs); log(" >>> f_verifyEcdsa: p_issuer", p_issuer); log(">>> f_verifyEcdsa: p_issuer= ", p_issuer); log(" >>> f_verifyEcdsa: p_signature_", p_signature_); log(">>> f_verifyEcdsa: p_signature_= ", p_signature_); log(" >>> f_verifyEcdsa: p_verification_key", p_verification_key); log(">>> f_verifyEcdsa: p_verification_key= ", p_verification_key); if (ischosen(p_verification_key.ecdsaNistP256)) { if (ischosen(p_verification_key.ecdsaNistP256)) { if (ischosen(p_verification_key.ecdsaNistP256.compressed_y_0)) { if (ischosen(p_verification_key.ecdsaNistP256.compressed_y_0)) { Loading Loading @@ -1020,12 +1020,12 @@ module LibItsPki_Functions { ), ), m_validityPeriod( m_validityPeriod( f_getCurrentTime() / 1000, f_getCurrentTime() / 1000, m_duration_years(1) m_duration_in_hours(120) ), ), m_geographicRegion_identifiedRegion( m_geographicRegion_identifiedRegion( { { m_identifiedRegion_country_only(12), m_identifiedRegion_country_only(250), // TODO PIXIT m_identifiedRegion_country_only(34) m_identifiedRegion_country_only(380) } } ) ) ) ) Loading Loading @@ -1172,12 +1172,12 @@ module LibItsPki_Functions { ), ), m_validityPeriod( m_validityPeriod( f_getCurrentTime() / 1000, f_getCurrentTime() / 1000, m_duration_years(1) m_duration_in_hours(120) ), ), m_geographicRegion_identifiedRegion( m_geographicRegion_identifiedRegion( { { m_identifiedRegion_country_only(12), m_identifiedRegion_country_only(250), // TODO PIXIT m_identifiedRegion_country_only(34) m_identifiedRegion_country_only(380) } } ) ) ) ) Loading Loading @@ -1327,13 +1327,13 @@ module LibItsPki_Functions { f_getCurrentTime() / 1000, f_getCurrentTime() / 1000, m_duration_in_hours(120) // TODO Use PIXIT m_duration_in_hours(120) // TODO Use PIXIT ), ), omit/*YANN TO restore m_geographicRegion_identifiedRegion( m_geographicRegion_identifiedRegion( { { m_identifiedRegion_country_only(12), // TODO Use PIXIT m_identifiedRegion_country_only(250), // TODO Use PIXIT m_identifiedRegion_country_only(34) // TODO Use PIXIT m_identifiedRegion_country_only(380) // TODO Use PIXIT } } )*/, ), omit/*'C0'O*/ // TODO Use PIXIT '00'O//'C0'O // TODO Use PIXIT ) ) ) ) ); ); Loading Loading @@ -1622,13 +1622,7 @@ module LibItsPki_Functions { p_ec_certificate.toBeSigned.certRequestPermissions, p_ec_certificate.toBeSigned.certRequestPermissions, p_ec_certificate.toBeSigned.id, p_ec_certificate.toBeSigned.id, p_ec_certificate.toBeSigned.validityPeriod, p_ec_certificate.toBeSigned.validityPeriod, p_ec_certificate.toBeSigned.region,/*m_geographicRegion_identifiedRegion( p_ec_certificate.toBeSigned.region, { m_identifiedRegion_country_only(250), m_identifiedRegion_country_only(380) } ) ,*/ p_ec_certificate.toBeSigned.assuranceLevel p_ec_certificate.toBeSigned.assuranceLevel ))) // Desired attributes ))) // Desired attributes ); ); Loading Loading @@ -1897,6 +1891,7 @@ module LibItsPki_Functions { var Oct32 v_request_hash; var Oct32 v_request_hash; var Oct16 v_encrypted_sym_key; var Oct16 v_encrypted_sym_key; var Oct16 v_aes_sym_key; var Oct16 v_aes_sym_key; var HashedId8 v_aes_sym_key_hashed_id8; var Oct16 v_authentication_vector; var Oct16 v_authentication_vector; var Oct12 v_nonce; var Oct12 v_nonce; var octetstring v_salt; var octetstring v_salt; Loading @@ -1907,6 +1902,7 @@ module LibItsPki_Functions { log(">>> f_await_http_inner_ec_request_response: p_strict_checks=", p_strict_checks); 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); 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_init_default_headers_list(-, "inner_ec_request", v_headers); f_http_send( f_http_send( v_headers, v_headers, Loading @@ -1927,7 +1923,7 @@ module LibItsPki_Functions { mw_binary_body_ieee1609dot2_data( mw_binary_body_ieee1609dot2_data( mw_enrolmentResponseMessage( mw_enrolmentResponseMessage( mw_encryptedData( mw_encryptedData( -, { *, mw_recipientInfo_pskRecipInfo(v_aes_sym_key_hashed_id8), * }, mw_SymmetricCiphertext_aes128ccm mw_SymmetricCiphertext_aes128ccm )))))), )))))), v_response v_response Loading