From 562bc692fe4670bfd2a4b5ec728fb5f5f41bbc00 Mon Sep 17 00:00:00 2001 From: Joel Sing Date: Mon, 20 Jan 2020 13:10:38 +0000 Subject: 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@ --- lib/libssl/tls13_client.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/libssl/tls13_client.c') 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 * @@ -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(); -- cgit v1.2.3