if(f_verify_pki_request_message(vc_eaPrivateEncKey,vc_eaWholeHash/*salt*/,vc_eaWholeHash,p_request.body.binary_body.ieee1609dot2_data,false,v_request_hash,v_etsi_ts_102941_data,v_aes_enc_key)==false){// Cannot decrypt the message, the rest is not checked yest
if(f_verify_pki_request_message(vc_eaPrivateEncKey,vc_eaWholeHash/*salt*/,vc_eaWholeHash,p_request.body.binary_body.ieee1609dot2_data,false,v_request_hash,v_etsi_ts_102941_data,v_aes_enc_key)==false){// Cannot decrypt the message
// Send error message
v_response:=m_http_response(m_http_response_ko(m_http_message_body_binary(m_binary_body_ieee1609dot2_data(v_ieee1609dot2_signed_and_encrypted_data)),p_headers,400,"Bad request"));// Initialize v_reponse with an error message
// Set verdict
p_result:=-1;
}else{
log("f_verify_http_request_from_iut: match ",match(v_etsi_ts_102941_data.content,mw_enrolmentRequest(mw_innerEcRequestSignedForPop(mw_signedData(sha256,mw_toBeSignedData(-,mw_headerInfo_inner_pki_request),p_signer)))));// TODO In TITAN, this is the only way to get the unmatching in log
log("f_verify_http_ec_request_from_iut: match ",match(v_etsi_ts_102941_data.content,mw_enrolmentRequest(mw_innerEcRequestSignedForPop(mw_signedData(sha256,mw_toBeSignedData(-,mw_headerInfo_inner_pki_request),p_signer)))));// TODO In TITAN, this is the only way to get the unmatching in log
log("f_verify_http_request_from_iut: match ",match(p_inner_ec_request,mw_innerEcRequest(p_its_id,-,mw_certificate_subject_attributes({mw_appPermissions(c_its_aid_SCR,?)}))));// TODO In TITAN, this is the only way to get the unmatching in log
log("f_verify_http_ec_request_from_iut: match ",match(p_inner_ec_request,mw_innerEcRequest(p_its_id,-,mw_certificate_subject_attributes({mw_appPermissions(c_its_aid_SCR,?)}))));// TODO In TITAN, this is the only way to get the unmatching in log
if(f_verify_pki_request_message(vc_aaPrivateEncKey,vc_aaWholeHash/*salt*/,vc_aaWholeHash,p_request.body.binary_body.ieee1609dot2_data,false,v_request_hash,v_etsi_ts_102941_data,v_aes_enc_key)==false){// Cannot decrypt the message
// Send error message
v_response:=m_http_response(m_http_response_ko(m_http_message_body_binary(m_binary_body_ieee1609dot2_data(v_ieee1609dot2_signed_and_encrypted_data)),p_headers,400,"Bad request"));// Initialize v_reponse with an error message
// Set verdict
p_result:=-1;
}else{/*
log("f_verify_http_at_request_from_iut: match ", match(v_etsi_ts_102941_data.content, mw_authorizationRequest(mw_innerEcRequestSignedForPop(mw_signedData(sha256, mw_toBeSignedData(-, mw_headerInfo_inner_pki_request), p_signer))))); // TODO In TITAN, this is the only way to get the unmatching in log
if (match(v_etsi_ts_102941_data.content, mw_enrolmentRequest(mw_innerEcRequestSignedForPop(mw_signedData(sha256, mw_toBeSignedData(-, mw_headerInfo_inner_pki_request), p_signer)))) == false) {
log("f_verify_http_at_request_from_iut: match ", match(p_inner_at_request, mw_innerEcRequest(p_its_id, -, mw_certificate_subject_attributes({mw_appPermissions(c_its_aid_SCR, ?)})))); // TODO In TITAN, this is the only way to get the unmatching in log
if (match(p_inner_at_request, mw_innerEcRequest(p_its_id, -, mw_certificate_subject_attributes({mw_appPermissions(c_its_aid_SCR, ?)}))) == false) {