Skip to content

Commit ef0731a

Browse files
shukitchanCopilot
andauthored
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]>
1 parent 671f6ae commit ef0731a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugins/experimental/wasm/ats_context.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,8 @@ print_san_certificate(std::string *result, X509 *cert, int type)
204204
for (int i = 0; i < num; i++) {
205205
gen_name = sk_GENERAL_NAME_value(alt_names, i);
206206
if (gen_name->type == type) {
207-
char *dnsname = reinterpret_cast<char *>(ASN1_STRING_data(gen_name->d.dNSName));
208-
int dnsname_len = ASN1_STRING_length(gen_name->d.dNSName);
207+
const char *dnsname = reinterpret_cast<const char *>(ASN1_STRING_get0_data(gen_name->d.dNSName));
208+
int dnsname_len = ASN1_STRING_length(gen_name->d.dNSName);
209209
result->assign(dnsname, dnsname_len);
210210
found = true;
211211
break;

0 commit comments

Comments
 (0)