Fix dynamic public key method lookup.
authorDr. Stephen Henson <steve@openssl.org>
Tue, 4 Apr 2006 18:32:19 +0000 (18:32 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Tue, 4 Apr 2006 18:32:19 +0000 (18:32 +0000)
crypto/asn1/ameth_lib.c

index 6f98872..6b4690e 100644 (file)
@@ -139,8 +139,8 @@ const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find(int type)
        if (app_methods)
                {
                int idx;
-               idx = sk_find(app_methods, (char *)&t);
-               if (idx > 0)
+               idx = sk_find(app_methods, (char *)&tmp);
+               if (idx >= 0)
                        return (EVP_PKEY_ASN1_METHOD *)
                                sk_value(app_methods, idx);
                }