diff options
Diffstat (limited to 'src/lib/libtls/tls_config.c')
-rw-r--r-- | src/lib/libtls/tls_config.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libtls/tls_config.c b/src/lib/libtls/tls_config.c index 449071641b..645562e838 100644 --- a/src/lib/libtls/tls_config.c +++ b/src/lib/libtls/tls_config.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: tls_config.c,v 1.68 2024/03/26 06:24:52 joshua Exp $ */ | 1 | /* $OpenBSD: tls_config.c,v 1.69 2024/03/27 07:35:30 joshua Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> |
4 | * | 4 | * |
@@ -321,12 +321,12 @@ tls_config_parse_alpn(struct tls_config *config, const char *alpn, | |||
321 | q = s; | 321 | q = s; |
322 | while ((p = strsep(&q, ",")) != NULL) { | 322 | while ((p = strsep(&q, ",")) != NULL) { |
323 | if ((len = strlen(p)) == 0) { | 323 | if ((len = strlen(p)) == 0) { |
324 | tls_config_set_errorx(config, TLS_ERROR_UNKNOWN, | 324 | tls_config_set_errorx(config, TLS_ERROR_INVALID_ARGUMENT, |
325 | "alpn protocol with zero length"); | 325 | "alpn protocol with zero length"); |
326 | goto err; | 326 | goto err; |
327 | } | 327 | } |
328 | if (len > 255) { | 328 | if (len > 255) { |
329 | tls_config_set_errorx(config, TLS_ERROR_UNKNOWN, | 329 | tls_config_set_errorx(config, TLS_ERROR_INVALID_ARGUMENT, |
330 | "alpn protocol too long"); | 330 | "alpn protocol too long"); |
331 | goto err; | 331 | goto err; |
332 | } | 332 | } |