{
#ifndef OPENSSL_NO_ENGINE
ENGINE *e;
- for (e = ENGINE_get_first(); e; e = ENGINE_get_next(e))
+ ameth = ENGINE_pkey_asn1_find_str(&e, str, len);
+ if (ameth)
{
- ameth = ENGINE_get_pkey_asn1_meth_str(e, str, len);
- if (ameth)
- {
- /* Convert structural into
- * functional reference
- */
- if (!ENGINE_init(e))
- ameth = NULL;
- ENGINE_free(e);
- *pe = e;
- return ameth;
- }
+ /* Convert structural into
+ * functional reference
+ */
+ if (!ENGINE_init(e))
+ ameth = NULL;
+ ENGINE_free(e);
+ *pe = e;
+ return ameth;
}
#endif
*pe = NULL;
return 1;
}
+const EVP_PKEY_ASN1_METHOD* EVP_PKEY_get0_asn1(EVP_PKEY *pkey)
+ {
+ return pkey->ameth;
+ }
+
EVP_PKEY_ASN1_METHOD* EVP_PKEY_asn1_new(int id, int flags,
const char *pem_str, const char *info)
{