From eac6eb70248be41671fcb1700df14fa148e8d221 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 5 Apr 2020 19:59:47 +0300 Subject: [PATCH] X509: Use unique debug prints for unused bits entries This makes it easier to understand which X.509 BIT STRING value has the unused bits. Signed-off-by: Jouni Malinen --- src/tls/x509v3.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/tls/x509v3.c b/src/tls/x509v3.c index 5c8ac5676..d2e685cb3 100644 --- a/src/tls/x509v3.c +++ b/src/tls/x509v3.c @@ -264,7 +264,8 @@ static int x509_parse_public_key(const u8 *buf, size_t len, return -1; pos = hdr.payload; if (*pos) { - wpa_printf(MSG_DEBUG, "X509: BITSTRING - %d unused bits", + wpa_printf(MSG_DEBUG, + "X509: BITSTRING (subjectPublicKey) - %d unused bits", *pos); /* * TODO: should this be rejected? X.509 certificates are @@ -1851,7 +1852,8 @@ struct x509_certificate * x509_certificate_parse(const u8 *buf, size_t len) } pos = hdr.payload; if (*pos) { - wpa_printf(MSG_DEBUG, "X509: BITSTRING - %d unused bits", + wpa_printf(MSG_DEBUG, + "X509: BITSTRING (signatureValue) - %d unused bits", *pos); /* PKCS #1 v1.5 10.2.1: * It is an error if the length in bits of the signature S is