]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
X509: Use unique debug prints for unused bits entries
authorJouni Malinen <j@w1.fi>
Sun, 5 Apr 2020 16:59:47 +0000 (19:59 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 5 Apr 2020 16:59:47 +0000 (19:59 +0300)
This makes it easier to understand which X.509 BIT STRING value has the
unused bits.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/tls/x509v3.c

index 5c8ac567619682062de39ed8df0e93ec86bfd31a..d2e685cb39c382a6a9ecfb348b5499894f9045eb 100644 (file)
@@ -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