diff options
| author | tb <> | 2026-04-16 07:28:00 +0000 |
|---|---|---|
| committer | tb <> | 2026-04-16 07:28:00 +0000 |
| commit | 4ab01251a636fac40d8a39e8cc3ba506580aa79b (patch) | |
| tree | 1507d9367c9990c48298039dc67d8d5ce9062f11 /src/lib/libtls/tls.c | |
| parent | d680a6fb78c5f1a30a0d45de7b989cee9631652a (diff) | |
| download | openbsd-4ab01251a636fac40d8a39e8cc3ba506580aa79b.tar.gz openbsd-4ab01251a636fac40d8a39e8cc3ba506580aa79b.tar.bz2 openbsd-4ab01251a636fac40d8a39e8cc3ba506580aa79b.zip | |
libtls: prefer x version of error setting
If a check fails and errno is not necessarily set by the previous API call
use tls_set_errorx() or tls_error_setx() since turning an unrelated errno
into an error string is unhelpful.
From Michael Forney
ok bcook
Diffstat (limited to 'src/lib/libtls/tls.c')
| -rw-r--r-- | src/lib/libtls/tls.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libtls/tls.c b/src/lib/libtls/tls.c index 41bb06d857..02ff337b1e 100644 --- a/src/lib/libtls/tls.c +++ b/src/lib/libtls/tls.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: tls.c,v 1.104 2024/04/08 20:47:32 tb Exp $ */ | 1 | /* $OpenBSD: tls.c,v 1.105 2026/04/16 07:28:00 tb Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> |
| 4 | * | 4 | * |
| @@ -686,7 +686,7 @@ tls_configure_ssl_verify(struct tls *ctx, SSL_CTX *ssl_ctx, int verify) | |||
| 686 | if (xi->crl == NULL) | 686 | if (xi->crl == NULL) |
| 687 | continue; | 687 | continue; |
| 688 | if (!X509_STORE_add_crl(store, xi->crl)) { | 688 | if (!X509_STORE_add_crl(store, xi->crl)) { |
| 689 | tls_set_error(ctx, TLS_ERROR_UNKNOWN, | 689 | tls_set_errorx(ctx, TLS_ERROR_UNKNOWN, |
| 690 | "failed to add crl"); | 690 | "failed to add crl"); |
| 691 | goto err; | 691 | goto err; |
| 692 | } | 692 | } |
