提交 b5ff559f 编写于 作者: T Tim Hudson

Fixed error introduced in commit f2be92b9

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: NRich Salz <rsalz@openssl.org>
Reviewed-by: NMatt Caswell <matt@openssl.org>
上级 d475b2a3
...@@ -2002,6 +2002,7 @@ fprintf(stderr, "USING TLSv1.2 HASH %s\n", EVP_MD_name(md)); ...@@ -2002,6 +2002,7 @@ fprintf(stderr, "USING TLSv1.2 HASH %s\n", EVP_MD_name(md));
if (pkey->type == EVP_PKEY_RSA && !SSL_USE_SIGALGS(s)) if (pkey->type == EVP_PKEY_RSA && !SSL_USE_SIGALGS(s))
{ {
int num; int num;
unsigned int size;
j=0; j=0;
q=md_buf; q=md_buf;
...@@ -2014,9 +2015,9 @@ fprintf(stderr, "USING TLSv1.2 HASH %s\n", EVP_MD_name(md)); ...@@ -2014,9 +2015,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->client_random[0]),SSL3_RANDOM_SIZE);
EVP_DigestUpdate(&md_ctx,&(s->s3->server_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_DigestUpdate(&md_ctx,param,param_len);
EVP_DigestFinal_ex(&md_ctx,q,(unsigned int *)&i); EVP_DigestFinal_ex(&md_ctx,q,&size);
q+=i; q+=size;
j+=i; j+=size;
} }
i=RSA_verify(NID_md5_sha1, md_buf, j, p, n, i=RSA_verify(NID_md5_sha1, md_buf, j, p, n,
pkey->pkey.rsa); pkey->pkey.rsa);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册