[prev in list] [next in list] [prev in thread] [next in thread]
List: php-cvs
Subject: [PHP-CVS] com php-src: Remove confusing spkstr checks: ext/openssl/openssl.c
From: Nikita Popov <nikic () php ! net>
Date: 2019-05-31 15:00:00
Message-ID: php-mail-720897aa26ff42086f963206d07f936c1030176859 () git ! php ! net
[Download RAW message or body]
Commit: 7f26171445e0b060196bb9b6f1fc506269ced8a4
Author: Nikita Popov <nikita.ppv@gmail.com> Fri, 31 May 2019 16:59:46 +0200
Parents: 8a8bc5c4529223ecf4f421b1bed03618f7394335
Branches: PHP-7.4 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=7f26171445e0b060196bb9b6f1fc506269ced8a4
Log:
Remove confusing spkstr checks
This is a required parameter, it can never be NULL.
Changed paths:
M ext/openssl/openssl.c
Diff:
diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c
index 23ce1c9..30d984c 100644
--- a/ext/openssl/openssl.c
+++ b/ext/openssl/openssl.c
@@ -1933,7 +1933,7 @@ PHP_FUNCTION(openssl_spki_verify)
{
size_t spkstr_len;
int i = 0, spkstr_cleaned_len = 0;
- char *spkstr = NULL, * spkstr_cleaned = NULL;
+ char *spkstr, * spkstr_cleaned = NULL;
EVP_PKEY *pkey = NULL;
NETSCAPE_SPKI *spki = NULL;
@@ -1943,11 +1943,6 @@ PHP_FUNCTION(openssl_spki_verify)
}
RETVAL_FALSE;
- if (spkstr == NULL) {
- php_error_docref(NULL, E_WARNING, "Unable to use supplied SPKAC");
- goto cleanup;
- }
-
spkstr_cleaned = emalloc(spkstr_len + 1);
spkstr_cleaned_len = (int)(spkstr_len - php_openssl_spki_cleanup(spkstr, spkstr_cleaned));
@@ -1997,7 +1992,7 @@ cleanup:
PHP_FUNCTION(openssl_spki_export)
{
size_t spkstr_len;
- char *spkstr = NULL, * spkstr_cleaned = NULL, * s = NULL;
+ char *spkstr, * spkstr_cleaned = NULL, * s = NULL;
int spkstr_cleaned_len;
EVP_PKEY *pkey = NULL;
@@ -2009,11 +2004,6 @@ PHP_FUNCTION(openssl_spki_export)
}
RETVAL_FALSE;
- if (spkstr == NULL) {
- php_error_docref(NULL, E_WARNING, "Unable to use supplied SPKAC");
- goto cleanup;
- }
-
spkstr_cleaned = emalloc(spkstr_len + 1);
spkstr_cleaned_len = (int)(spkstr_len - php_openssl_spki_cleanup(spkstr, spkstr_cleaned));
@@ -2072,7 +2062,7 @@ cleanup:
PHP_FUNCTION(openssl_spki_export_challenge)
{
size_t spkstr_len;
- char *spkstr = NULL, * spkstr_cleaned = NULL;
+ char *spkstr, * spkstr_cleaned = NULL;
int spkstr_cleaned_len;
NETSCAPE_SPKI *spki = NULL;
@@ -2082,11 +2072,6 @@ PHP_FUNCTION(openssl_spki_export_challenge)
}
RETVAL_FALSE;
- if (spkstr == NULL) {
- php_error_docref(NULL, E_WARNING, "Unable to use supplied SPKAC");
- goto cleanup;
- }
-
spkstr_cleaned = emalloc(spkstr_len + 1);
spkstr_cleaned_len = (int)(spkstr_len - php_openssl_spki_cleanup(spkstr, spkstr_cleaned));
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic