summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremie Courreges-Anglas <jca@cvs.openbsd.org>2024-07-08 06:57:38 +0000
committerJeremie Courreges-Anglas <jca@cvs.openbsd.org>2024-07-08 06:57:38 +0000
commitc238d3accdad30800bbc9d3aa47e1b2948864f6c (patch)
tree0cb6eca960355df4f664a1b1b7650237dcca6a33
parentf4f82c3dee0d5ac8978cefdf80e13205abecf0df (diff)
Pretend to clarify the way ipv6_asc() works
Give example IPv6 addresses to clarify what is meant with 1, 2 or 3 zero length elements. tb made me look. perverted, twisted, crippled
-rw-r--r--lib/libcrypto/x509/x509_utl.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/libcrypto/x509/x509_utl.c b/lib/libcrypto/x509/x509_utl.c
index e5e95bfac5e..422e89989a6 100644
--- a/lib/libcrypto/x509/x509_utl.c
+++ b/lib/libcrypto/x509/x509_utl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: x509_utl.c,v 1.18 2024/06/18 08:29:40 tb Exp $ */
+/* $OpenBSD: x509_utl.c,v 1.19 2024/07/08 06:57:37 jca Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project.
*/
@@ -1325,9 +1325,10 @@ ipv6_from_asc(unsigned char *v6, const char *in)
v6stat.zero_pos = -1;
v6stat.zero_cnt = 0;
- /* Treat the IPv6 representation as a list of values
- * separated by ':'. The presence of a '::' will parse
- * as one, two or three zero length elements.
+ /*
+ * Treat the IPv6 representation as a list of values separated by ':'.
+ * The presence of a '::' will parse as one (e.g., "2001:db8::1"),
+ * two (e.g., "2001:db8::") or three (e.g., "::") zero length elements.
*/
if (!CONF_parse_list(in, ':', 0, ipv6_cb, &v6stat))
return 0;