diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2020-01-20 13:10:38 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2020-01-20 13:10:38 +0000 |
commit | 562bc692fe4670bfd2a4b5ec728fb5f5f41bbc00 (patch) | |
tree | 96db1571c8f6903dc91a971e9cb21b3122b74768 /lib/libssl/tls13_client.c | |
parent | c385348cf630caedd10ae29eabc4729eea2f3bc7 (diff) |
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.c | 4 |
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(); |