Skip to content

Commit de5eb92

Browse files
committed
openssl: Rename OpenSSLSession references to Openssl\Session
1 parent 61299e0 commit de5eb92

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

‎ext/openssl/openssl.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ ZEND_DECLARE_MODULE_GLOBALS(openssl)
5454

5555
#include "openssl_arginfo.h"
5656

57-
/* OpenSSLException class */
57+
/* Openssl\OpensslException class */
5858

5959
zend_class_entry *php_openssl_exception_ce;
6060

@@ -280,7 +280,7 @@ static zend_object *php_openssl_session_create_object(zend_class_entry *class_ty
280280
static zend_function *php_openssl_session_get_constructor(zend_object *object)
281281
{
282282
zend_throw_error(NULL,
283-
"Cannot directly construct OpenSSLSession, use OpenSSLSession::import() or TLS session callbacks");
283+
"Cannot directly construct Openssl\\Session, use Openssl\\Session::import() or TLS session callbacks");
284284
return NULL;
285285
}
286286

‎ext/openssl/tests/session_resumption_invalid_data.phpt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,4 @@ ServerClientTestCase::getInstance()->run($clientCode, $serverCode);
6363
Warning: stream_socket_client(): Failed to enable crypto in %s on line %d
6464

6565
Warning: stream_socket_client(): Unable to connect to %s in %s on line %d
66-
Type error thrown: session_data must be an OpenSSLSession instance
66+
Type error thrown: session_data must be an Openssl\Session instance

‎ext/openssl/xp_ssl.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2244,7 +2244,7 @@ static SSL_SESSION *php_openssl_session_get_cb(SSL *ssl, const unsigned char *se
22442244
session = obj->session;
22452245
}
22462246
} else if (Z_TYPE(retval) != IS_NULL) {
2247-
zend_type_error("session_get_cb return type must be null or OpenSSLSession");
2247+
zend_type_error("session_get_cb return type must be null or Openssl\\Session");
22482248
}
22492249

22502250
zval_ptr_dtor(&retval);
@@ -2365,7 +2365,7 @@ static zend_result php_openssl_setup_client_session(php_stream *stream,
23652365
if (php_openssl_is_session_ce(val)) {
23662366
enable_client_cache = true;
23672367
} else if (Z_TYPE_P(val) != IS_NULL) {
2368-
zend_type_error("session_data must be an OpenSSLSession instance");
2368+
zend_type_error("session_data must be an Openssl\\Session instance");
23692369
return FAILURE;
23702370
}
23712371
}
@@ -2546,13 +2546,13 @@ static zend_result php_openssl_apply_client_session_data(php_stream *stream,
25462546
if (!session) {
25472547
// TODO: Should this be a TypeError?
25482548
php_stream_warn(stream, Generic,
2549-
"Invalid OpenSSLSession object, falling back to full handshake");
2549+
"Invalid Openssl\\Session object, falling back to full handshake");
25502550
return FAILURE;
25512551
}
25522552
/* Object owns the session, we just borrow it */
25532553
needs_free = false;
25542554
} else if (Z_TYPE_P(val) != IS_NULL) {
2555-
zend_type_error("session_data must be an OpenSSLSession instance");
2555+
zend_type_error("session_data must be an Openssl\\Session instance");
25562556
return FAILURE;
25572557
}
25582558

0 commit comments

Comments
 (0)