diff options
author | Tim Hudson <tjh@openssl.org> | 2014-09-21 21:54:31 +1000 |
---|---|---|
committer | Tim Hudson <tjh@openssl.org> | 2014-09-22 06:32:42 +1000 |
commit | 2518a35a51ee1006683f872f9e34395824e24223 (patch) | |
tree | 95c912c487786878bd59ca4aafa5d4e97dbe2581 | |
parent | 442ca2bd006757e9743a9d39b5811227ea6dbdd9 (diff) |
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.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ssl/s3_clnt.c b/ssl/s3_clnt.c index 0b3e87d2b8..89dc06e5f8 100644 --- a/ssl/s3_clnt.c +++ b/ssl/s3_clnt.c @@ -1628,6 +1628,7 @@ int ssl3_get_key_exchange(SSL *s) if (pkey->type == EVP_PKEY_RSA) { int num; + unsigned int size; j=0; q=md_buf; @@ -1638,9 +1639,9 @@ int ssl3_get_key_exchange(SSL *s) 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); |