diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-05-31 16:59:46 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-05-31 17:00:00 +0200 |
commit | 7f26171445e0b060196bb9b6f1fc506269ced8a4 (patch) | |
tree | ec30541508e12e1bd1ec89937ac0650c66617cf3 /ext/openssl/openssl.c | |
parent | 8a8bc5c4529223ecf4f421b1bed03618f7394335 (diff) | |
download | php-git-7f26171445e0b060196bb9b6f1fc506269ced8a4.tar.gz |
Remove confusing spkstr checks
This is a required parameter, it can never be NULL.
Diffstat (limited to 'ext/openssl/openssl.c')
-rw-r--r-- | ext/openssl/openssl.c | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c index 23ce1c9242..30d984c300 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)); |