mirror of
https://github.com/openssl/openssl.git
synced 2025-01-30 14:01:55 +08:00
Ensure we fail with a decode error alert if the server sends and empty Cert
Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3436)
This commit is contained in:
parent
f69fe73a2a
commit
1a281aab73
@ -1688,7 +1688,8 @@ MSG_PROCESS_RETURN tls_process_server_certificate(SSL *s, PACKET *pkt)
|
||||
if ((SSL_IS_TLS13(s) && !PACKET_get_1(pkt, &context))
|
||||
|| context != 0
|
||||
|| !PACKET_get_net_3(pkt, &cert_list_len)
|
||||
|| PACKET_remaining(pkt) != cert_list_len) {
|
||||
|| PACKET_remaining(pkt) != cert_list_len
|
||||
|| PACKET_remaining(pkt) == 0) {
|
||||
al = SSL_AD_DECODE_ERROR;
|
||||
SSLerr(SSL_F_TLS_PROCESS_SERVER_CERTIFICATE, SSL_R_LENGTH_MISMATCH);
|
||||
goto f_err;
|
||||
|
Loading…
Reference in New Issue
Block a user