From fd5174e88ca1727a91d6dc9bf9bd898ff9087fe8 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 4 Nov 2009 17:42:53 +1100 Subject: lib/util Split data_blob_hex_string() into upper and lower Rather than have a repeat of the bugs we found at the plugfest where hexidecimal strings must be in upper or lower case in particular places, ensure that each caller chooses which case they want. This reverts most of the callers back to upper case, as things were before tridge's patch. The critical call in the extended DN code is of course handled in lower case. Andrew Bartlett --- lib/util/tests/data_blob.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/util/tests') diff --git a/lib/util/tests/data_blob.c b/lib/util/tests/data_blob.c index f0b02b8d17..53330a4afd 100644 --- a/lib/util/tests/data_blob.c +++ b/lib/util/tests/data_blob.c @@ -78,7 +78,8 @@ static bool test_cmp(struct torture_context *tctx) static bool test_hex_string(struct torture_context *tctx) { DATA_BLOB a = data_blob_string_const("\xC\xA\xF\xE"); - torture_assert_str_equal(tctx, data_blob_hex_string(tctx, &a), "0c0a0f0e", "hex string"); + torture_assert_str_equal(tctx, data_blob_hex_string_lower(tctx, &a), "0c0a0f0e", "hex string"); + torture_assert_str_equal(tctx, data_blob_hex_string_upper(tctx, &a), "0C0A0F0E", "hex string"); return true; } -- cgit