Re: cvs: php-src(PHP_5_2) /ext/openssl openssl.c /ext/openssl/tests bug41033.pem bug41033.phpt bug41033pub.pem
| From: | Marcus Boerger | Date: | Tue, 18 Nov 2008 18:17:52 +0000 |
| Subject: | Re: cvs: php-src(PHP_5_2) /ext/openssl openssl.c /ext/openssl/tests bug41033.pem bug41033.phpt bug41033pub.pem | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-54309@lists.php.net to get a copy of this message | ||
Hello Pierre-Alain,
2nd try
Tuesday, November 18, 2008, 3:02:19 AM, you wrote:
> pajoye Tue Nov 18 02:02:19 2008 UTC
> Added files: (Branch: PHP_5_2)
> /php-src/ext/openssl/tests bug41033.pem bug41033.phpt
> bug41033pub.pem
> Modified files:
> /php-src/ext/openssl openssl.c
> Log:
> - MFH: #41033, enable signing with DSA keys
>
>
> http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/openssl.c?r1=1.98.2.5.2.48&r2=1.98.2.5.2.49&diff_format=u
> Index: php-src/ext/openssl/openssl.c
> diff -u php-src/ext/openssl/openssl.c:1.98.2.5.2.48
> php-src/ext/openssl/openssl.c:1.98.2.5.2.49
> --- php-src/ext/openssl/openssl.c:1.98.2.5.2.48 Sun Oct 26 14:35:59 2008
> +++ php-src/ext/openssl/openssl.c Tue Nov 18 02:02:19 2008
> @@ -1224,7 +1229,15 @@
> if (cert == NULL) {
> goto clean_exit;
> }
> - RETVAL_LONG(check_cert(cainfo, cert, untrustedchain, purpose));
> +
> + ret = check_cert(cainfo, cert, untrustedchain, purpose);
> +
> + if (ret != 0 && ret != 1) {
> + RETVAL_LONG(ret);
> + } else {
> + RETVAL_BOOL(ret);
Why not simply: RETVAL_BOOL(ret != 0 and ret != 1);
Best regards,
Marcus