CertStore_DeleteCertificate function

Header: #include <applibs/certstore.h>

Deletes a certificate.

int CertStore_DeleteCertificate(const char *identifier);

Parameters

  • identifier The ID of the certificate to delete.

Errors

Returns -1 if an error is encountered and sets errno to the error value.

  • EACCES: the operation isn't allowed because CertStore capability isn't set in the application manifest.

  • EAGAIN: the OS is not ready for certificate operations. Try the request again later.

  • EFAULT: the identifier is NULL.

  • ENOENT: there's no certificate with the specified ID.

Any other errno may also be specified; such errors aren't deterministic and there's no guarantee that the same behavior will be retained through system updates.

Return value

Returns 0 for success, or -1 for failure, in which case errno is set to the error value.

Remarks

Certificates are stored by index. Deleting a certificate causes the remaining certificates to be reindexed, starting at 0. Manage certificates in high-level applications shows how to delete all the certificates on a device.

Application manifest requirements

The application manifest must include the CertStore capability.