Commits (1)
...@@ -13,7 +13,7 @@ module LibItsHttp_Functions { ...@@ -13,7 +13,7 @@ module LibItsHttp_Functions {
group http_preambles { group http_preambles {
/** /**
* @desc Setups default configuration * @desc Setups default configuration
* @param p_certificate_id The certificate identifier the TA shall use in case of secured IUT * @param p_certificate_id The certificate identifier the TA shall use in case of secured IUT
*/ */
function f_cfUp( function f_cfUp(
...@@ -65,13 +65,15 @@ module LibItsHttp_Functions { ...@@ -65,13 +65,15 @@ module LibItsHttp_Functions {
p_headers[v_i] := { c_header_pragma, { "no-cache" } }; p_headers[v_i] := { c_header_pragma, { "no-cache" } };
v_i := v_i + 1; v_i := v_i + 1;
p_headers[v_i] := { c_header_cache_control, { "no-cache" } }; p_headers[v_i] := { c_header_cache_control, { "no-cache" } };
//v_i := v_i + 1;
//p_headers[v_i] := { c_header_accept, { "application/x-its-response" } };
} // End of function f_init_default_headers_list } // End of function f_init_default_headers_list
function f_set_headears_list( function f_set_headers_list(
in charstring_list p_headers_to_set, in charstring_list p_headers_to_set,
in charstring_list p_headers_value, in charstring_list p_headers_value,
inout HeaderLines p_headers inout HeaderLines p_headers
) { ) {
// Sanity checks // Sanity checks
if (lengthof(p_headers_to_set) == 0) { if (lengthof(p_headers_to_set) == 0) {
return; return;
...@@ -91,12 +93,12 @@ module LibItsHttp_Functions { ...@@ -91,12 +93,12 @@ module LibItsHttp_Functions {
} }
} // End of 'for' statement } // End of 'for' statement
} // End of 'for' statement } // End of 'for' statement
} // End of function f_set_headears_list } // End of function f_set_headers_list
function f_remove_headears_list( function f_remove_headers_list(
in charstring_list p_headers_to_remove, in charstring_list p_headers_to_remove,
inout HeaderLines p_headers inout HeaderLines p_headers
) { ) {
// Sanity checks // Sanity checks
if (lengthof(p_headers_to_remove) == 0) { if (lengthof(p_headers_to_remove) == 0) {
return; return;
...@@ -112,7 +114,27 @@ module LibItsHttp_Functions { ...@@ -112,7 +114,27 @@ module LibItsHttp_Functions {
} }
} // End of 'for' statement } // End of 'for' statement
} // End of 'for' statement } // End of 'for' statement
} // End of function f_remove_headears_list } // End of function f_remove_headers_list
function f_get_header(
in HeaderLines p_headers,
in charstring p_header_name := c_header_content_text,
out charstring_list p_header_value
) {
// Sanity checks
if (lengthof(p_header_name) == 0) {
return;
} else if (lengthof(p_headers) == 0) {
return;
}
for (var integer v_jdx := 0; v_jdx < lengthof(p_headers); v_jdx := v_jdx + 1) {
if (p_headers[v_jdx].header_name == p_header_name) {
p_header_value := p_headers[v_jdx].header_value; // NOTE Codec won't encode it
break;
}
} // End of 'for' statement
} // End of function f_get_header
} // End of group http_headers } // End of group http_headers
......
This diff is collapsed.
...@@ -15,11 +15,6 @@ module LibItsPki_Pics { ...@@ -15,11 +15,6 @@ module LibItsPki_Pics {
*/ */
modulepar boolean PICS_IUT_AA_ROLE := true; modulepar boolean PICS_IUT_AA_ROLE := true;
/**
* @desc Does the IUT act as combined EA-AA device?
*/
modulepar boolean PICS_IUT_COMBINED_EA_AA_ROLE := false;
/** /**
* @desc Does the IUT support enrolment? * @desc Does the IUT support enrolment?
*/ */
...@@ -70,6 +65,26 @@ module LibItsPki_Pics { ...@@ -70,6 +65,26 @@ module LibItsPki_Pics {
*/ */
modulepar charstring PICS_TS_AA_CERTIFICATE_ID := "CERT_AA"; modulepar charstring PICS_TS_AA_CERTIFICATE_ID := "CERT_AA";
/**
* @desc Set to true if different end points are used for EC and AT
*/
modulepar boolean PICS_MULTIPLE_END_POINT := false;
/**
* @desc End point for the enrolment
*/
modulepar charstring PICS_HEADER_HOST_EC := "www.its.ec.org";
/**
* @desc End point for the authorization validation
*/
modulepar charstring PICS_HEADER_HOST_ATV := "www.its.atv.org";
/**
* @desc End point for the authorization
*/
modulepar charstring PICS_HEADER_HOST_AT := "www.its.at.org";
/** /**
* @desc Certificate used by the Test System * @desc Certificate used by the Test System
*/ */
...@@ -80,6 +95,21 @@ module LibItsPki_Pics { ...@@ -80,6 +95,21 @@ module LibItsPki_Pics {
*/ */
modulepar boolean PICS_ITS_S_WITH_PRIVACY := true; modulepar boolean PICS_ITS_S_WITH_PRIVACY := true;
/**
* @desc HTTP POST URI for InnerECRequest
*/
modulepar charstring PICS_HTTP_POST_URI_EC := "/enrolment";
/**
* @desc HTTP POST URI for InnerATRequest
*/
modulepar charstring PICS_HTTP_POST_URI_AT := "/authorize";
/**
* @desc HTTP POST URI for authorization validation
*/
modulepar charstring PICS_HTTP_POST_URI_ATV := "/authorize_validate";
/** /**
* @desc Factory private key for verification Nist P256 * @desc Factory private key for verification Nist P256
*/ */
......
...@@ -59,12 +59,20 @@ module LibItsPki_TestSystem { ...@@ -59,12 +59,20 @@ module LibItsPki_TestSystem {
* @desc System component * @desc System component
*/ */
type component ItsPkiHttpSystem extends HttpTestAdapter{ type component ItsPkiHttpSystem extends HttpTestAdapter{
/** Use httPort when EC and AT are served by the same end point */
port HttpPort httpEcPort; /** Enrolment end point */
port HttpPort httpAtVPort; /** Authorization Validation end point */
port HttpPort httpAtPort; /** Authorization end point */
} // End of component ItsPkiHttpSystem } // End of component ItsPkiHttpSystem
/** /**
* @desc Test component for PKI entities execpt ITS-S * @desc Test component for PKI entities execpt ITS-S
*/ */
type component ItsPkiHttp extends ItsSecurityBaseComponent, HttpComponent { type component ItsPkiHttp extends ItsSecurityBaseComponent, HttpComponent {
/** Use httPort when EC and AT are served by the same end point */
port HttpPort httpEcPort; /** Enrolment end point */
port HttpPort httpAtVPort; /** Authorization Validation end point */
port HttpPort httpAtPort; /** Authorization end point */
var Certificate vc_eaCertificate; /** Test Adapter EA certificate */ var Certificate vc_eaCertificate; /** Test Adapter EA certificate */
var octetstring vc_eaPrivateKey; /** Test Adapter EA private key for signature */ var octetstring vc_eaPrivateKey; /** Test Adapter EA private key for signature */
// var Certificate vc_ecCertificate; /** Test Adapter AA certificate */ // var Certificate vc_ecCertificate; /** Test Adapter AA certificate */
......