Loading ttcn/Http/LibItsHttp_Functions.ttcn +61 −24 Original line number Diff line number Diff line Loading @@ -44,17 +44,55 @@ module LibItsHttp_Functions { group http_headers { function f_init_default_headers_list( in charstring p_header_content_type := PICS_HEADER_CONTENT_TYPE, in charstring p_header_content_text := "", out HeaderLines p_headers ) { p_headers[0] := { c_header_host, { PICS_HEADER_HOST } }; p_headers[1] := { c_header_content_type, { PICS_HEADER_CONTENT_TYPE } }; p_headers[2] := { c_header_content_length, { "0" } }; p_headers[3] := { c_header_connection, { "keep-alive" } }; p_headers[4] := { c_header_pragma, { "no-cache" } }; p_headers[5] := { c_header_cache_control, { "no-cache" } }; var integer v_i := 0; p_headers[v_i] := { c_header_host, { PICS_HEADER_HOST } }; v_i := v_i + 1; p_headers[v_i] := { c_header_content_type, { p_header_content_type } }; v_i := v_i + 1; if (p_header_content_text != "") { p_headers[v_i] := { c_header_content_text, { p_header_content_text } }; v_i := v_i + 1; } p_headers[v_i] := { c_header_content_length, { "0" } }; v_i := v_i + 1; p_headers[v_i] := { c_header_connection, { "keep-alive" } }; v_i := v_i + 1; p_headers[v_i] := { c_header_pragma, { "no-cache" } }; v_i := v_i + 1; p_headers[v_i] := { c_header_cache_control, { "no-cache" } }; } // End of function f_init_default_headers_list function f_set_headears_list( in charstring_list p_headers_to_set, in charstring_list p_headers_value, inout HeaderLines p_headers ) { // Sanity checks if (lengthof(p_headers_to_set) == 0) { return; } else if (lengthof(p_headers) == 0) { return; } for (var integer v_idx := 0; v_idx < lengthof(p_headers_to_set); v_idx := v_idx + 1) { var integer v_jdx; for (v_jdx := 0; v_jdx < lengthof(p_headers); v_jdx := v_jdx + 1) { if (p_headers[v_jdx].header_name == p_headers_to_set[v_idx]) { p_headers[v_jdx].header_value := p_headers_value; // NOTE Codec won't encode it break; } if (v_jdx == lengthof(p_headers)) { p_headers[v_jdx].header_value := p_headers_value; } } // End of 'for' statement } // End of 'for' statement } // End of function f_set_headears_list function f_remove_headears_list( in charstring_list p_headers_to_remove, inout HeaderLines p_headers Loading @@ -67,15 +105,14 @@ module LibItsHttp_Functions { } for (var integer v_idx := 0; v_idx < lengthof(p_headers_to_remove); v_idx := v_idx + 1) { for (var integer v_jdx := 0; v_jdx < lengthof(p_headers); v_jdx := v_jdx + 1) { if (p_headers[v_jdx].header_name == p_headers_to_remove[v_idx]) { p_headers[v_jdx].header_value := omit; // NOTE Codec won't encode it break; } } // End of 'for' statement } // End of 'for' statement } // End of function f_init_default_headers_list } // End of function f_remove_headears_list } // End of group http_headers Loading ttcn/Http/LibItsHttp_TypesAndValues.ttcn +1 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ module LibItsHttp_TypesAndValues { const charstring c_header_host := "Host"; const charstring c_header_content_type := "Content-type"; const charstring c_header_content_text := "Content-text"; const charstring c_header_content_length := "Content-length"; const charstring c_header_accept := "Accept"; const charstring c_header_connection := "Connection"; Loading ttcn/Pki/LibItsPki_Functions.ttcn +354 −305 File changed.Preview size limit exceeded, changes collapsed. Show changes ttcn/Pki/LibItsPki_Pics.ttcn +8 −3 Original line number Diff line number Diff line Loading @@ -48,12 +48,17 @@ module LibItsPki_Pics { /** * @desc Certificate used by the Test System acting as AA */ modulepar charstring PICS_TS_AA_CERTIFICATE_ID := "CERT_TS_A_EA"; modulepar charstring PICS_TS_AA_CERTIFICATE_ID := "CERT_AA"; /** * @desc Certificate used by the Test System */ modulepar charstring PICS_HTTP_GET_URI := "/its/inner_ec_request"; modulepar charstring PICS_HTTP_POST_URI := "/its/inner_ec_request"; /** * @desc ITS-S with privacy */ modulepar boolean PICS_ITS_S_WITH_PRIVACY := true; /** * @desc Factory private key for verification Nist P256 Loading ttcn/Pki/LibItsPki_Pixits.ttcn +14 −1 Original line number Diff line number Diff line module LibItsPki_Pixits { /** * @desc Is the first enrolment? */ modulepar boolean PX_FIRST_ENROLMENT := true; /** * @desc Do the encryption keys be included in Authorization Request? */ modulepar boolean PX_INCLUDE_ENCRYPTION_KEYS := true; /** * @desc Do the Authorization Request use SignedWithPop mechanism? */ modulepar boolean PX_AUTHORIZATION_REQUEST_WITH_POP := true; } // End of module LibItsPki_Pixits Loading
ttcn/Http/LibItsHttp_Functions.ttcn +61 −24 Original line number Diff line number Diff line Loading @@ -44,17 +44,55 @@ module LibItsHttp_Functions { group http_headers { function f_init_default_headers_list( in charstring p_header_content_type := PICS_HEADER_CONTENT_TYPE, in charstring p_header_content_text := "", out HeaderLines p_headers ) { p_headers[0] := { c_header_host, { PICS_HEADER_HOST } }; p_headers[1] := { c_header_content_type, { PICS_HEADER_CONTENT_TYPE } }; p_headers[2] := { c_header_content_length, { "0" } }; p_headers[3] := { c_header_connection, { "keep-alive" } }; p_headers[4] := { c_header_pragma, { "no-cache" } }; p_headers[5] := { c_header_cache_control, { "no-cache" } }; var integer v_i := 0; p_headers[v_i] := { c_header_host, { PICS_HEADER_HOST } }; v_i := v_i + 1; p_headers[v_i] := { c_header_content_type, { p_header_content_type } }; v_i := v_i + 1; if (p_header_content_text != "") { p_headers[v_i] := { c_header_content_text, { p_header_content_text } }; v_i := v_i + 1; } p_headers[v_i] := { c_header_content_length, { "0" } }; v_i := v_i + 1; p_headers[v_i] := { c_header_connection, { "keep-alive" } }; v_i := v_i + 1; p_headers[v_i] := { c_header_pragma, { "no-cache" } }; v_i := v_i + 1; p_headers[v_i] := { c_header_cache_control, { "no-cache" } }; } // End of function f_init_default_headers_list function f_set_headears_list( in charstring_list p_headers_to_set, in charstring_list p_headers_value, inout HeaderLines p_headers ) { // Sanity checks if (lengthof(p_headers_to_set) == 0) { return; } else if (lengthof(p_headers) == 0) { return; } for (var integer v_idx := 0; v_idx < lengthof(p_headers_to_set); v_idx := v_idx + 1) { var integer v_jdx; for (v_jdx := 0; v_jdx < lengthof(p_headers); v_jdx := v_jdx + 1) { if (p_headers[v_jdx].header_name == p_headers_to_set[v_idx]) { p_headers[v_jdx].header_value := p_headers_value; // NOTE Codec won't encode it break; } if (v_jdx == lengthof(p_headers)) { p_headers[v_jdx].header_value := p_headers_value; } } // End of 'for' statement } // End of 'for' statement } // End of function f_set_headears_list function f_remove_headears_list( in charstring_list p_headers_to_remove, inout HeaderLines p_headers Loading @@ -67,15 +105,14 @@ module LibItsHttp_Functions { } for (var integer v_idx := 0; v_idx < lengthof(p_headers_to_remove); v_idx := v_idx + 1) { for (var integer v_jdx := 0; v_jdx < lengthof(p_headers); v_jdx := v_jdx + 1) { if (p_headers[v_jdx].header_name == p_headers_to_remove[v_idx]) { p_headers[v_jdx].header_value := omit; // NOTE Codec won't encode it break; } } // End of 'for' statement } // End of 'for' statement } // End of function f_init_default_headers_list } // End of function f_remove_headears_list } // End of group http_headers Loading
ttcn/Http/LibItsHttp_TypesAndValues.ttcn +1 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ module LibItsHttp_TypesAndValues { const charstring c_header_host := "Host"; const charstring c_header_content_type := "Content-type"; const charstring c_header_content_text := "Content-text"; const charstring c_header_content_length := "Content-length"; const charstring c_header_accept := "Accept"; const charstring c_header_connection := "Connection"; Loading
ttcn/Pki/LibItsPki_Functions.ttcn +354 −305 File changed.Preview size limit exceeded, changes collapsed. Show changes
ttcn/Pki/LibItsPki_Pics.ttcn +8 −3 Original line number Diff line number Diff line Loading @@ -48,12 +48,17 @@ module LibItsPki_Pics { /** * @desc Certificate used by the Test System acting as AA */ modulepar charstring PICS_TS_AA_CERTIFICATE_ID := "CERT_TS_A_EA"; modulepar charstring PICS_TS_AA_CERTIFICATE_ID := "CERT_AA"; /** * @desc Certificate used by the Test System */ modulepar charstring PICS_HTTP_GET_URI := "/its/inner_ec_request"; modulepar charstring PICS_HTTP_POST_URI := "/its/inner_ec_request"; /** * @desc ITS-S with privacy */ modulepar boolean PICS_ITS_S_WITH_PRIVACY := true; /** * @desc Factory private key for verification Nist P256 Loading
ttcn/Pki/LibItsPki_Pixits.ttcn +14 −1 Original line number Diff line number Diff line module LibItsPki_Pixits { /** * @desc Is the first enrolment? */ modulepar boolean PX_FIRST_ENROLMENT := true; /** * @desc Do the encryption keys be included in Authorization Request? */ modulepar boolean PX_INCLUDE_ENCRYPTION_KEYS := true; /** * @desc Do the Authorization Request use SignedWithPop mechanism? */ modulepar boolean PX_AUTHORIZATION_REQUEST_WITH_POP := true; } // End of module LibItsPki_Pixits