]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
TLS: Fix debug dump of X.509 certificate
authorJouni Malinen <j@w1.fi>
Sat, 2 May 2015 21:52:59 +0000 (00:52 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 3 May 2015 13:32:40 +0000 (16:32 +0300)
The length of the extra data following the encoded certificate was
printed out in debug hexdump.

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

index 742af328cf8cc019f557ab280a424e7ef9715c6c..b51dfcd44732027ba7f6eb8f9a980e208a8f1c43 100644 (file)
@@ -1511,7 +1511,7 @@ struct x509_certificate * x509_certificate_parse(const u8 *buf, size_t len)
        if (pos + hdr.length < end) {
                wpa_hexdump(MSG_MSGDUMP, "X509: Ignoring extra data after DER "
                            "encoded certificate",
-                           pos + hdr.length, end - pos + hdr.length);
+                           pos + hdr.length, end - (pos + hdr.length));
                end = pos + hdr.length;
        }