diff options
Diffstat (limited to 'ssl/t1_enc.c')
-rw-r--r-- | ssl/t1_enc.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/ssl/t1_enc.c b/ssl/t1_enc.c index 6d6046b337..8968ed0ef7 100644 --- a/ssl/t1_enc.c +++ b/ssl/t1_enc.c @@ -528,6 +528,15 @@ err: return(0); } +/* tls1_enc encrypts/decrypts the record in |s->wrec| / |s->rrec|, respectively. + * + * Returns: + * 0: (in non-constant time) if the record is publically invalid (i.e. too + * short etc). + * 1: if the record's padding is valid / the encryption was successful. + * -1: if the record's padding/AEAD-authenticator is invalid or, if sending, + * an internal error occured. + */ int tls1_enc(SSL *s, int send) { SSL3_RECORD *rec; @@ -628,8 +637,6 @@ int tls1_enc(SSL *s, int send) } #endif /* KSSL_DEBUG */ - rec->orig_len = rec->length; - ret = 1; if (s->read_hash != NULL) mac_size = EVP_MD_size(s->read_hash); |