Topic: [SOLVED]Unable to verify certificate w/ certificate manager and CRLs
Hi everyone,
Here is my problem, I use the wolfSSL embedded SSL certificate manager API to verify some certificate. It works perfectly when CRL option is disable.
Once I turn it on it fails...
I load CRL (DER format) without any error code but then, when I try to verify a certificate, I got an -262 error code (which says "CRL Not Loaded")... I don't understand where is the problem...
Here is my code:
        certManager = CyaSSL_CertManagerNew();
    if (certManager == NULL) {
        cout << "Failure cm new!" << endl;
    } else cout << "Success cm new!" << endl;
    
    ret = CyaSSL_CertManagerLoadCA(certManager, "CACert.pem", 0);
    if (ret != SSL_SUCCESS) {
        cout << "Failure Loading CA certificate!" << endl;
    } else cout << "Success Loading CA certificate!" << endl;
    
    ret = CyaSSL_CertManagerEnableCRL(certManager, 0);
    if (ret != SSL_SUCCESS) {
        cout << "Failure Enable CRL!" << endl << endl;
    } else cout << "Success Enable CRL!" << endl << endl;
    
    ret = CyaSSL_CertManagerLoadCRL(certManager, "CRL/", SSL_FILETYPE_ASN1, 0);
    if (ret != SSL_SUCCESS) {
        cout << "Failure Loading CRL!" << endl << endl;
    } else cout << "Success Loading CRL!" << endl << endl;
    
    cout << "Validation of a certificate...." << endl;
    ret = CyaSSL_CertManagerVerify(certManager,  "certificate.der", SSL_FILETYPE_ASN1);
    cout << ret << endl; //Here I get -262 error code - MISSING_CRL
    if (ret != SSL_SUCCESS) {
        cout << "Failure verify certificate!" << endl << endl;
    } else cout << "Success verify certificate!" << endl << endl;Any idea?
Thanks in advance,
Eric