4.4 GetInstalledCertificateIds

The GetInstalledCertificateIds message is used by the central system to request a list of the IDs of all certificates that are currently installed on the charge point. This helps the central system verify and manage the certificates being used for secure communication.

API Syntax

Description

Input Params

Return Value

IsInstalledCertificateAvailable

This function checks the availability of an installed certificate. It returns true.

void

bool

Example:

    if (IsInstalledCertificateAvailable())
    {
      LogDebug("APP_LOG", "GetInstalledCertificateIds: Certificate found and accepted\n");
      SetInstalledCertificateStatus(INSTALLED_CERTIFICATE_ACCEPTED);
    }

API Syntax

Description

Input Params

Return Value

SetInstalledCertificateStatus

This function updates the status of the installed certificate. The status is passed as an enumerated value, which indicates the current state of the certificate installation process.

GET_INSTALLED_CERT_STATUS_T status

void

Example:

    if (IsInstalledCertificateAvailable())
    {
      LogDebug("APP_LOG", "GetInstalledCertificateIds: Certificate found and accepted\n");
      SetInstalledCertificateStatus(INSTALLED_CERTIFICATE_ACCEPTED);
    }

API Syntax

Description

Input Params

Return Value

SendGetInstalledCertificateIdsResponse

This function sends the response for the GetInstalledCertificateIds request.

char *resUUID

GET_INSTALL_ERR_T

Example:

    if (IsInstalledCertificateAvailable())
    {
      LogDebug("APP_LOG", "GetInstalledCertificateIds: Certificate found and accepted\n");
      SetInstalledCertificateStatus(INSTALLED_CERTIFICATE_ACCEPTED);
    }
    else
    {
      LogDebug("APP_LOG", "GetInstalledCertificateIds: Certificate not found\n");
      SetInstalledCertificateStatus(INSTALLED_CERTIFICATE_NOT_FOUND);
    }

    SendGetInstalledCertificateIdsResponse(messageID);
  

API Syntax

Description

Input Params

Return Value

ConvertToHex

Function to convert the string to hexadecimal format

char *input, int length, char *output

static void

Example:

        OCSP_id_get0_info(&issuerNameHash, NULL, &issuerKeyHash, &serial, cid);
    ConvertToHex(ASN1_STRING_get0_data(issuerNameHash), ASN1_STRING_length(issuerNameHash), certHashData->issuerNameHash);
    ConvertToHex(ASN1_STRING_get0_data(issuerKeyHash), ASN1_STRING_length(issuerKeyHash), certHashData->issuerKeyHash);
    ConvertToHex(ASN1_STRING_get0_data(serial), ASN1_STRING_length(serial), certHashData->serialNumber);