aboutsummaryrefslogtreecommitdiff
path: root/ssl/d1_enc.c
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2012-06-27 16:44:58 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2012-06-27 16:44:58 +0000
commit2b8b5455829304396e38200c205612c4dc57c052 (patch)
treecc5cd6657453d80b7eafb3ba5cc4ef4fd66c176f /ssl/d1_enc.c
parentfd3744ddb062b70bb370acec340acbac23f0bd98 (diff)
Import OpenSSL 0.9.8x.vendor/openssl/0.9.8x
Notes
Notes: svn path=/vendor-crypto/openssl/dist/; revision=237653 svn path=/vendor-crypto/openssl/0.9.8x/; revision=237654; tag=vendor/openssl/0.9.8x
Diffstat (limited to 'ssl/d1_enc.c')
-rw-r--r--ssl/d1_enc.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/ssl/d1_enc.c b/ssl/d1_enc.c
index 4a6c9090314d..baa75f9186b2 100644
--- a/ssl/d1_enc.c
+++ b/ssl/d1_enc.c
@@ -220,11 +220,7 @@ int dtls1_enc(SSL *s, int send)
if (!send)
{
if (l == 0 || l%bs != 0)
- {
- SSLerr(SSL_F_DTLS1_ENC,SSL_R_BLOCK_CIPHER_PAD_IS_WRONG);
- ssl3_send_alert(s,SSL3_AL_FATAL,SSL_AD_DECRYPTION_FAILED);
- return 0;
- }
+ return -1;
}
EVP_Cipher(ds,rec->data,rec->input,l);
@@ -253,7 +249,7 @@ int dtls1_enc(SSL *s, int send)
}
/* TLS 1.0 does not bound the number of padding bytes by the block size.
* All of them must have value 'padding_length'. */
- if (i > (int)rec->length)
+ if (i + bs > (int)rec->length)
{
/* Incorrect padding. SSLerr() and ssl3_alert are done
* by caller: we don't want to reveal whether this is