diff options
author | Matt Caswell <matt@openssl.org> | 2014-06-10 23:24:28 +0100 |
---|---|---|
committer | Janusz Kozerski <j.kozerski@samsung.com> | 2014-10-20 15:25:26 +0200 |
commit | 24cf793e817cbfd3b77d60df0fe51e5004d08b4e (patch) | |
tree | b0e995a0f23d6bfe09e9e1acd043535237e51f31 | |
parent | 6e8cbbd304ba08435a6a79d246d45efb5fefc1b2 (diff) | |
download | openssl-24cf793e817cbfd3b77d60df0fe51e5004d08b4e.tar.gz openssl-24cf793e817cbfd3b77d60df0fe51e5004d08b4e.tar.bz2 openssl-24cf793e817cbfd3b77d60df0fe51e5004d08b4e.zip |
Fixed incorrect return code handling in ssl3_final_finish_mac
-rw-r--r-- | ssl/s3_enc.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/ssl/s3_enc.c b/ssl/s3_enc.c index e3cd4f0..9962677 100644 --- a/ssl/s3_enc.c +++ b/ssl/s3_enc.c @@ -642,10 +642,18 @@ int ssl3_cert_verify_mac(SSL *s, int md_nid, unsigned char *p) int ssl3_final_finish_mac(SSL *s, const char *sender, int len, unsigned char *p) { - int ret; + int ret, sha1len; ret=ssl3_handshake_mac(s,NID_md5,sender,len,p); + if(ret == 0) + return 0; + p+=ret; - ret+=ssl3_handshake_mac(s,NID_sha1,sender,len,p); + + sha1len=ssl3_handshake_mac(s,NID_sha1,sender,len,p); + if(sha1len == 0) + return 0; + + ret+=sha1len; return(ret); } static int ssl3_handshake_mac(SSL *s, int md_nid, |