From: Dr. Stephen Henson Date: Tue, 4 Jan 2011 19:39:42 +0000 (+0000) Subject: Don't use decryption_failed alert for TLS v1.1 or later. X-Git-Tag: OpenSSL_1_0_1-beta1~396 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4577b38d22429c1f21c5a675ba4a3e5b1a326e37;p=openssl Don't use decryption_failed alert for TLS v1.1 or later. --- diff --git a/ssl/t1_enc.c b/ssl/t1_enc.c index 2b3fd30e42..c418d3217a 100644 --- a/ssl/t1_enc.c +++ b/ssl/t1_enc.c @@ -757,6 +757,8 @@ int tls1_enc(SSL *s, int send) { if (l == 0 || l%bs != 0) { + if (s->version >= TLS1_1_VERSION) + return -1; SSLerr(SSL_F_TLS1_ENC,SSL_R_BLOCK_CIPHER_PAD_IS_WRONG); ssl3_send_alert(s,SSL3_AL_FATAL,SSL_AD_DECRYPTION_FAILED); return 0;