提交 21b52dd3 编写于 作者: D Dr. Stephen Henson

bcmp doesn't exist on all platforms, replace with memcmp

上级 d127ef78
......@@ -1172,13 +1172,13 @@ int tls1_export_keying_material(SSL *s, unsigned char *out, unsigned int olen,
* 15, so size of val > max(prohibited label len) = 15 and the
* comparisons won't have buffer overflow
*/
if (bcmp(val, TLS_MD_CLIENT_FINISH_CONST,
if (memcmp(val, TLS_MD_CLIENT_FINISH_CONST,
TLS_MD_CLIENT_FINISH_CONST_SIZE) == 0) goto err1;
if (bcmp(val, TLS_MD_SERVER_FINISH_CONST,
if (memcmp(val, TLS_MD_SERVER_FINISH_CONST,
TLS_MD_SERVER_FINISH_CONST_SIZE) == 0) goto err1;
if (bcmp(val, TLS_MD_MASTER_SECRET_CONST,
if (memcmp(val, TLS_MD_MASTER_SECRET_CONST,
TLS_MD_MASTER_SECRET_CONST_SIZE) == 0) goto err1;
if (bcmp(val, TLS_MD_KEY_EXPANSION_CONST,
if (memcmp(val, TLS_MD_KEY_EXPANSION_CONST,
TLS_MD_KEY_EXPANSION_CONST_SIZE) == 0) goto err1;
tls1_PRF(s->s3->tmp.new_cipher->algorithm2,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册