I am trying to verify an X509 certificate using python. In particular, I need to check the CRL when I do this.
Now you can use m2crypto for this, but I can not find the option corresponding to openssl -crl_check or -crl_check_all.
Alternatively, I could use the channel directly and call openssl:
p1 = Popen(["openssl", "verify", "-CApath", capath, "-crl_check_all"],
stdin = PIPE, stdout = PIPE, stderr = PIPE)
message, error = p1.communicate(certificate)
exit_code = p1.returncode
However, it seems like the openssl check always returns exit code 0, so I will need to somehow compare the strings to determine if the check is successful, which I would not want to do.
Did I miss something simple here?
Thank.
wrgrs source
share