diff --git a/ssl/statem/statem_srvr.c b/ssl/statem/statem_srvr.c index a88b3219ad94fc1b85ee1e513c4788cb2976aeac..773591cd3862a8e87648909d704a900ee6e0d422 100644 --- a/ssl/statem/statem_srvr.c +++ b/ssl/statem/statem_srvr.c @@ -1792,6 +1792,11 @@ int tls_construct_server_key_exchange(SSL *s) goto f_err; } kn = EVP_PKEY_size(pkey); + /* Allow space for signature algorithm */ + if (SSL_USE_SIGALGS(s)) + kn += 2; + /* Allow space for signature length */ + kn += 2; } else { pkey = NULL; kn = 0;