diff options
author | jsing <> | 2020-05-17 14:26:15 +0000 |
---|---|---|
committer | jsing <> | 2020-05-17 14:26:15 +0000 |
commit | 56a7b6d5a6e5c7f9babcff2d8117d811b3b743c2 (patch) | |
tree | 679336c27b851c8d12e6cbca3aace5dad954c37c | |
parent | ff7d072c818bd71588f3c1a4b98b5f5abb1c8ca9 (diff) | |
download | openbsd-56a7b6d5a6e5c7f9babcff2d8117d811b3b743c2.tar.gz openbsd-56a7b6d5a6e5c7f9babcff2d8117d811b3b743c2.tar.bz2 openbsd-56a7b6d5a6e5c7f9babcff2d8117d811b3b743c2.zip |
Send a decode error alert if a server provides an empty certificate list.
According to RFC 8446 section 4.4.2.4, a client receiving an empty
certificate list must abort the handshake with a decode error alert.
ok beck@ inoguchi@ tb@ ('it rarely is the alert you'd expect it to be...')
-rw-r--r-- | src/lib/libssl/tls13_client.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libssl/tls13_client.c b/src/lib/libssl/tls13_client.c index d3a68528bc..652953f2bb 100644 --- a/src/lib/libssl/tls13_client.c +++ b/src/lib/libssl/tls13_client.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: tls13_client.c,v 1.60 2020/05/16 14:44:55 jsing Exp $ */ | 1 | /* $OpenBSD: tls13_client.c,v 1.61 2020/05/17 14:26:15 jsing Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2018, 2019 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2018, 2019 Joel Sing <jsing@openbsd.org> |
4 | * | 4 | * |
@@ -597,7 +597,7 @@ tls13_server_certificate_recv(struct tls13_ctx *ctx, CBS *cbs) | |||
597 | 597 | ||
598 | /* A server must always provide a non-empty certificate list. */ | 598 | /* A server must always provide a non-empty certificate list. */ |
599 | if (sk_X509_num(certs) < 1) { | 599 | if (sk_X509_num(certs) < 1) { |
600 | ctx->alert = TLS13_ALERT_ILLEGAL_PARAMETER; | 600 | ctx->alert = TLS13_ALERT_DECODE_ERROR; |
601 | tls13_set_errorx(ctx, TLS13_ERR_NO_PEER_CERTIFICATE, 0, | 601 | tls13_set_errorx(ctx, TLS13_ERR_NO_PEER_CERTIFICATE, 0, |
602 | "peer failed to provide a certificate", NULL); | 602 | "peer failed to provide a certificate", NULL); |
603 | goto err; | 603 | goto err; |