summaryrefslogtreecommitdiff
path: root/crypto/openssl/ssl/s3_enc.c
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2014-08-07 18:56:10 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2014-08-07 18:56:10 +0000
commita93cbc2be851ef88019a97cf7a22ba24e3a88fe1 (patch)
tree466b55a31fe1a87db4dfcbef9e5d2f3e8aec65e1 /crypto/openssl/ssl/s3_enc.c
parente68c8d7f2bc3b4412a6f6acdb3fa15887a9dbb61 (diff)
parentcb6864802ed26a1031701a6a385961592a5cac25 (diff)
downloadsrc-test2-a93cbc2be851ef88019a97cf7a22ba24e3a88fe1.tar.gz
src-test2-a93cbc2be851ef88019a97cf7a22ba24e3a88fe1.zip
Notes
Diffstat (limited to 'crypto/openssl/ssl/s3_enc.c')
-rw-r--r--crypto/openssl/ssl/s3_enc.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/crypto/openssl/ssl/s3_enc.c b/crypto/openssl/ssl/s3_enc.c
index e3cd4f062c5a..996267725ebe 100644
--- a/crypto/openssl/ssl/s3_enc.c
+++ b/crypto/openssl/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,