diff options
author | beck <> | 2023-05-28 09:06:34 +0000 |
---|---|---|
committer | beck <> | 2023-05-28 09:06:34 +0000 |
commit | ce5a260afb8e68d35e4e7d5d0a4a86a2e0c94e84 (patch) | |
tree | b2600fa80f2665e60493003b41dcb190797bbbe5 /src/lib | |
parent | fa13c61b67163471b62143c6d6c5bf85974c2914 (diff) | |
download | openbsd-ce5a260afb8e68d35e4e7d5d0a4a86a2e0c94e84.tar.gz openbsd-ce5a260afb8e68d35e4e7d5d0a4a86a2e0c94e84.tar.bz2 openbsd-ce5a260afb8e68d35e4e7d5d0a4a86a2e0c94e84.zip |
correct comment, spotted by tb@
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libtls/tls_verify.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libtls/tls_verify.c b/src/lib/libtls/tls_verify.c index 420e278c99..acc034d9c1 100644 --- a/src/lib/libtls/tls_verify.c +++ b/src/lib/libtls/tls_verify.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: tls_verify.c,v 1.24 2023/05/28 09:02:01 beck Exp $ */ | 1 | /* $OpenBSD: tls_verify.c,v 1.25 2023/05/28 09:06:34 beck Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014 Jeremie Courreges-Anglas <jca@openbsd.org> | 3 | * Copyright (c) 2014 Jeremie Courreges-Anglas <jca@openbsd.org> |
4 | * | 4 | * |
@@ -243,9 +243,9 @@ tls_check_common_name(struct tls *ctx, X509 *cert, const char *name, | |||
243 | data = X509_NAME_ENTRY_get_data(X509_NAME_get_entry(subject_name, | 243 | data = X509_NAME_ENTRY_get_data(X509_NAME_get_entry(subject_name, |
244 | lastpos)); | 244 | lastpos)); |
245 | /* | 245 | /* |
246 | * Fail if we cannot encode as UTF-8, or if the UTF-8 encoding of the | 246 | * Fail if we cannot encode as UTF-8, if the CN is of invalid length, or |
247 | * string contains a 0 byte. We treat any certificate with such data | 247 | * if the UTF-8 encoding of the string contains a 0 byte. We treat any |
248 | * in the CN as hostile and fail. | 248 | * certificate with such data in the CN as hostile and fail. |
249 | */ | 249 | */ |
250 | if ((common_name_len = ASN1_STRING_to_UTF8(&utf8_bytes, data)) < 0) { | 250 | if ((common_name_len = ASN1_STRING_to_UTF8(&utf8_bytes, data)) < 0) { |
251 | tls_set_errorx(ctx, "error verifying name '%s': " | 251 | tls_set_errorx(ctx, "error verifying name '%s': " |