From c3d353867abbbbde58fc743276a11128b2411c23 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Thu, 1 May 2003 10:44:18 +0000 Subject: [PATCH] Really fix dll linkage, and fix TSRMLS usage. --- ext/openssl/openssl.c | 10 ++++------ ext/openssl/php_openssl.h | 4 ++-- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c index 584678f382..4f6011d4fa 100644 --- a/ext/openssl/openssl.c +++ b/ext/openssl/openssl.c @@ -505,12 +505,10 @@ static int php_openssl_load_rand_file(const char * file, int *egdsocket, int *se return SUCCESS; } -static int php_openssl_write_rand_file(const char * file, int egdsocket, int seeded) +static int php_openssl_write_rand_file(const char * file, int egdsocket, int seeded TSRMLS_DC) { char buffer[MAXPATHLEN]; - TSRMLS_FETCH(); - if (egdsocket || !seeded) { /* if we did not manage to read the seed file, we should not write * a low-entropy seed file back */ @@ -1797,7 +1795,7 @@ static EVP_PKEY * php_openssl_generate_private_key(struct php_x509_request * req } } - php_openssl_write_rand_file(randfile, egdsocket, seeded); + php_openssl_write_rand_file(randfile, egdsocket, seeded TSRMLS_CC); if (return_val == NULL) { EVP_PKEY_free(req->priv_key); @@ -3011,7 +3009,7 @@ static int verify_callback(int preverify_ok, X509_STORE_CTX *ctx) } -PHP_OPENSSL_API int php_openssl_apply_verification_policy(SSL *ssl, X509 *peer, php_stream *stream TSRMLS_DC) +int php_openssl_apply_verification_policy(SSL *ssl, X509 *peer, php_stream *stream TSRMLS_DC) { zval **val = NULL; char *cnmatch = NULL; @@ -3099,7 +3097,7 @@ static int passwd_callback(char *buf, int num, int verify, void *data) return 0; } -PHP_OPENSSL_API SSL *php_SSL_new_from_context(SSL_CTX *ctx, php_stream *stream TSRMLS_DC) +SSL *php_SSL_new_from_context(SSL_CTX *ctx, php_stream *stream TSRMLS_DC) { zval **val = NULL; char *cafile = NULL; diff --git a/ext/openssl/php_openssl.h b/ext/openssl/php_openssl.h index 46c9556775..147fb9b6b8 100644 --- a/ext/openssl/php_openssl.h +++ b/ext/openssl/php_openssl.h @@ -82,8 +82,8 @@ PHP_FUNCTION(openssl_csr_export_to_file); PHP_FUNCTION(openssl_csr_sign); #include -PHP_OPENSSL_API int php_openssl_apply_verification_policy(SSL *ssl, X509 *peer, php_stream *stream TSRMLS_DC); -PHP_OPENSSL_API SSL *php_SSL_new_from_context(SSL_CTX *ctx, php_stream *stream TSRMLS_DC); +int php_openssl_apply_verification_policy(SSL *ssl, X509 *peer, php_stream *stream TSRMLS_DC); +SSL *php_SSL_new_from_context(SSL_CTX *ctx, php_stream *stream TSRMLS_DC); #else -- 2.50.1