From 64ac925601fe30464c930f88bf97902ff1f34857 Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Tue, 26 Jul 2016 12:44:36 -0400 Subject: [PATCH] Fix ASN1_STRING_to_UTF8 could not convert NumericString tag2nbyte had -1 at 18th position, but underlying ASN1_mbstring_copy supports NumericString. tag2nbyte is also used in do_print_ex which will not be broken by setting 1 at 18th position of tag2nbyte (Imported from upstream's bd598cc405e981de259a07558e600b5a9ef64bd6.) Change-Id: Ie063afcaac8a7d5046cdb385059b991b92cd6659 Reviewed-on: https://boringssl-review.googlesource.com/8946 Reviewed-by: Adam Langley Commit-Queue: David Benjamin CQ-Verified: CQ bot account: commit-bot@chromium.org --- crypto/x509/a_strex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/x509/a_strex.c b/crypto/x509/a_strex.c index aa2501a4..d0d83564 100644 --- a/crypto/x509/a_strex.c +++ b/crypto/x509/a_strex.c @@ -321,7 +321,7 @@ static const signed char tag2nbyte[] = { -1, -1, -1, -1, -1, /* 5-9 */ -1, -1, 0, -1, /* 10-13 */ -1, -1, -1, -1, /* 15-17 */ - -1, 1, 1, /* 18-20 */ + 1, 1, 1, /* 18-20 */ -1, 1, 1, 1, /* 21-24 */ -1, 1, -1, /* 25-27 */ 4, -1, 2 /* 28-30 */