From: Acheev Bhagat Date: Fri, 7 Jun 2019 00:05:49 +0000 (-0400) Subject: Replace BIO_printf with ASN1_STRING_print in GENERAL_NAME_print X-Git-Tag: OpenSSL_1_0_2t~23 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=8479e9e97354add3c562670db66b5f8151dc3b2e;p=oweals%2Fopenssl.git Replace BIO_printf with ASN1_STRING_print in GENERAL_NAME_print Reviewed-by: Richard Levitte Reviewed-by: Tim Hudson Reviewed-by: Matthias St. Pierre (Merged from https://github.com/openssl/openssl/pull/9101) --- diff --git a/crypto/x509v3/v3_alt.c b/crypto/x509v3/v3_alt.c index d4d024c561..bba2e41380 100644 --- a/crypto/x509v3/v3_alt.c +++ b/crypto/x509v3/v3_alt.c @@ -205,15 +205,18 @@ int GENERAL_NAME_print(BIO *out, GENERAL_NAME *gen) 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: