Skip to main content

C2xSecCertificateGetHandle

Open topic with navigation CAPL Functions » Car2x » C2xSecCertificateGetHandle

Function Syntax

long C2xSecCertificateGetHandle( char name[] );
long C2xSecCertificateGetHandle( byte hashedId8[] );

Description

Gets a certificate handle from a certificate listed in the Car2x Certificate Manager.

Parameters

  • name: Name of the certificate as it is given in the Car2x Certificate Manager.
  • hashedId8: hashedId8 digest of the certificate (e.g. included in the security header of a received frame), size must be 8 bytes. In some protocols this parameter is called certId8.

Return Values

  • 0: Failure
  • ≠0: Handle of the certificate

Example

// assumes a certificate with name "MyCert" was added to the configuration in the Car2x Certificate Manager dialog

long certificateHandle;
certificateHandle = C2xSecCertificateGetHandle( "MyCert" );