summaryrefslogtreecommitdiff
path: root/ext/openssl
diff options
context:
space:
mode:
Diffstat (limited to 'ext/openssl')
-rw-r--r--ext/openssl/openssl.c8
-rw-r--r--ext/openssl/php_openssl.h4
-rw-r--r--ext/openssl/xp_ssl.c8
3 files changed, 11 insertions, 9 deletions
diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c
index ea50d5c41..516ff1748 100644
--- a/ext/openssl/openssl.c
+++ b/ext/openssl/openssl.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -20,7 +20,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: openssl.c,v 1.98.2.5.2.42 2007/10/31 13:23:06 jani Exp $ */
+/* $Id: openssl.c,v 1.98.2.5.2.45 2008/04/07 10:44:03 tony2001 Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -1962,7 +1962,7 @@ PHP_FUNCTION(openssl_csr_sign)
X509 * cert = NULL, *new_cert = NULL;
X509_REQ * csr;
EVP_PKEY * key = NULL, *priv_key = NULL;
- long csr_resource, certresource, keyresource;
+ long csr_resource, certresource = 0, keyresource;
int i;
struct php_x509_request req;
@@ -3522,6 +3522,7 @@ PHP_FUNCTION(openssl_sign)
efree(sigbuf);
RETVAL_FALSE;
}
+ EVP_MD_CTX_cleanup(&md_ctx);
if (keyresource == -1) {
EVP_PKEY_free(pkey);
}
@@ -3561,6 +3562,7 @@ PHP_FUNCTION(openssl_verify)
EVP_VerifyInit (&md_ctx, mdtype);
EVP_VerifyUpdate (&md_ctx, data, data_len);
err = EVP_VerifyFinal (&md_ctx, (unsigned char *)signature, signature_len, pkey);
+ EVP_MD_CTX_cleanup(&md_ctx);
if (keyresource == -1) {
EVP_PKEY_free(pkey);
diff --git a/ext/openssl/php_openssl.h b/ext/openssl/php_openssl.h
index 15023b233..83a42867e 100644
--- a/ext/openssl/php_openssl.h
+++ b/ext/openssl/php_openssl.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_openssl.h,v 1.16.2.1.2.4 2007/04/04 21:24:01 pajoye Exp $ */
+/* $Id: php_openssl.h,v 1.16.2.1.2.5 2007/12/31 07:20:09 sebastian Exp $ */
#ifndef PHP_OPENSSL_H
#define PHP_OPENSSL_H
diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c
index 940d608ad..fc29a82b6 100644
--- a/ext/openssl/xp_ssl.c
+++ b/ext/openssl/xp_ssl.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: xp_ssl.c,v 1.22.2.3.2.9 2007/07/02 16:42:10 iliaa Exp $ */
+/* $Id: xp_ssl.c,v 1.22.2.3.2.11 2008/04/08 14:11:49 jorton Exp $ */
#include "php.h"
#include "ext/standard/file.h"
@@ -728,7 +728,7 @@ static int php_openssl_sockop_cast(php_stream *stream, int castas, void **ret TS
case PHP_STREAM_AS_FD_FOR_SELECT:
if (ret) {
- *ret = (void*)sslsock->s.socket;
+ *(int *)ret = sslsock->s.socket;
}
return SUCCESS;
@@ -738,7 +738,7 @@ static int php_openssl_sockop_cast(php_stream *stream, int castas, void **ret TS
return FAILURE;
}
if (ret) {
- *ret = (void*)sslsock->s.socket;
+ *(int *)ret = sslsock->s.socket;
}
return SUCCESS;
default: