aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBodo Möller <bodo@openssl.org>2003-02-12 14:17:33 +0000
committerBodo Möller <bodo@openssl.org>2003-02-12 14:17:33 +0000
commitb73de7334a199839ab03167abab7193b9a67c079 (patch)
treec14e557b5bf535f92b17b18c5d0a6490b7d5326f
parenta71f9eeb9f712800beff93972bd847e2a1a3facb (diff)
downloadopenssl-b73de7334a199839ab03167abab7193b9a67c079.tar.gz
comments
-rw-r--r--ssl/s3_enc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ssl/s3_enc.c b/ssl/s3_enc.c
index e7743aba2a..bbadac0d37 100644
--- a/ssl/s3_enc.c
+++ b/ssl/s3_enc.c
@@ -456,6 +456,7 @@ int ssl3_enc(SSL *s, int send)
ssl3_send_alert(s,SSL3_AL_FATAL,SSL_AD_DECRYPTION_FAILED);
return 0;
}
+ /* otherwise, rec->length >= bs */
}
EVP_Cipher(ds,rec->data,rec->input,l);
@@ -464,7 +465,7 @@ int ssl3_enc(SSL *s, int send)
{
i=rec->data[l-1]+1;
/* SSL 3.0 bounds the number of padding bytes by the block size;
- * padding bytes (except that last) are arbitrary */
+ * padding bytes (except the last one) are arbitrary */
if (i > bs)
{
/* Incorrect padding. SSLerr() and ssl3_alert are done
@@ -473,6 +474,7 @@ int ssl3_enc(SSL *s, int send)
* (see http://www.openssl.org/~bodo/tls-cbc.txt) */
return -1;
}
+ /* now i <= bs <= rec->length */
rec->length-=i;
}
}