In testing my regression tests, I supply a bad CA certificate to force the verify to fail.

I use:

> openssl verify -CAfile cacert.pem cert.pem 

It printed this, which I expected.

"error 20 at 0 depth lookup: ..."

However, when my bash script checks the return code, it is still 0. I was hoping for a non-zero error return to catch real errors later.

A bug?  If not, what's the correct way to capture errors in a shell script?

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to