From fb5c092815f93856a10b67e6e181bf68eec7d502 Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Sun, 27 Jul 2008 04:23:00 +0000 Subject: [PATCH] - Fix openssl check --- ext/phar/util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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"); -- 2.40.0