x509: IP in SAN: fix typos caught by János
diff --git a/library/x509_crt.c b/library/x509_crt.c
index c806692..1784947 100644
--- a/library/x509_crt.c
+++ b/library/x509_crt.c
@@ -1252,7 +1252,7 @@
{
ret = mbedtls_snprintf( p, n, "%sIP:%d.%d.%d.%d", sep,
cur->buf.p[0], cur->buf.p[1],
- cur->buf.p[2], cur->buf.p[4] );
+ cur->buf.p[2], cur->buf.p[3] );
MBEDTLS_X509_SAFE_SNPRINTF;
}
else if( cur->buf.len == 16 )
@@ -1287,8 +1287,8 @@
}
#endif /* MBEDTLS_X509_SAN_IP_ADDRESS_SUPPORT */
/*
- * tag == 0 happens when the extension is present but with only unknow
- * types: we get a list with one uninitialized element
+ * tag == 0 happens when the extension is present but with only
+ * unknown types: we get a list with one uninitialized element
*/
else if( cur->buf.tag != 0 )
{