Const-correct some pointers in `quic_test_client.cc`
`X509_get_subject_name` and `X509_NAME_ENTRY_get_data` really should return `const` pointers. They don't for OpenSSL compatibility right now, but may as well clear through the easy cases.
PiperOrigin-RevId: 801298716
diff --git a/quiche/quic/test_tools/quic_test_client.cc b/quiche/quic/test_tools/quic_test_client.cc
index 1d95f8c..4c3799b 100644
--- a/quiche/quic/test_tools/quic_test_client.cc
+++ b/quiche/quic/test_tools/quic_test_client.cc
@@ -108,12 +108,12 @@
}
// Extract the CN field
- X509_NAME* subject = X509_get_subject_name(cert.get());
+ const X509_NAME* subject = X509_get_subject_name(cert.get());
const int index = X509_NAME_get_index_by_NID(subject, NID_commonName, -1);
if (index < 0) {
return QUIC_FAILURE;
}
- ASN1_STRING* name_data =
+ const ASN1_STRING* name_data =
X509_NAME_ENTRY_get_data(X509_NAME_get_entry(subject, index));
if (name_data == nullptr) {
return QUIC_FAILURE;