]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - crypto/asn1/ameth_lib.c
Use "==0" instead of "!strcmp" etc
[thirdparty/openssl.git] / crypto / asn1 / ameth_lib.c
index de70f9b4b2472ddc9526d1ec842cf48d5d4e75b8..ce4c0dcaf9325a80f2762ca60e9380c07265a063 100644 (file)
@@ -221,8 +221,8 @@ const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find_str(ENGINE **pe,
         ameth = EVP_PKEY_asn1_get0(i);
         if (ameth->pkey_flags & ASN1_PKEY_ALIAS)
             continue;
-        if (((int)strlen(ameth->pem_str) == len) &&
-            !strncasecmp(ameth->pem_str, str, len))
+        if (((int)strlen(ameth->pem_str) == len)
+            && (strncasecmp(ameth->pem_str, str, len) == 0))
             return ameth;
     }
     return NULL;