diff options
Diffstat (limited to 'ssl/s3_enc.c')
-rw-r--r-- | ssl/s3_enc.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/ssl/s3_enc.c b/ssl/s3_enc.c index 5d133eef14..6d92050bb1 100644 --- a/ssl/s3_enc.c +++ b/ssl/s3_enc.c @@ -569,7 +569,7 @@ int ssl3_mac(SSL *ssl, unsigned char *md, int send) const EVP_MD *hash; unsigned char *p,rec_char; unsigned int md_size; - int npad,i; + int npad; if (send) { @@ -612,13 +612,19 @@ int ssl3_mac(SSL *ssl, unsigned char *md, int send) EVP_MD_CTX_cleanup(&md_ctx); + ssl3_record_sequence_update(seq); + return(md_size); + } + +void ssl3_record_sequence_update(unsigned char *seq) + { + int i; + for (i=7; i>=0; i--) { ++seq[i]; if (seq[i] != 0) break; } - - return(md_size); } int ssl3_generate_master_secret(SSL *s, unsigned char *out, unsigned char *p, |