summaryrefslogtreecommitdiff
path: root/ext/openssl/openssl.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/openssl/openssl.c')
-rw-r--r--ext/openssl/openssl.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c
index ff6d053d32..bdee55e638 100644
--- a/ext/openssl/openssl.c
+++ b/ext/openssl/openssl.c
@@ -2138,7 +2138,7 @@ PHP_FUNCTION(openssl_x509_export)
BUF_MEM *bio_buf;
BIO_get_mem_ptr(bio_out, &bio_buf);
- ZEND_TRY_ASSIGN_STRINGL(zout, bio_buf->data, bio_buf->length);
+ ZEND_TRY_ASSIGN_REF_STRINGL(zout, bio_buf->data, bio_buf->length);
RETVAL_TRUE;
} else {
@@ -2979,7 +2979,7 @@ PHP_FUNCTION(openssl_pkcs12_export)
BUF_MEM *bio_buf;
BIO_get_mem_ptr(bio_out, &bio_buf);
- ZEND_TRY_ASSIGN_STRINGL(zout, bio_buf->data, bio_buf->length);
+ ZEND_TRY_ASSIGN_REF_STRINGL(zout, bio_buf->data, bio_buf->length);
RETVAL_TRUE;
} else {
@@ -3417,7 +3417,7 @@ PHP_FUNCTION(openssl_csr_export)
BUF_MEM *bio_buf;
BIO_get_mem_ptr(bio_out, &bio_buf);
- ZEND_TRY_ASSIGN_STRINGL(zout, bio_buf->data, bio_buf->length);
+ ZEND_TRY_ASSIGN_REF_STRINGL(zout, bio_buf->data, bio_buf->length);
RETVAL_TRUE;
} else {
@@ -3637,7 +3637,7 @@ PHP_FUNCTION(openssl_csr_new)
if (we_made_the_key) {
/* and a resource for the private key */
- ZEND_TRY_ASSIGN_RES(out_pkey, zend_register_resource(req.priv_key, le_key));
+ ZEND_TRY_ASSIGN_REF_RES(out_pkey, zend_register_resource(req.priv_key, le_key));
req.priv_key = NULL; /* make sure the cleanup code doesn't zap it! */
} else if (key_resource != NULL) {
req.priv_key = NULL; /* make sure the cleanup code doesn't zap it! */
@@ -4700,7 +4700,7 @@ PHP_FUNCTION(openssl_pkey_export)
RETVAL_TRUE;
bio_mem_len = BIO_get_mem_data(bio_out, &bio_mem_ptr);
- ZEND_TRY_ASSIGN_STRINGL(out, bio_mem_ptr, bio_mem_len);
+ ZEND_TRY_ASSIGN_REF_STRINGL(out, bio_mem_ptr, bio_mem_len);
} else {
php_openssl_store_errors();
}
@@ -5734,7 +5734,7 @@ PHP_FUNCTION(openssl_private_encrypt)
if (successful) {
ZSTR_VAL(cryptedbuf)[cryptedlen] = '\0';
- ZEND_TRY_ASSIGN_NEW_STR(crypted, cryptedbuf);
+ ZEND_TRY_ASSIGN_REF_NEW_STR(crypted, cryptedbuf);
cryptedbuf = NULL;
RETVAL_TRUE;
} else {
@@ -5802,7 +5802,7 @@ PHP_FUNCTION(openssl_private_decrypt)
if (successful) {
ZSTR_VAL(cryptedbuf)[cryptedlen] = '\0';
- ZEND_TRY_ASSIGN_NEW_STR(crypted, cryptedbuf);
+ ZEND_TRY_ASSIGN_REF_NEW_STR(crypted, cryptedbuf);
cryptedbuf = NULL;
RETVAL_TRUE;
} else {
@@ -5863,7 +5863,7 @@ PHP_FUNCTION(openssl_public_encrypt)
if (successful) {
ZSTR_VAL(cryptedbuf)[cryptedlen] = '\0';
- ZEND_TRY_ASSIGN_NEW_STR(crypted, cryptedbuf);
+ ZEND_TRY_ASSIGN_REF_NEW_STR(crypted, cryptedbuf);
cryptedbuf = NULL;
RETVAL_TRUE;
} else {
@@ -5933,7 +5933,7 @@ PHP_FUNCTION(openssl_public_decrypt)
if (successful) {
ZSTR_VAL(cryptedbuf)[cryptedlen] = '\0';
- ZEND_TRY_ASSIGN_NEW_STR(crypted, cryptedbuf);
+ ZEND_TRY_ASSIGN_REF_NEW_STR(crypted, cryptedbuf);
cryptedbuf = NULL;
RETVAL_TRUE;
} else {
@@ -6029,7 +6029,7 @@ PHP_FUNCTION(openssl_sign)
EVP_SignFinal(md_ctx, (unsigned char*)ZSTR_VAL(sigbuf), &siglen, pkey)) {
ZSTR_VAL(sigbuf)[siglen] = '\0';
ZSTR_LEN(sigbuf) = siglen;
- ZEND_TRY_ASSIGN_NEW_STR(signature, sigbuf);
+ ZEND_TRY_ASSIGN_REF_NEW_STR(signature, sigbuf);
RETVAL_TRUE;
} else {
php_openssl_store_errors();
@@ -6195,7 +6195,7 @@ PHP_FUNCTION(openssl_seal)
}
if (len1 + len2 > 0) {
- ZEND_TRY_ASSIGN_NEW_STR(sealdata, zend_string_init((char*)buf, len1 + len2, 0));
+ ZEND_TRY_ASSIGN_REF_NEW_STR(sealdata, zend_string_init((char*)buf, len1 + len2, 0));
efree(buf);
ekeys = zend_try_array_init(ekeys);
@@ -6213,7 +6213,7 @@ PHP_FUNCTION(openssl_seal)
if (iv) {
iv_buf[iv_len] = '\0';
- ZEND_TRY_ASSIGN_NEW_STR(iv, zend_string_init((char*)iv_buf, iv_len, 0));
+ ZEND_TRY_ASSIGN_REF_NEW_STR(iv, zend_string_init((char*)iv_buf, iv_len, 0));
}
} else {
efree(buf);
@@ -6302,7 +6302,7 @@ PHP_FUNCTION(openssl_open)
EVP_OpenUpdate(ctx, buf, &len1, (unsigned char *)data, (int)data_len) &&
EVP_OpenFinal(ctx, buf + len1, &len2) && (len1 + len2 > 0)) {
buf[len1 + len2] = '\0';
- ZEND_TRY_ASSIGN_NEW_STR(opendata, zend_string_init((char*)buf, len1 + len2, 0));
+ ZEND_TRY_ASSIGN_REF_NEW_STR(opendata, zend_string_init((char*)buf, len1 + len2, 0));
RETVAL_TRUE;
} else {
php_openssl_store_errors();
@@ -6693,7 +6693,7 @@ PHP_OPENSSL_API zend_string* php_openssl_encrypt(char *data, size_t data_len, ch
if (EVP_CIPHER_CTX_ctrl(cipher_ctx, mode.aead_get_tag_flag, tag_len, ZSTR_VAL(tag_str)) == 1) {
ZSTR_VAL(tag_str)[tag_len] = '\0';
ZSTR_LEN(tag_str) = tag_len;
- ZEND_TRY_ASSIGN_NEW_STR(tag, tag_str);
+ ZEND_TRY_ASSIGN_REF_NEW_STR(tag, tag_str);
} else {
php_error_docref(NULL, E_WARNING, "Retrieving verification tag failed");
zend_string_release_ex(tag_str, 0);
@@ -6701,7 +6701,7 @@ PHP_OPENSSL_API zend_string* php_openssl_encrypt(char *data, size_t data_len, ch
outbuf = NULL;
}
} else if (tag) {
- ZEND_TRY_ASSIGN_NULL(tag);
+ ZEND_TRY_ASSIGN_REF_NULL(tag);
php_error_docref(NULL, E_WARNING,
"The authenticated tag cannot be provided for cipher that doesn not support AEAD");
} else if (mode.is_aead) {
@@ -6935,7 +6935,7 @@ PHP_FUNCTION(openssl_random_pseudo_bytes)
}
if (zstrong_result_returned) {
- ZEND_TRY_ASSIGN_FALSE(zstrong_result_returned);
+ ZEND_TRY_ASSIGN_REF_FALSE(zstrong_result_returned);
}
if ((buffer = php_openssl_random_pseudo_bytes(buffer_length))) {
@@ -6944,7 +6944,7 @@ PHP_FUNCTION(openssl_random_pseudo_bytes)
}
if (zstrong_result_returned) {
- ZEND_TRY_ASSIGN_TRUE(zstrong_result_returned);
+ ZEND_TRY_ASSIGN_REF_TRUE(zstrong_result_returned);
}
}
/* }}} */