Loading ttcn/GeoNetworking/LibItsGeoNetworking_Functions.ttcn +60 −0 Original line number Diff line number Diff line Loading @@ -2307,6 +2307,20 @@ module LibItsGeoNetworking_Functions { ) {} } /** * @desc Receive GN message with security containing certificate chain as a signer info * @param p_cert returns the certificate used for sign received message */ altstep a_securedMessageWithCertificateChain ( out SecuredMessage p_received ) runs on ItsGeoNetworking { var SecuredMessage v_secMsg; []a_securedMessage ( mw_securedMessage (superset(mw_header_field_signer_info_certificate_chain)), p_received ) {} } /** * @desc Receive GN message with security containing digest as a signer info * @param p_cert returns the certificate used for sign received message Loading Loading @@ -2341,6 +2355,52 @@ module LibItsGeoNetworking_Functions { } return v_cert; } /** * @desc Wait for GN message with security containing certificate chain as a signer info * @return the certificate used for sign received message */ function f_waitForCertificateChain () runs on ItsGeoNetworking return CertificateChain { var SecuredMessage v_recv; var CertificateChain v_chain; alt { [] a_securedMessageWithCertificateChain(v_recv){ var SignerInfo v_si := f_getMsgSignerInfo(v_recv); v_chain := v_si.signerInfo.certificates; } } return v_chain; } /** * @desc Ask for the certificate chain and wait for GN message with security containing certificate chain as a signer info * @return the certificate chain used for sign received message */ function f_askAndWaitForCertificateChain () runs on ItsGeoNetworking return CertificateChain { var CertificateChain v_chain := null; var SecuredMessage v_recv; var SignerInfo v_si; alt { [] a_securedMessageWithCertificate(v_recv){ v_si := f_getMsgSignerInfo(v_recv); v_si := f_getCertificateSignerInfo(v_si.signerInfo.certificate); if(match (v_si.type_, e_certificate_digest_with_ecdsap256)){ f_askForCertificate(v_si.signerInfo.digest); if(tc_ac.running){ tc_ac.stop;tc_ac.start; } repeat; } } [] a_securedMessageWithCertificateChain(v_recv){ v_si := f_getMsgSignerInfo(v_recv); v_chain := v_si.signerInfo.certificates; } } return v_chain; } /** * @desc Wait for GN message with security containing digest as a signer info * @return the digest of the certificate been used to sign received message Loading ttcn/Security/LibItsSecurity_Functions.ttcn3 +8 −1 Original line number Diff line number Diff line Loading @@ -531,7 +531,7 @@ module LibItsSecurity_Functions { in template (value) SecuredMessage p_securedMessage, in HeaderFieldType p_headerFieldType ) return HeaderField { var HeaderField v_return; var HeaderField v_return := null; var integer v_length := lengthof(p_securedMessage.header_fields); var integer v_index; Loading Loading @@ -693,6 +693,13 @@ module LibItsSecurity_Functions { // TODO: implement it return true; } function f_isRectangularRegionsInside(in template (value) RectangularRegions p_parent, in template (value) RectangularRegions p_region ) return boolean { //TODO: implement it return true; } } } // End of module LibItsSecurity_Functions No newline at end of file Loading
ttcn/GeoNetworking/LibItsGeoNetworking_Functions.ttcn +60 −0 Original line number Diff line number Diff line Loading @@ -2307,6 +2307,20 @@ module LibItsGeoNetworking_Functions { ) {} } /** * @desc Receive GN message with security containing certificate chain as a signer info * @param p_cert returns the certificate used for sign received message */ altstep a_securedMessageWithCertificateChain ( out SecuredMessage p_received ) runs on ItsGeoNetworking { var SecuredMessage v_secMsg; []a_securedMessage ( mw_securedMessage (superset(mw_header_field_signer_info_certificate_chain)), p_received ) {} } /** * @desc Receive GN message with security containing digest as a signer info * @param p_cert returns the certificate used for sign received message Loading Loading @@ -2341,6 +2355,52 @@ module LibItsGeoNetworking_Functions { } return v_cert; } /** * @desc Wait for GN message with security containing certificate chain as a signer info * @return the certificate used for sign received message */ function f_waitForCertificateChain () runs on ItsGeoNetworking return CertificateChain { var SecuredMessage v_recv; var CertificateChain v_chain; alt { [] a_securedMessageWithCertificateChain(v_recv){ var SignerInfo v_si := f_getMsgSignerInfo(v_recv); v_chain := v_si.signerInfo.certificates; } } return v_chain; } /** * @desc Ask for the certificate chain and wait for GN message with security containing certificate chain as a signer info * @return the certificate chain used for sign received message */ function f_askAndWaitForCertificateChain () runs on ItsGeoNetworking return CertificateChain { var CertificateChain v_chain := null; var SecuredMessage v_recv; var SignerInfo v_si; alt { [] a_securedMessageWithCertificate(v_recv){ v_si := f_getMsgSignerInfo(v_recv); v_si := f_getCertificateSignerInfo(v_si.signerInfo.certificate); if(match (v_si.type_, e_certificate_digest_with_ecdsap256)){ f_askForCertificate(v_si.signerInfo.digest); if(tc_ac.running){ tc_ac.stop;tc_ac.start; } repeat; } } [] a_securedMessageWithCertificateChain(v_recv){ v_si := f_getMsgSignerInfo(v_recv); v_chain := v_si.signerInfo.certificates; } } return v_chain; } /** * @desc Wait for GN message with security containing digest as a signer info * @return the digest of the certificate been used to sign received message Loading
ttcn/Security/LibItsSecurity_Functions.ttcn3 +8 −1 Original line number Diff line number Diff line Loading @@ -531,7 +531,7 @@ module LibItsSecurity_Functions { in template (value) SecuredMessage p_securedMessage, in HeaderFieldType p_headerFieldType ) return HeaderField { var HeaderField v_return; var HeaderField v_return := null; var integer v_length := lengthof(p_securedMessage.header_fields); var integer v_index; Loading Loading @@ -693,6 +693,13 @@ module LibItsSecurity_Functions { // TODO: implement it return true; } function f_isRectangularRegionsInside(in template (value) RectangularRegions p_parent, in template (value) RectangularRegions p_region ) return boolean { //TODO: implement it return true; } } } // End of module LibItsSecurity_Functions No newline at end of file