summaryrefslogtreecommitdiffstats
path: root/crypto/crmf/crmf_pbm.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/crmf/crmf_pbm.c')
-rw-r--r--crypto/crmf/crmf_pbm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/crmf/crmf_pbm.c b/crypto/crmf/crmf_pbm.c
index aba6b3a16f..88a8480cf7 100644
--- a/crypto/crmf/crmf_pbm.c
+++ b/crypto/crmf/crmf_pbm.c
@@ -200,8 +200,8 @@ int OSSL_CRMF_pbm_new(OSSL_LIB_CTX *libctx, const char *propq,
mac_nid = OBJ_obj2nid(pbmp->mac->algorithm);
if (!EVP_PBE_find(EVP_PBE_TYPE_PRF, mac_nid, NULL, &hmac_md_nid, NULL)
- || !OBJ_obj2txt(hmac_mdname, sizeof(hmac_mdname),
- OBJ_nid2obj(hmac_md_nid), 0)) {
+ || OBJ_obj2txt(hmac_mdname, sizeof(hmac_mdname),
+ OBJ_nid2obj(hmac_md_nid), 0) <= 0) {
ERR_raise(ERR_LIB_CRMF, CRMF_R_UNSUPPORTED_ALGORITHM);
goto err;
}