diff options
Diffstat (limited to 'src/lib/libtls/tls_server.c')
| -rw-r--r-- | src/lib/libtls/tls_server.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/libtls/tls_server.c b/src/lib/libtls/tls_server.c index a42985744b..a94b4221ed 100644 --- a/src/lib/libtls/tls_server.c +++ b/src/lib/libtls/tls_server.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: tls_server.c,v 1.50 2024/03/26 06:24:52 joshua Exp $ */ | 1 | /* $OpenBSD: tls_server.c,v 1.51 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 | * |
| @@ -372,7 +372,8 @@ tls_accept_common(struct tls *ctx) | |||
| 372 | struct tls *conn_ctx = NULL; | 372 | struct tls *conn_ctx = NULL; |
| 373 | 373 | ||
| 374 | if ((ctx->flags & TLS_SERVER) == 0) { | 374 | if ((ctx->flags & TLS_SERVER) == 0) { |
| 375 | tls_set_errorx(ctx, TLS_ERROR_UNKNOWN, "not a server context"); | 375 | tls_set_errorx(ctx, TLS_ERROR_INVALID_CONTEXT, |
| 376 | "not a server context"); | ||
| 376 | goto err; | 377 | goto err; |
| 377 | } | 378 | } |
| 378 | 379 | ||
| @@ -461,7 +462,7 @@ tls_handshake_server(struct tls *ctx) | |||
| 461 | int rv = -1; | 462 | int rv = -1; |
| 462 | 463 | ||
| 463 | if ((ctx->flags & TLS_SERVER_CONN) == 0) { | 464 | if ((ctx->flags & TLS_SERVER_CONN) == 0) { |
| 464 | tls_set_errorx(ctx, TLS_ERROR_UNKNOWN, | 465 | tls_set_errorx(ctx, TLS_ERROR_INVALID_CONTEXT, |
| 465 | "not a server connection context"); | 466 | "not a server connection context"); |
| 466 | goto err; | 467 | goto err; |
| 467 | } | 468 | } |
