Print IPv6 all 0s correctly (Rob Austein).
authorBen Laurie <ben@openssl.org>
Sun, 8 Mar 2009 10:54:45 +0000 (10:54 +0000)
committerBen Laurie <ben@openssl.org>
Sun, 8 Mar 2009 10:54:45 +0000 (10:54 +0000)
crypto/x509v3/v3_addr.c

index cf48d7e..9a13469 100644 (file)
@@ -190,6 +190,8 @@ static int i2r_address(BIO *out,
       BIO_printf(out, "%x%s", (addr[i] << 8) | addr[i+1], (i < 14 ? ":" : ""));
     if (i < 16)
       BIO_puts(out, ":");
+    if (i == 0)
+      BIO_puts(out, ":");
     break;
   default:
     for (i = 0; i < bs->length; i++)