提交 18096abb 编写于 作者: D Dr. Stephen Henson

Handle NULL parameter in some EVP utility functions.

上级 0aa08a2e
...@@ -255,11 +255,15 @@ int EVP_MD_pkey_type(const EVP_MD *md) ...@@ -255,11 +255,15 @@ int EVP_MD_pkey_type(const EVP_MD *md)
int EVP_MD_size(const EVP_MD *md) int EVP_MD_size(const EVP_MD *md)
{ {
if (!md)
return -1;
return md->md_size; return md->md_size;
} }
const EVP_MD *EVP_MD_CTX_md(const EVP_MD_CTX *ctx) const EVP_MD *EVP_MD_CTX_md(const EVP_MD_CTX *ctx)
{ {
if (!ctx)
return NULL;
return ctx->digest; return ctx->digest;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册