diff options
| author | beck <> | 2022-06-27 15:03:11 +0000 |
|---|---|---|
| committer | beck <> | 2022-06-27 15:03:11 +0000 |
| commit | 3fb1d6ae7e7ceee89a501feeb7b20aa3b6eb6d27 (patch) | |
| tree | 00cecd6f9f6f38e75e94b7b51c8016fa671b64b9 /src/lib/libcrypto/x509/x509_constraints.c | |
| parent | a3b0a728931d6c5a26432313539488d02437583c (diff) | |
| download | openbsd-3fb1d6ae7e7ceee89a501feeb7b20aa3b6eb6d27.tar.gz openbsd-3fb1d6ae7e7ceee89a501feeb7b20aa3b6eb6d27.tar.bz2 openbsd-3fb1d6ae7e7ceee89a501feeb7b20aa3b6eb6d27.zip | |
Correct misleading comment for URI parsing
ok jsing@
Diffstat (limited to 'src/lib/libcrypto/x509/x509_constraints.c')
| -rw-r--r-- | src/lib/libcrypto/x509/x509_constraints.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/lib/libcrypto/x509/x509_constraints.c b/src/lib/libcrypto/x509/x509_constraints.c index c68f282a05..8cd8413dfa 100644 --- a/src/lib/libcrypto/x509/x509_constraints.c +++ b/src/lib/libcrypto/x509/x509_constraints.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: x509_constraints.c,v 1.27 2022/06/26 11:29:27 beck Exp $ */ | 1 | /* $OpenBSD: x509_constraints.c,v 1.28 2022/06/27 15:03:11 beck Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2020 Bob Beck <beck@openbsd.org> | 3 | * Copyright (c) 2020 Bob Beck <beck@openbsd.org> |
| 4 | * | 4 | * |
| @@ -455,9 +455,15 @@ x509_constraints_valid_domain_constraint(uint8_t *constraint, size_t len) | |||
| 455 | } | 455 | } |
| 456 | 456 | ||
| 457 | /* | 457 | /* |
| 458 | * Extract the host part of a URI, returns the host part as a c string | 458 | * Extract the host part of a URI. On failure to parse a valid host part of the |
| 459 | * the caller must free, or or NULL if it could not be found or is | 459 | * URI, 0 is returned indicating an invalid URI. If the host part parses as |
| 460 | * invalid. | 460 | * valid, or is not present, 1 is returned indicating a possibly valid URI. |
| 461 | * | ||
| 462 | * In the case of a valid URI, *hostpart will be set to a copy of the host part | ||
| 463 | * of the URI, or the empty string if no URI is present. If memory allocation | ||
| 464 | * fails *hostpart will be set to NULL, even though we returned 1. It is the | ||
| 465 | * caller's responsibility to indicate an error for memory allocation failure, | ||
| 466 | * and the callers responsibility to free *hostpart. | ||
| 461 | * | 467 | * |
| 462 | * RFC 3986: | 468 | * RFC 3986: |
| 463 | * the authority part of a uri starts with // and is terminated with | 469 | * the authority part of a uri starts with // and is terminated with |
