You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-commits@axis.apache.org by bi...@apache.org on 2026/02/01 15:57:27 UTC
(axis-axis2-c-core) branch master updated (f7d0153fa -> 1e1a36320)
This is an automated email from the ASF dual-hosted git repository.
billblough pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/axis-axis2-c-core.git
from f7d0153fa Add Github Actions tool cve-check
new beb04dad1 Fix client msg_ctx null pointer dereference when server returns invalid response
new 42c72e6ba Add SNI support
new 1e1a36320 Remove dangling #endifs
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
src/core/clientapi/callback.c | 7 +++++--
src/core/transport/http/sender/http_client.c | 10 +++++-----
src/core/transport/http/sender/http_sender.c | 14 --------------
src/core/transport/http/sender/ssl/ssl_stream.c | 5 +++--
src/core/transport/http/sender/ssl/ssl_stream.h | 3 ++-
src/core/transport/http/sender/ssl/ssl_utils.c | 13 ++++++++++---
src/core/transport/http/sender/ssl/ssl_utils.h | 5 ++++-
7 files changed, 29 insertions(+), 28 deletions(-)
(axis-axis2-c-core) 01/03: Fix client msg_ctx null pointer dereference when server returns invalid response
Posted by bi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
billblough pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/axis-axis2-c-core.git
commit beb04dad1390aaac9b65fd372b0c5a7dc874aec1
Author: Bill Blough <bi...@apache.org>
AuthorDate: Sun Feb 1 10:01:10 2026 -0500
Fix client msg_ctx null pointer dereference when server returns invalid response
---
src/core/clientapi/callback.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/core/clientapi/callback.c b/src/core/clientapi/callback.c
index a926abf31..7c997f9b5 100644
--- a/src/core/clientapi/callback.c
+++ b/src/core/clientapi/callback.c
@@ -121,8 +121,11 @@ axis2_callback_invoke_on_complete(
callback->envelope = axis2_async_result_get_envelope(result, env);
callback->msg_ctx = axis2_async_result_get_result(result, env);
- axis2_msg_ctx_increment_ref(callback->msg_ctx, env); /* this will be set in opclient's msgctx
- map and will be deleted from there */
+ if (callback->msg_ctx)
+ {
+ axis2_msg_ctx_increment_ref(callback->msg_ctx, env); /* this will be set in opclient's msgctx
+ map and will be deleted from there */
+ }
status = callback->on_complete(callback, env);
(axis-axis2-c-core) 03/03: Remove dangling #endifs
Posted by bi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
billblough pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/axis-axis2-c-core.git
commit 1e1a3632036aef934d5324ef1b1285f61cd5f9dc
Author: Bill Blough <bi...@apache.org>
AuthorDate: Sun Feb 1 10:54:51 2026 -0500
Remove dangling #endifs
Related to 01321cb5cd339586dbc0c1c97297f5cce9fb12ec
---
src/core/transport/http/sender/http_sender.c | 14 --------------
1 file changed, 14 deletions(-)
diff --git a/src/core/transport/http/sender/http_sender.c b/src/core/transport/http/sender/http_sender.c
index b7ed41faf..8e56a6ff0 100644
--- a/src/core/transport/http/sender/http_sender.c
+++ b/src/core/transport/http/sender/http_sender.c
@@ -159,14 +159,12 @@ axis2_http_sender_configure_proxy_digest_auth(
/* NTLM authentication functions removed - see security note at top of file */
-#endif
/* Native HTTP client (libcurl removed) */
static axutil_hash_t *
axis2_http_sender_connection_map_create(
const axutil_env_t *env,
axis2_msg_ctx_t *msg_ctx);
-#endif
static void
axis2_http_sender_connection_map_remove(
@@ -193,7 +191,6 @@ static void AXIS2_CALL
axis2_http_sender_connection_map_free(
void *cm_void,
const axutil_env_t *env);
-#endif
AXIS2_EXTERN axis2_http_sender_t *AXIS2_CALL
axis2_http_sender_create(
@@ -1504,7 +1501,6 @@ axis2_http_sender_send(
AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "Exit:axis2_http_sender_send");
return AXIS2_FAILURE;
}
-#endif
AXIS2_EXTERN axis2_status_t AXIS2_CALL
axis2_http_sender_set_chunked(
@@ -1949,7 +1945,6 @@ axis2_http_sender_configure_proxy(
}
return AXIS2_SUCCESS;
}
-#endif
/* Native HTTP client (libcurl removed) */
static axis2_status_t
@@ -1986,7 +1981,6 @@ axis2_http_sender_configure_server_cert(
return status;
}
-#endif
/* Native HTTP client (libcurl removed) */
static axis2_status_t
@@ -2023,7 +2017,6 @@ axis2_http_sender_configure_key_file(
return status;
}
-#endif
/* Native HTTP client (libcurl removed) */
static axis2_status_t
@@ -2245,7 +2238,6 @@ axis2_http_sender_configure_proxy_basic_auth(
}
return AXIS2_FAILURE;
}
-#endif
/* Native HTTP client (libcurl removed) */
static axis2_status_t
@@ -2903,7 +2895,6 @@ axis2_http_sender_configure_proxy_digest_auth(
/* NTLM proxy authentication removed - see security note at top of file */
-#endif
/* Native HTTP client (libcurl removed) */
static axis2_status_t
@@ -3110,7 +3101,6 @@ axis2_http_sender_configure_proxy_auth(
return status;
}
-#endif
/* Native HTTP client (libcurl removed) */
static axis2_status_t
@@ -3237,7 +3227,6 @@ axis2_http_sender_set_proxy_auth_type(
}
return status;
}
-#endif
/* libcurl backend removed (January 2026) - using native HTTP client only */
@@ -3420,7 +3409,6 @@ axis2_http_sender_connection_map_create(
}
return connection_map;
}
-#endif
/* AXIS2C-1635 FIX: Helper to properly remove entry from connection_map and free the strdup'd key.
* The keys in connection_map are strdup'd when added, so we must free them when removing entries. */
@@ -3570,7 +3558,6 @@ axis2_http_sender_connection_map_get(
}
return http_client;
}
-#endif
/* Native HTTP client (libcurl removed) */
static void AXIS2_CALL
@@ -3597,4 +3584,3 @@ axis2_http_sender_connection_map_free(
}
axutil_hash_free(ht, env);
}
-#endif
(axis-axis2-c-core) 02/03: Add SNI support
Posted by bi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
billblough pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/axis-axis2-c-core.git
commit 42c72e6ba230fb1d9f2b33a8caae099fc10b0733
Author: Bill Blough <bi...@apache.org>
AuthorDate: Sun Feb 1 10:52:56 2026 -0500
Add SNI support
AXIS2C-1706
---
src/core/transport/http/sender/http_client.c | 10 +++++-----
src/core/transport/http/sender/ssl/ssl_stream.c | 5 +++--
src/core/transport/http/sender/ssl/ssl_stream.h | 3 ++-
src/core/transport/http/sender/ssl/ssl_utils.c | 13 ++++++++++---
src/core/transport/http/sender/ssl/ssl_utils.h | 5 ++++-
5 files changed, 24 insertions(+), 12 deletions(-)
diff --git a/src/core/transport/http/sender/http_client.c b/src/core/transport/http/sender/http_client.c
index ae5d1e2be..202126433 100644
--- a/src/core/transport/http/sender/http_client.c
+++ b/src/core/transport/http/sender/http_client.c
@@ -523,11 +523,11 @@ axis2_http_client_send(
return AXIS2_FAILURE;
}
}
- if(!client->data_stream)
- client->data_stream =
- axutil_stream_create_ssl(env, client->sockfd, axis2_http_client_get_server_cert(client,
- env), axis2_http_client_get_key_file(client, env), ssl_pp,
- client->validate_ssl_hostname == AXIS2_TRUE ? host : NULL);
+ if(!client->data_stream)
+ client->data_stream =
+ axutil_stream_create_ssl(env, client->sockfd, axis2_http_client_get_server_cert(client,
+ env), axis2_http_client_get_key_file(client, env), ssl_pp, host,
+ client->validate_ssl_hostname);
#else
axutil_network_handler_close_socket(env, client->sockfd);
client->sockfd = -1;
diff --git a/src/core/transport/http/sender/ssl/ssl_stream.c b/src/core/transport/http/sender/ssl/ssl_stream.c
index ebcc6365a..dff00f830 100644
--- a/src/core/transport/http/sender/ssl/ssl_stream.c
+++ b/src/core/transport/http/sender/ssl/ssl_stream.c
@@ -70,7 +70,8 @@ axutil_stream_create_ssl(
axis2_char_t * server_cert,
axis2_char_t * key_file,
axis2_char_t * ssl_pp,
- axis2_char_t * host)
+ axis2_char_t * host,
+ axis2_bool_t check_host)
{
ssl_stream_impl_t *stream_impl = NULL;
@@ -97,7 +98,7 @@ axutil_stream_create_ssl(
return NULL;
}
stream_impl->ssl = axis2_ssl_utils_initialize_ssl(env, stream_impl->ctx,
- stream_impl->socket, host);
+ stream_impl->socket, host, check_host);
if (!stream_impl->ssl)
{
axis2_ssl_stream_free((axutil_stream_t *) stream_impl, env);
diff --git a/src/core/transport/http/sender/ssl/ssl_stream.h b/src/core/transport/http/sender/ssl/ssl_stream.h
index 2df504d77..44e54d11d 100644
--- a/src/core/transport/http/sender/ssl/ssl_stream.h
+++ b/src/core/transport/http/sender/ssl/ssl_stream.h
@@ -39,7 +39,8 @@ extern "C"
axis2_char_t * server_cert,
axis2_char_t * key_file,
axis2_char_t * ssl_pp,
- axis2_char_t * host);
+ axis2_char_t * host,
+ axis2_bool_t check_host);
void AXIS2_CALL
axis2_ssl_stream_free(
diff --git a/src/core/transport/http/sender/ssl/ssl_utils.c b/src/core/transport/http/sender/ssl/ssl_utils.c
index 10c1c6375..acaf076c9 100644
--- a/src/core/transport/http/sender/ssl/ssl_utils.c
+++ b/src/core/transport/http/sender/ssl/ssl_utils.c
@@ -210,7 +210,8 @@ axis2_ssl_utils_initialize_ssl(
const axutil_env_t * env,
SSL_CTX * ctx,
axis2_socket_t socket,
- axis2_char_t * host)
+ axis2_char_t * host,
+ axis2_bool_t check_host)
{
SSL *ssl = NULL;
BIO *sbio = NULL;
@@ -235,6 +236,11 @@ axis2_ssl_utils_initialize_ssl(
return NULL;
}
+ if (host)
+ {
+ SSL_set_tlsext_host_name(ssl, host);
+ }
+
SSL_set_bio(ssl, sbio, sbio);
if (SSL_connect(ssl) <= 0)
{
@@ -284,8 +290,9 @@ axis2_ssl_utils_initialize_ssl(
if (ASN1_STRING_cmp(peer_sig, client_sig) == 0)
{
if (peer_cert) {
- /* if the caller passed a hostname, verify it against the cert */
- if (host) {
+ /* if the caller passed a hostname and host checking is enabled,
+ * verify it against the cert */
+ if (host && check_host) {
if (X509_check_host(peer_cert, host, strlen(host), 0, NULL) == 1) {
AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
"[ssl client] peer name matches certificate CN/SAN");
diff --git a/src/core/transport/http/sender/ssl/ssl_utils.h b/src/core/transport/http/sender/ssl/ssl_utils.h
index 29f00ad42..72606b2b4 100644
--- a/src/core/transport/http/sender/ssl/ssl_utils.h
+++ b/src/core/transport/http/sender/ssl/ssl_utils.h
@@ -42,7 +42,10 @@ extern "C"
const axutil_env_t * env,
SSL_CTX * ctx,
axis2_socket_t socket,
- axis2_char_t * host);
+ axis2_char_t * host,
+ axis2_bool_t check_host);
+
+
AXIS2_EXTERN axis2_status_t AXIS2_CALL
axis2_ssl_utils_cleanup_ssl(