From 5bb6d96558ff6013826e3362f4c81513e3df23ff Mon Sep 17 00:00:00 2001 From: Ben Laurie Date: Thu, 13 Dec 2012 15:48:42 +0000 Subject: [PATCH] Make verify return errors. --- CHANGES | 3 +++ Makefile.org | 2 +- apps/verify.c | 16 ++++++++++++---- test/Makefile | 2 +- 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/CHANGES b/CHANGES index 0daec2b509..ef8b2bf76d 100644 --- a/CHANGES +++ b/CHANGES @@ -4,6 +4,9 @@ Changes between 1.0.1c and 1.0.1d [xx XXX xxxx] + *) Make openssl verify return errors. + [Chris Palmer and Ben Laurie] + *) Call OCSP Stapling callback after ciphersuite has been chosen, so the right response is stapled. Also change SSL_get_certificate() so it returns the certificate actually sent. diff --git a/Makefile.org b/Makefile.org index 55273ea364..43d16cbcb1 100644 --- a/Makefile.org +++ b/Makefile.org @@ -444,7 +444,7 @@ rehash.time: certs apps [ -x "apps/openssl.exe" ] && OPENSSL="apps/openssl.exe" || :; \ OPENSSL_DEBUG_MEMORY=on; \ export OPENSSL OPENSSL_DEBUG_MEMORY; \ - $(PERL) tools/c_rehash certs) && \ + $(PERL) tools/c_rehash certs/demo) && \ touch rehash.time; \ else :; fi diff --git a/apps/verify.c b/apps/verify.c index 0f34b865ad..893670ff41 100644 --- a/apps/verify.c +++ b/apps/verify.c @@ -222,11 +222,19 @@ int MAIN(int argc, char **argv) goto end; } - if (argc < 1) check(cert_ctx, NULL, untrusted, trusted, crls, e); + ret = 0; + if (argc < 1) + { + if (1 != check(cert_ctx, NULL, untrusted, trusted, crls, e)) + ret = -1; + } else + { for (i=0; i