[php-src] PHP-8.6: openssl: Rename `OpenSSLSession` references to `Openssl\Session` (#24083)
| From: | Alexander Danilov via GitHub | Date: | Sun, 04 Oct 2026 14:01:24 +0000 |
| Subject: | [php-src] PHP-8.6: openssl: Rename `OpenSSLSession` references to `Openssl\Session` (#24083) | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-141911@lists.php.net to get a copy of this message | ||
Author: Alexander Danilov (adapik)
Committer: GitHub (web-flow)
Pusher: TimWolla
Date: 2026-10-04T16:01:21+02:00
Commit: https://github.com/php/php-src/commit/b799e581e061a474d7dd76289ab6afb4f0056032
Raw diff: https://github.com/php/php-src/commit/b799e581e061a474d7dd76289ab6afb4f0056032.diff
openssl: Rename
OpenSSLSession references to Openssl\Session (#24083)
Changed paths:
M ext/openssl/openssl.c
M ext/openssl/tests/session_resumption_invalid_data.phpt
M ext/openssl/xp_ssl.c
Diff:
diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c
index 7123bf7f393a..0f36f7b42c59 100644
--- a/ext/openssl/openssl.c
+++ b/ext/openssl/openssl.c
@@ -54,7 +54,7 @@ ZEND_DECLARE_MODULE_GLOBALS(openssl)
#include "openssl_arginfo.h"
-/* OpenSSLException class */
+/* Openssl\OpensslException class */
zend_class_entry *php_openssl_exception_ce;
@@ -280,7 +280,7 @@ static zend_object *php_openssl_session_create_object(zend_class_entry *class_ty
static zend_function *php_openssl_session_get_constructor(zend_object *object)
{
zend_throw_error(NULL,
- "Cannot directly construct OpenSSLSession, use OpenSSLSession::import() or TLS session
callbacks");
+ "Cannot directly construct Openssl\\Session, use Openssl\\Session::import() or TLS session
callbacks");
return NULL;
}
diff --git a/ext/openssl/tests/session_resumption_invalid_data.phpt
b/ext/openssl/tests/session_resumption_invalid_data.phpt
index 7e50b9235a2b..93d9329ca0e9 100644
--- a/ext/openssl/tests/session_resumption_invalid_data.phpt
+++ b/ext/openssl/tests/session_resumption_invalid_data.phpt
@@ -63,4 +63,4 @@ ServerClientTestCase::getInstance()->run($clientCode, $serverCode);
Warning: stream_socket_client(): Failed to enable crypto in %s on line %d
Warning: stream_socket_client(): Unable to connect to %s in %s on line %d
-Type error thrown: session_data must be an OpenSSLSession instance
+Type error thrown: session_data must be an Openssl\Session instance
diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c
index 706f4ec5c80f..8d6f82f9d2bd 100644
--- a/ext/openssl/xp_ssl.c
+++ b/ext/openssl/xp_ssl.c
@@ -2244,7 +2244,7 @@ static SSL_SESSION *php_openssl_session_get_cb(SSL *ssl, const unsigned char
*se
session = obj->session;
}
} else if (Z_TYPE(retval) != IS_NULL) {
- zend_type_error("session_get_cb return type must be null or OpenSSLSession");
+ zend_type_error("session_get_cb return type must be null or Openssl\\Session");
}
zval_ptr_dtor(&retval);
@@ -2365,7 +2365,7 @@ static zend_result php_openssl_setup_client_session(php_stream *stream,
if (php_openssl_is_session_ce(val)) {
enable_client_cache = true;
} else if (Z_TYPE_P(val) != IS_NULL) {
- zend_type_error("session_data must be an OpenSSLSession instance");
+ zend_type_error("session_data must be an Openssl\\Session instance");
return FAILURE;
}
}
@@ -2546,13 +2546,13 @@ static zend_result php_openssl_apply_client_session_data(php_stream *stream,
if (!session) {
// TODO: Should this be a TypeError?
php_stream_warn(stream, Generic,
- "Invalid OpenSSLSession object, falling back to full handshake");
+ "Invalid Openssl\\Session object, falling back to full handshake");
return FAILURE;
}
/* Object owns the session, we just borrow it */
needs_free = false;
} else if (Z_TYPE_P(val) != IS_NULL) {
- zend_type_error("session_data must be an OpenSSLSession instance");
+ zend_type_error("session_data must be an Openssl\\Session instance");
return FAILURE;
}