summaryrefslogtreecommitdiff
path: root/src/lib/libtls/tls.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libtls/tls.c')
-rw-r--r--src/lib/libtls/tls.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libtls/tls.c b/src/lib/libtls/tls.c
index 8433f556bf..a8b03f0d4a 100644
--- a/src/lib/libtls/tls.c
+++ b/src/lib/libtls/tls.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: tls.c,v 1.101 2024/03/26 06:24:52 joshua Exp $ */ 1/* $OpenBSD: tls.c,v 1.102 2024/03/26 08:54:48 joshua Exp $ */
2/* 2/*
3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -821,7 +821,7 @@ tls_handshake(struct tls *ctx)
821 tls_error_clear(&ctx->error); 821 tls_error_clear(&ctx->error);
822 822
823 if ((ctx->flags & (TLS_CLIENT | TLS_SERVER_CONN)) == 0) { 823 if ((ctx->flags & (TLS_CLIENT | TLS_SERVER_CONN)) == 0) {
824 tls_set_errorx(ctx, TLS_ERROR_UNKNOWN, 824 tls_set_errorx(ctx, TLS_ERROR_INVALID_CONTEXT,
825 "invalid operation for context"); 825 "invalid operation for context");
826 goto out; 826 goto out;
827 } 827 }
@@ -924,7 +924,7 @@ tls_close(struct tls *ctx)
924 tls_error_clear(&ctx->error); 924 tls_error_clear(&ctx->error);
925 925
926 if ((ctx->flags & (TLS_CLIENT | TLS_SERVER_CONN)) == 0) { 926 if ((ctx->flags & (TLS_CLIENT | TLS_SERVER_CONN)) == 0) {
927 tls_set_errorx(ctx, TLS_ERROR_UNKNOWN, 927 tls_set_errorx(ctx, TLS_ERROR_INVALID_CONTEXT,
928 "invalid operation for context"); 928 "invalid operation for context");
929 rv = -1; 929 rv = -1;
930 goto out; 930 goto out;