Use accessors to reach into ASN1_STRING This does the same thing, just is a bit more future-proof for when BoringSSL and OpenSSL make the type opaque in the future. Bug: chromium:443769299 Change-Id: I4a74db8ef58bbd464e6a6a46b31b20aada746432 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/462700 Auto-Submit: David Benjamin <davidben@google.com> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: David Benjamin <davidben@google.com> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/main@{#48024}
diff --git a/rtc_base/boringssl_certificate.cc b/rtc_base/boringssl_certificate.cc index a4f919f..e7ceca3 100644 --- a/rtc_base/boringssl_certificate.cc +++ b/rtc_base/boringssl_certificate.cc
@@ -157,7 +157,7 @@ } unsigned tag; - switch (asn1_time->type) { + switch (ASN1_STRING_type(asn1_time.get())) { case V_ASN1_UTCTIME: tag = CBS_ASN1_UTCTIME; break; @@ -170,7 +170,8 @@ CBB child; if (!CBB_add_asn1(cbb, &child, tag) || - !CBB_add_bytes(&child, asn1_time->data, asn1_time->length) || + !CBB_add_bytes(&child, ASN1_STRING_get0_data(asn1_time.get()), + ASN1_STRING_length(asn1_time.get())) || !CBB_flush(cbb)) { return false; }