Skip to content

Commit ac65156

Browse files
committed
ext/openssl: Follow-up on php#13146.
1 parent 9c7b391 commit ac65156

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

ext/openssl/openssl.c

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1512,7 +1512,7 @@ static X509 *php_openssl_x509_from_zval(
15121512
PHP_FUNCTION(openssl_x509_export_to_file)
15131513
{
15141514
X509 *cert;
1515-
zend_object *cert_obj;
1515+
zend_object *cert_obj = NULL;
15161516
zend_string *cert_str;
15171517

15181518
bool notext = 1;
@@ -1819,7 +1819,7 @@ PHP_FUNCTION(openssl_spki_export_challenge)
18191819
PHP_FUNCTION(openssl_x509_export)
18201820
{
18211821
X509 *cert;
1822-
zend_object *cert_obj;
1822+
zend_object *cert_obj = NULL;
18231823
zend_string *cert_str;
18241824
zval *zout;
18251825
bool notext = 1;
@@ -1898,7 +1898,7 @@ zend_string* php_openssl_x509_fingerprint(X509 *peer, const char *method, bool r
18981898
PHP_FUNCTION(openssl_x509_fingerprint)
18991899
{
19001900
X509 *cert;
1901-
zend_object *cert_obj;
1901+
zend_object *cert_obj = NULL;
19021902
zend_string *cert_str;
19031903
bool raw_output = 0;
19041904
char *method = "sha1";
@@ -1934,7 +1934,7 @@ PHP_FUNCTION(openssl_x509_fingerprint)
19341934
PHP_FUNCTION(openssl_x509_check_private_key)
19351935
{
19361936
X509 *cert;
1937-
zend_object *cert_obj;
1937+
zend_object *cert_obj = NULL;
19381938
zend_string *cert_str;
19391939
zval *zkey;
19401940
EVP_PKEY * key = NULL;
@@ -1967,7 +1967,7 @@ PHP_FUNCTION(openssl_x509_check_private_key)
19671967
PHP_FUNCTION(openssl_x509_verify)
19681968
{
19691969
X509 *cert;
1970-
zend_object *cert_obj;
1970+
zend_object *cert_obj = NULL;
19711971
zend_string *cert_str;
19721972
zval *zkey;
19731973
EVP_PKEY * key = NULL;
@@ -2076,7 +2076,7 @@ static int openssl_x509v3_subjectAltName(BIO *bio, X509_EXTENSION *extension)
20762076
PHP_FUNCTION(openssl_x509_parse)
20772077
{
20782078
X509 *cert;
2079-
zend_object *cert_obj;
2079+
zend_object *cert_obj = NULL;
20802080
zend_string *cert_str;
20812081
int i, sig_nid;
20822082
bool useshortnames = 1;
@@ -2332,7 +2332,7 @@ static int check_cert(X509_STORE *ctx, X509 *x, STACK_OF(X509) *untrustedchain,
23322332
PHP_FUNCTION(openssl_x509_checkpurpose)
23332333
{
23342334
X509 *cert;
2335-
zend_object *cert_obj;
2335+
zend_object *cert_obj = NULL;
23362336
zend_string *cert_str;
23372337
zval *zcainfo = NULL;
23382338
X509_STORE *cainfo = NULL;
@@ -2468,7 +2468,7 @@ PHP_FUNCTION(openssl_x509_read)
24682468
{
24692469
X509 *cert;
24702470
php_openssl_certificate_object *x509_cert_obj;
2471-
zend_object *cert_obj;
2471+
zend_object *cert_obj = NULL;
24722472
zend_string *cert_str;
24732473

24742474
ZEND_PARSE_PARAMETERS_START(1, 1)
@@ -2569,7 +2569,7 @@ static STACK_OF(X509) *php_array_to_X509_sk(zval * zcerts, uint32_t arg_num, con
25692569
PHP_FUNCTION(openssl_pkcs12_export_to_file)
25702570
{
25712571
X509 *cert;
2572-
zend_object *cert_obj;
2572+
zend_object *cert_obj = NULL;
25732573
zend_string *cert_str;
25742574
BIO * bio_out = NULL;
25752575
PKCS12 * p12 = NULL;
@@ -2672,7 +2672,7 @@ PHP_FUNCTION(openssl_pkcs12_export_to_file)
26722672
PHP_FUNCTION(openssl_pkcs12_export)
26732673
{
26742674
X509 *cert;
2675-
zend_object *cert_obj;
2675+
zend_object *cert_obj = NULL;
26762676
zend_string *cert_str;
26772677
BIO * bio_out;
26782678
PKCS12 * p12 = NULL;
@@ -3089,7 +3089,7 @@ static X509_REQ *php_openssl_csr_from_param(
30893089
PHP_FUNCTION(openssl_csr_export_to_file)
30903090
{
30913091
X509_REQ *csr;
3092-
zend_object *csr_obj;
3092+
zend_object *csr_obj = NULL;
30933093
zend_string *csr_str;
30943094
bool notext = 1;
30953095
char * filename = NULL;
@@ -3143,7 +3143,7 @@ PHP_FUNCTION(openssl_csr_export_to_file)
31433143
PHP_FUNCTION(openssl_csr_export)
31443144
{
31453145
X509_REQ *csr;
3146-
zend_object *csr_obj;
3146+
zend_object *csr_obj = NULL;
31473147
zend_string *csr_str;
31483148
zval *zout;
31493149
bool notext = 1;
@@ -3199,11 +3199,11 @@ PHP_FUNCTION(openssl_csr_export)
31993199
PHP_FUNCTION(openssl_csr_sign)
32003200
{
32013201
X509_REQ *csr;
3202-
zend_object *csr_obj;
3202+
zend_object *csr_obj = NULL;
32033203
zend_string *csr_str;
32043204

32053205
php_openssl_certificate_object *cert_object;
3206-
zend_object *cert_obj;
3206+
zend_object *cert_obj = NULL;
32073207
zend_string *cert_str;
32083208
zval *zpkey, *args = NULL;
32093209
zend_long num_days;
@@ -3458,7 +3458,7 @@ PHP_FUNCTION(openssl_csr_new)
34583458
PHP_FUNCTION(openssl_csr_get_subject)
34593459
{
34603460
X509_REQ *csr;
3461-
zend_object *csr_obj;
3461+
zend_object *csr_obj = NULL;
34623462
zend_string *csr_str;
34633463
bool use_shortnames = 1;
34643464
X509_NAME *subject;
@@ -3502,7 +3502,7 @@ static EVP_PKEY *php_openssl_extract_public_key(EVP_PKEY *priv_key)
35023502
/* {{{ Returns the subject of a CERT or FALSE on error */
35033503
PHP_FUNCTION(openssl_csr_get_public_key)
35043504
{
3505-
zend_object *csr_obj;
3505+
zend_object *csr_obj = NULL;
35063506
zend_string *csr_str;
35073507
bool use_shortnames = 1;
35083508

@@ -5791,7 +5791,7 @@ PHP_FUNCTION(openssl_pkcs7_read)
57915791
PHP_FUNCTION(openssl_pkcs7_sign)
57925792
{
57935793
X509 *cert = NULL;
5794-
zend_object *cert_obj;
5794+
zend_object *cert_obj = NULL;
57955795
zend_string *cert_str;
57965796
zval *zprivkey, * zheaders;
57975797
zval * hval;
@@ -6437,7 +6437,7 @@ PHP_FUNCTION(openssl_cms_read)
64376437
PHP_FUNCTION(openssl_cms_sign)
64386438
{
64396439
X509 *cert = NULL;
6440-
zend_object *cert_obj;
6440+
zend_object *cert_obj = NULL;
64416441
zend_string *cert_str;
64426442
zval *zprivkey, *zheaders;
64436443
zval * hval;

0 commit comments

Comments
 (0)