Fixed incorrect return code handling in ssl3_final_finish_mac.
Based on an original patch by Joel Sing (OpenBSD) who also originally identified the issue.
This commit is contained in:
parent
01736e6c41
commit
042ef467ee
12
ssl/s3_enc.c
12
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,
|
int ssl3_final_finish_mac(SSL *s,
|
||||||
const char *sender, int len, unsigned char *p)
|
const char *sender, int len, unsigned char *p)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret, sha1len;
|
||||||
ret=ssl3_handshake_mac(s,NID_md5,sender,len,p);
|
ret=ssl3_handshake_mac(s,NID_md5,sender,len,p);
|
||||||
|
if(ret == 0)
|
||||||
|
return 0;
|
||||||
|
|
||||||
p+=ret;
|
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);
|
return(ret);
|
||||||
}
|
}
|
||||||
static int ssl3_handshake_mac(SSL *s, int md_nid,
|
static int ssl3_handshake_mac(SSL *s, int md_nid,
|
||||||
|
Loading…
Reference in New Issue
Block a user