Loading ttcn/GeoNetworking/LibItsGeoNetworking_Functions.ttcn +30 −23 Original line number Diff line number Diff line Loading @@ -1729,12 +1729,12 @@ module LibItsGeoNetworking_Functions { var template (value) ToBeSignedSecuredMessage v_toBeSignedSecuredMessageDigest; var template (value) ToBeSignedSecuredMessage v_toBeSignedSecuredMessageCertificate; f_loadCertificates("cfg01"); // Build the beacon template v_toBeSignedSecuredMessageDigest := f_buildSecuredMessagePayloadToBeSigned(); v_toBeSignedSecuredMessageCertificate := f_buildSecuredMessagePayloadToBeSigned(true); f_loadCertificates("cfg01"); return f_acTriggerEvent( AcGnPrimitive:{ acEnableSecurity := m_enableSecurity( vc_signingPrivateKey, Loading Loading @@ -2424,20 +2424,21 @@ module LibItsGeoNetworking_Functions { */ function f_waitForCertificate( out Certificate p_cert ) runs on ItsGeoNetworking return boolean { ) runs on ItsGeoNetworking return boolean { var SecuredMessage v_recv; var boolean v_ret := false; alt { [] a_securedMessageWithCertificate(v_recv) { var SignerInfo v_si; if (f_getMsgSignerInfo(v_recv, v_si) == true) { p_cert := v_si.signerInfo.certificate; v_ret := true; } } } } // End of 'alt' statement return v_ret; } // End of function f_waitForCertificate Loading @@ -2450,6 +2451,7 @@ module LibItsGeoNetworking_Functions { return boolean { var SecuredMessage v_recv; var boolean v_ret := false; alt { [] a_securedMessageWithCertificateChain(v_recv) { var SignerInfo v_si; Loading Loading @@ -2493,12 +2495,15 @@ module LibItsGeoNetworking_Functions { * @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 (out CertificateChain p_chain, in template(value) octetstring p_CamPayload) runs on ItsGeoNetworking return boolean { function f_askAndWaitForCertificateChain( out CertificateChain p_chain, in template(value) octetstring p_CamPayload ) runs on ItsGeoNetworking return boolean { // Local variables var SecuredMessage v_recv; var SignerInfo v_si; var boolean v_ret := false; alt { [] a_securedMessageWithCertificate(v_recv) { if(f_getMsgSignerInfo(v_recv, v_si)) { Loading @@ -2519,20 +2524,21 @@ module LibItsGeoNetworking_Functions { v_ret := true; } } } return v_ret; } } // End of 'alt' statement return v_ret; } // End of function f_askAndWaitForCertificateChain /** * @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 */ function f_waitForDigest(out HashedId8 p_digest) runs on ItsGeoNetworking return boolean { runs on ItsGeoNetworking return boolean { // Local variables var SecuredMessage v_recv; var boolean v_ret := false; alt { [] a_securedMessageWithDigest(v_recv) { var SignerInfo v_si; Loading @@ -2541,9 +2547,10 @@ module LibItsGeoNetworking_Functions { v_ret := true; } } } } // End of 'alt' statement return v_ret; } } // End of function f_waitForDigest } // End of group waitingHelpers Loading Loading
ttcn/GeoNetworking/LibItsGeoNetworking_Functions.ttcn +30 −23 Original line number Diff line number Diff line Loading @@ -1729,12 +1729,12 @@ module LibItsGeoNetworking_Functions { var template (value) ToBeSignedSecuredMessage v_toBeSignedSecuredMessageDigest; var template (value) ToBeSignedSecuredMessage v_toBeSignedSecuredMessageCertificate; f_loadCertificates("cfg01"); // Build the beacon template v_toBeSignedSecuredMessageDigest := f_buildSecuredMessagePayloadToBeSigned(); v_toBeSignedSecuredMessageCertificate := f_buildSecuredMessagePayloadToBeSigned(true); f_loadCertificates("cfg01"); return f_acTriggerEvent( AcGnPrimitive:{ acEnableSecurity := m_enableSecurity( vc_signingPrivateKey, Loading Loading @@ -2424,20 +2424,21 @@ module LibItsGeoNetworking_Functions { */ function f_waitForCertificate( out Certificate p_cert ) runs on ItsGeoNetworking return boolean { ) runs on ItsGeoNetworking return boolean { var SecuredMessage v_recv; var boolean v_ret := false; alt { [] a_securedMessageWithCertificate(v_recv) { var SignerInfo v_si; if (f_getMsgSignerInfo(v_recv, v_si) == true) { p_cert := v_si.signerInfo.certificate; v_ret := true; } } } } // End of 'alt' statement return v_ret; } // End of function f_waitForCertificate Loading @@ -2450,6 +2451,7 @@ module LibItsGeoNetworking_Functions { return boolean { var SecuredMessage v_recv; var boolean v_ret := false; alt { [] a_securedMessageWithCertificateChain(v_recv) { var SignerInfo v_si; Loading Loading @@ -2493,12 +2495,15 @@ module LibItsGeoNetworking_Functions { * @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 (out CertificateChain p_chain, in template(value) octetstring p_CamPayload) runs on ItsGeoNetworking return boolean { function f_askAndWaitForCertificateChain( out CertificateChain p_chain, in template(value) octetstring p_CamPayload ) runs on ItsGeoNetworking return boolean { // Local variables var SecuredMessage v_recv; var SignerInfo v_si; var boolean v_ret := false; alt { [] a_securedMessageWithCertificate(v_recv) { if(f_getMsgSignerInfo(v_recv, v_si)) { Loading @@ -2519,20 +2524,21 @@ module LibItsGeoNetworking_Functions { v_ret := true; } } } return v_ret; } } // End of 'alt' statement return v_ret; } // End of function f_askAndWaitForCertificateChain /** * @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 */ function f_waitForDigest(out HashedId8 p_digest) runs on ItsGeoNetworking return boolean { runs on ItsGeoNetworking return boolean { // Local variables var SecuredMessage v_recv; var boolean v_ret := false; alt { [] a_securedMessageWithDigest(v_recv) { var SignerInfo v_si; Loading @@ -2541,9 +2547,10 @@ module LibItsGeoNetworking_Functions { v_ret := true; } } } } // End of 'alt' statement return v_ret; } } // End of function f_waitForDigest } // End of group waitingHelpers Loading