This is an automated email from the ASF dual-hosted git repository.
kichan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new ef0731ac53 Replace deprecated ASN1_STRING_data function (#12698)
ef0731ac53 is described below
commit ef0731ac53632284d37831729df0f8a240cc1245
Author: Kit Chan <[email protected]>
AuthorDate: Sun Dec 7 16:01:36 2025 -0800
Replace deprecated ASN1_STRING_data function (#12698)
* Initial plan
* Replace deprecated ASN1_STRING_data with ASN1_STRING_get0_data
Co-authored-by: shukitchan <[email protected]>
* Fix formatting of variable declarations in ats_context.cc
* Align variable declarations for dnsname and dnsname_len
---------
Co-authored-by: copilot-swe-agent[bot]
<[email protected]>
Co-authored-by: shukitchan <[email protected]>
---
plugins/experimental/wasm/ats_context.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/plugins/experimental/wasm/ats_context.cc
b/plugins/experimental/wasm/ats_context.cc
index c617fd5293..ec96d5c9c2 100644
--- a/plugins/experimental/wasm/ats_context.cc
+++ b/plugins/experimental/wasm/ats_context.cc
@@ -204,8 +204,8 @@ print_san_certificate(std::string *result, X509 *cert, int
type)
for (int i = 0; i < num; i++) {
gen_name = sk_GENERAL_NAME_value(alt_names, i);
if (gen_name->type == type) {
- char *dnsname = reinterpret_cast<char
*>(ASN1_STRING_data(gen_name->d.dNSName));
- int dnsname_len = ASN1_STRING_length(gen_name->d.dNSName);
+ const char *dnsname = reinterpret_cast<const char
*>(ASN1_STRING_get0_data(gen_name->d.dNSName));
+ int dnsname_len = ASN1_STRING_length(gen_name->d.dNSName);
result->assign(dnsname, dnsname_len);
found = true;
break;