summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Hudson <tjh@openssl.org>2014-09-21 21:54:31 +1000
committerJanusz Kozerski <j.kozerski@samsung.com>2014-10-20 15:26:05 +0200
commit1735ece938c848d8bd2a004dd5f7e993eb0d0b1a (patch)
tree2f9b98688362b33158c165c04997ce586c6a4205
parent897dc5d059e8bb69ce468bc2690d15cea1ef4b8e (diff)
downloadopenssl-1735ece938c848d8bd2a004dd5f7e993eb0d0b1a.tar.gz
openssl-1735ece938c848d8bd2a004dd5f7e993eb0d0b1a.tar.bz2
openssl-1735ece938c848d8bd2a004dd5f7e993eb0d0b1a.zip
Fixed error introduced in commit f2be92b94dad3c6cbdf79d99a324804094cf1617
that fixed PR#3450 where an existing cast masked an issue when i was changed from int to long in that commit Picked up on z/linux (s390) where sizeof(int)!=sizeof(long) Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (cherry picked from commit b5ff559ff90124c6fd53bbb49dae5edb4e821e0a)
-rw-r--r--ssl/s3_clnt.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ssl/s3_clnt.c b/ssl/s3_clnt.c
index 71f9a7f..263e634 100644
--- a/ssl/s3_clnt.c
+++ b/ssl/s3_clnt.c
@@ -1900,6 +1900,7 @@ fprintf(stderr, "USING TLSv1.2 HASH %s\n", EVP_MD_name(md));
if (pkey->type == EVP_PKEY_RSA && TLS1_get_version(s) < TLS1_2_VERSION)
{
int num;
+ unsigned int size;
j=0;
q=md_buf;
@@ -1912,9 +1913,9 @@ fprintf(stderr, "USING TLSv1.2 HASH %s\n", EVP_MD_name(md));
EVP_DigestUpdate(&md_ctx,&(s->s3->client_random[0]),SSL3_RANDOM_SIZE);
EVP_DigestUpdate(&md_ctx,&(s->s3->server_random[0]),SSL3_RANDOM_SIZE);
EVP_DigestUpdate(&md_ctx,param,param_len);
- EVP_DigestFinal_ex(&md_ctx,q,(unsigned int *)&i);
- q+=i;
- j+=i;
+ EVP_DigestFinal_ex(&md_ctx,q,&size);
+ q+=size;
+ j+=size;
}
i=RSA_verify(NID_md5_sha1, md_buf, j, p, n,
pkey->pkey.rsa);