summaryrefslogtreecommitdiffstats
path: root/lib/libssl/tls13_client.c
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2020-01-20 13:10:37 +0000
committerjsing <jsing@openbsd.org>2020-01-20 13:10:37 +0000
commitc9989395360567c0e7c9b540b886291d6c8d222f (patch)
tree61d3720038296f911700af3e46464937cc2891fb /lib/libssl/tls13_client.c
parentMake the code more readable by introducing (diff)
downloadwireguard-openbsd-c9989395360567c0e7c9b540b886291d6c8d222f.tar.xz
wireguard-openbsd-c9989395360567c0e7c9b540b886291d6c8d222f.zip
Provide an error framework for use with the TLSv1.3 code.
This is based on the libtls error handling code, but adds machine readable codes and subcodes. We then map these codes back to libssl error codes. ok beck@ inoguchi@
Diffstat (limited to 'lib/libssl/tls13_client.c')
-rw-r--r--lib/libssl/tls13_client.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libssl/tls13_client.c b/lib/libssl/tls13_client.c
index 6dcf8c85b67..07b9ede3454 100644
--- a/lib/libssl/tls13_client.c
+++ b/lib/libssl/tls13_client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tls13_client.c,v 1.19 2019/11/17 06:30:12 jsing Exp $ */
+/* $OpenBSD: tls13_client.c,v 1.20 2020/01/20 13:10:37 jsing Exp $ */
/*
* Copyright (c) 2018, 2019 Joel Sing <jsing@openbsd.org>
*
@@ -499,6 +499,8 @@ tls13_server_certificate_recv(struct tls13_ctx *ctx)
if (ssl_verify_cert_chain(s, certs) <= 0 &&
s->verify_mode != SSL_VERIFY_NONE) {
/* XXX send alert */
+ tls13_set_errorx(ctx, TLS13_ERR_VERIFY_FAILED, 0,
+ "failed to verify peer certificate", NULL);
goto err;
}
ERR_clear_error();