New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openssl verify searches CRL files in the -CApath directory #1701

Closed
j-ed opened this Issue Oct 12, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@j-ed

j-ed commented Oct 12, 2016

Used version: OpenSSL 1.0.2j

My OpenSSL directory structure follows the usual recommendation and looks like this:

/usr/local/ssl/certs     -> certificate files
              /crl       -> CRL files
              /csr       ...
              ...

In the ../certs directory symbolic hash links (.0) are pointing to the original certificate files.
In the ../crl directory symbolic hash links (.r0) are pointing to the original crl files.

When I now execute the following openssl verifycommand an "error 3 at 0 depth lookup:unable to get certificate CRL" error is displayed:

# openssl verify -verbose -CApath /usr/local/ssl/certs -purpose any -crl_check /usr/local/ssl/certs/cert-to-check.pem

Due to the fact that I couldn't explain this behavior I used strace for a deeper analysis and found out the the program searches the CRL file in the ../certs directory instead of the ../crl one.

...
stat64("/usr/local/ssl/certs/95f6ee89.r0", 0xbfc2f3ac) = -1 ENOENT
(No such file or directory)
...

For test purposes I've created the relevant .r0 hash link to the CRL file in the ../certsdirectory and executed the command again. This time the verification succeed and shows "OK".

Is this the normal program behavior?
Is there any trick available to let the command search the CRL files in the right directory?
Have I missed any entry in the openssl.cnf file which prevents the command from looking-up the correct directory path?

@levitte

This comment has been minimized.

Show comment
Hide comment
@levitte

levitte Oct 14, 2016

Member

This is normal behavior with OpenSSL... always has been. Certificates and CRLs have always ended up in the certs subdirectory by default. So I'm not sure what "usual recommendation" you've read, but they don't come from us.

Closing this.

Member

levitte commented Oct 14, 2016

This is normal behavior with OpenSSL... always has been. Certificates and CRLs have always ended up in the certs subdirectory by default. So I'm not sure what "usual recommendation" you've read, but they don't come from us.

Closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment