]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - providers/implementations/encode_decode/decode_spki2typespki.c
Fix the return check of OBJ_obj2txt
[thirdparty/openssl.git] / providers / implementations / encode_decode / decode_spki2typespki.c
index 3a4c83e8b5166a9f8fb7068cea768762ff497af7..a5dbbb31adf8d34641afe2ed4db9742f8d6d119f 100644 (file)
@@ -87,7 +87,7 @@ static int spki2typespki_decode(void *vctx, OSSL_CORE_BIO *cin, int selection,
         strcpy(dataname, "SM2");
     else
 #endif
-    if (!OBJ_obj2txt(dataname, sizeof(dataname), oid, 0))
+    if (OBJ_obj2txt(dataname, sizeof(dataname), oid, 0) <= 0)
         goto end;
 
     ossl_X509_PUBKEY_INTERNAL_free(xpub);