From: Marcus Boerger Date: Sun, 27 Jul 2008 04:23:00 +0000 (+0000) Subject: - Fix openssl check X-Git-Tag: php-5.3.0alpha1~93 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fb5c092815f93856a10b67e6e181bf68eec7d502;p=php - Fix openssl check --- diff --git a/ext/phar/util.c b/ext/phar/util.c index 74cebdfc28..da1a504cf0 100644 --- a/ext/phar/util.c +++ b/ext/phar/util.c @@ -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");