I am trying to write a certificate managing application for an embedded system running on Linux using OpenSSL. I was able to implement certificate verification using my own certificate store. I am stuck at generating my own certificate revocation list and adding certificates to that certificate revoking list.
Here is how I verify certificates
do
{
store=X509_STORE_new();
if(NULL == store)
{
status = EOUTOFMEMORY;
break;
}
X509_STORE_set_default_paths(store);
vrfy_ctx = X509_STORE_CTX_new();
X509_STORE_CTX_init(vrfy_ctx, store, certificate, NULL);
*verifResult = X509_verify_cert(vrfy_ctx);
} while(0);
Can anyone please help me regarding creating a CRL file using C and adding certificates to it?