]> granicus.if.org Git - php/commitdiff
- Fix openssl check
authorMarcus Boerger <helly@php.net>
Sun, 27 Jul 2008 04:23:00 +0000 (04:23 +0000)
committerMarcus Boerger <helly@php.net>
Sun, 27 Jul 2008 04:23:00 +0000 (04:23 +0000)
ext/phar/util.c

index 74cebdfc2809aaedac694bb80fd9ba10b50d9b27..da1a504cf0573cc3347e41ea24a7e8c7e330b8d9 100644 (file)
@@ -1665,7 +1665,8 @@ int phar_verify_signature(php_stream *fp, size_t end_of_phar, php_uint32 sig_typ
                                        read_size = (int)read_len;
                                }
                        }
-                       if (!EVP_VerifyFinal (&md_ctx, (unsigned char *)sig, sig_len, key)) {
+                       if (EVP_VerifyFinal(&md_ctx, (unsigned char *)sig, sig_len, key) != 1) {
+                               /* 1: signature verified, 0: signature does not match, -1: failed signature operation */
                                EVP_MD_CTX_cleanup(&md_ctx);
                                if (error) {
                                        spprintf(error, 0, "broken openssl signature");