summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjca <>2024-07-08 06:57:37 +0000
committerjca <>2024-07-08 06:57:37 +0000
commit6b813c7c12b81e1e330f8870fe4e5db7abb1db55 (patch)
treeb0f10388c7ccf8d89a2e2f9e8226d7e2795ed66e /src
parentf07ce6a42c87dbe9eba43aa75699d4430cb57ac0 (diff)
downloadopenbsd-6b813c7c12b81e1e330f8870fe4e5db7abb1db55.tar.gz
openbsd-6b813c7c12b81e1e330f8870fe4e5db7abb1db55.tar.bz2
openbsd-6b813c7c12b81e1e330f8870fe4e5db7abb1db55.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/x509/x509_utl.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/lib/libcrypto/x509/x509_utl.c b/src/lib/libcrypto/x509/x509_utl.c
index e5e95bfac5..422e89989a 100644
--- a/src/lib/libcrypto/x509/x509_utl.c
+++ b/src/lib/libcrypto/x509/x509_utl.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509_utl.c,v 1.18 2024/06/18 08:29:40 tb Exp $ */ 1/* $OpenBSD: x509_utl.c,v 1.19 2024/07/08 06:57:37 jca Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project. 3 * project.
4 */ 4 */
@@ -1325,9 +1325,10 @@ ipv6_from_asc(unsigned char *v6, const char *in)
1325 v6stat.zero_pos = -1; 1325 v6stat.zero_pos = -1;
1326 v6stat.zero_cnt = 0; 1326 v6stat.zero_cnt = 0;
1327 1327
1328 /* Treat the IPv6 representation as a list of values 1328 /*
1329 * separated by ':'. The presence of a '::' will parse 1329 * Treat the IPv6 representation as a list of values separated by ':'.
1330 * as one, two or three zero length elements. 1330 * The presence of a '::' will parse as one (e.g., "2001:db8::1"),
1331 * two (e.g., "2001:db8::") or three (e.g., "::") zero length elements.
1331 */ 1332 */
1332 if (!CONF_parse_list(in, ':', 0, ipv6_cb, &v6stat)) 1333 if (!CONF_parse_list(in, ':', 0, ipv6_cb, &v6stat))
1333 return 0; 1334 return 0;