提交 219f3ca6 编写于 作者: J J Mohan Rao Arisankala 提交者: Rich Salz

check with NULL

Reviewed-by: NMatt Caswell <matt@openssl.org>
Reviewed-by: NRich Salz <rsalz@openssl.org>
上级 4f25aecd
......@@ -243,12 +243,12 @@ int ASN1_item_sign_ctx(const ASN1_ITEM *it,
type = EVP_MD_CTX_md(ctx);
pkey = EVP_PKEY_CTX_get0_pkey(EVP_MD_CTX_pkey_ctx(ctx));
if (NULL == type || NULL == pkey) {
if (type == NULL || pkey == NULL) {
ASN1err(ASN1_F_ASN1_ITEM_SIGN_CTX, ASN1_R_CONTEXT_NOT_INITIALISED);
goto err;
}
if (NULL == pkey->ameth) {
if (pkey->ameth == NULL) {
ASN1err(ASN1_F_ASN1_ITEM_SIGN_CTX, ASN1_R_DIGEST_AND_KEY_TYPE_NOT_SUPPORTED);
goto err;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册