Replace BIO_printf with ASN1_STRING_print in GENERAL_NAME_print
(Imported from upstream's 8479e9e97354add3c562670db66b5f8151dc3b2e.)
Change-Id: I55843a519b9b361de1b175c09382bbf18d4acfff
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/37584
Reviewed-by: Adam Langley <agl@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
diff --git a/crypto/x509v3/v3_alt.c b/crypto/x509v3/v3_alt.c
index 5a4fadf..74e05bf 100644
--- a/crypto/x509v3/v3_alt.c
+++ b/crypto/x509v3/v3_alt.c
@@ -210,15 +210,18 @@
break;
case GEN_EMAIL:
- BIO_printf(out, "email:%s", gen->d.ia5->data);
+ BIO_printf(out, "email:");
+ ASN1_STRING_print(out, gen->d.ia5);
break;
case GEN_DNS:
- BIO_printf(out, "DNS:%s", gen->d.ia5->data);
+ BIO_printf(out, "DNS:");
+ ASN1_STRING_print(out, gen->d.ia5);
break;
case GEN_URI:
- BIO_printf(out, "URI:%s", gen->d.ia5->data);
+ BIO_printf(out, "URI:");
+ ASN1_STRING_print(out, gen->d.ia5);
break;
case GEN_DIRNAME: