summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2005-04-27 16:04:30 +0000
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2005-04-27 16:04:30 +0000
commit7ad6162573ba79a4392c63b453ad0220ca6c5ace (patch)
treecb288c5dc7a806611693a07a23a030e2424ff9ec
parent71635eb62300538a2ef92daf4982ac2aabc0c6ec (diff)
downloadgnutls-7ad6162573ba79a4392c63b453ad0220ca6c5ace.tar.gz
added an extra check while checking the padding.
-rw-r--r--lib/gnutls_cipher.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/gnutls_cipher.c b/lib/gnutls_cipher.c
index f2aff50695..cc660c8451 100644
--- a/lib/gnutls_cipher.c
+++ b/lib/gnutls_cipher.c
@@ -468,13 +468,12 @@ int _gnutls_ciphertext2compressed(gnutls_session_t session,
/* Check the pading bytes (TLS 1.x)
*/
- if (ver >= GNUTLS_TLS1)
+ if (ver >= GNUTLS_TLS1 && pad_failed==0)
for (i = 2; i < pad; i++) {
if (ciphertext.data[ciphertext.size - i] !=
ciphertext.data[ciphertext.size - 1])
pad_failed = GNUTLS_E_DECRYPTION_FAILED;
}
-
break;
default:
gnutls_assert();