summaryrefslogtreecommitdiff
path: root/ext/openssl/openssl.c
diff options
context:
space:
mode:
authorRob Richards <rrichards@php.net>2008-01-09 16:46:52 +0000
committerRob Richards <rrichards@php.net>2008-01-09 16:46:52 +0000
commit2e656bee3b4cff412724f8c5e1b3d2a58b1df219 (patch)
tree3bc15ca67d79299dba4eefe0356f5b796102e899 /ext/openssl/openssl.c
parentb4573d5531b908d748d51e1bd2f698bf378c47fc (diff)
downloadphp-git-2e656bee3b4cff412724f8c5e1b3d2a58b1df219.tar.gz
fix crash when using default algorithm
Diffstat (limited to 'ext/openssl/openssl.c')
-rw-r--r--ext/openssl/openssl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c
index fdbc348acd..4816b0b76b 100644
--- a/ext/openssl/openssl.c
+++ b/ext/openssl/openssl.c
@@ -3725,7 +3725,7 @@ PHP_FUNCTION(openssl_sign)
}
if (method == NULL || Z_TYPE_P(method) == IS_LONG) {
- if (Z_TYPE_P(method) == IS_LONG) {
+ if (method != NULL) {
signature_algo = Z_LVAL_P(method);
}
mdtype = php_openssl_get_evp_md_from_algo(signature_algo);
@@ -3780,7 +3780,7 @@ PHP_FUNCTION(openssl_verify)
}
if (method == NULL || Z_TYPE_P(method) == IS_LONG) {
- if (Z_TYPE_P(method) == IS_LONG) {
+ if (method != NULL) {
signature_algo = Z_LVAL_P(method);
}
mdtype = php_openssl_get_evp_md_from_algo(signature_algo);