diff options
| author | Kris Kennaway <kris@FreeBSD.org> | 2002-01-27 03:13:07 +0000 | 
|---|---|---|
| committer | Kris Kennaway <kris@FreeBSD.org> | 2002-01-27 03:13:07 +0000 | 
| commit | a21b1b381ecca3813b44ac652d05a5133d3f4e2b (patch) | |
| tree | 844bea9e360a2132b36667e0042dd30ac9f931ff /crypto/openssl/ssl/s3_enc.c | |
| parent | 26d191b459ef5c6e6f66683faef459d6cf694aa2 (diff) | |
Notes
Diffstat (limited to 'crypto/openssl/ssl/s3_enc.c')
| -rw-r--r-- | crypto/openssl/ssl/s3_enc.c | 12 | 
1 files changed, 7 insertions, 5 deletions
diff --git a/crypto/openssl/ssl/s3_enc.c b/crypto/openssl/ssl/s3_enc.c index 8709da917567..af7075e92020 100644 --- a/crypto/openssl/ssl/s3_enc.c +++ b/crypto/openssl/ssl/s3_enc.c @@ -381,8 +381,8 @@ int ssl3_enc(SSL *s, int send)  			if (l == 0 || l%bs != 0)  				{  				SSLerr(SSL_F_SSL3_ENC,SSL_R_BLOCK_CIPHER_PAD_IS_WRONG); -				ssl3_send_alert(s,SSL3_AL_FATAL,SSL_AD_DECRYPT_ERROR); -				return(0); +				ssl3_send_alert(s,SSL3_AL_FATAL,SSL_AD_DECRYPTION_FAILED); +				return 0;  				}  			} @@ -395,9 +395,11 @@ int ssl3_enc(SSL *s, int send)  			 * padding bytes (except that last) are arbitrary */  			if (i > bs)  				{ -				SSLerr(SSL_F_SSL3_ENC,SSL_R_BLOCK_CIPHER_PAD_IS_WRONG); -				ssl3_send_alert(s,SSL3_AL_FATAL,SSL_AD_DECRYPT_ERROR); -				return(0); +				/* Incorrect padding. SSLerr() and ssl3_alert are done +				 * by caller: we don't want to reveal whether this is +				 * a decryption error or a MAC verification failure +				 * (see http://www.openssl.org/~bodo/tls-cbc.txt) */ +				return -1;  				}  			rec->length-=i;  			}  | 
