提交 9a1a5b87 编写于 作者: N Nils Larsch

avoid infinite recursion if dynamic engine isn't loaded

Submitted by: Jonathon Green <jonathon_au@yahoo.com>
上级 f3b656b2
......@@ -394,6 +394,9 @@ ENGINE *ENGINE_by_id(const char *id)
#else
/* EEK! Experimental code starts */
if(iterator) return iterator;
/* Prevent infinite recusrion if we're looking for the dynamic engine. */
if (strcmp(id, "dynamic"))
{
#ifdef OPENSSL_SYS_VMS
if((load_dir = getenv("OPENSSL_ENGINES")) == 0) load_dir = "SSLROOT:[ENGINES]";
#else
......@@ -407,6 +410,7 @@ ENGINE *ENGINE_by_id(const char *id)
!ENGINE_ctrl_cmd_string(iterator, "LOAD", NULL, 0))
goto notfound;
return iterator;
}
notfound:
ENGINEerr(ENGINE_F_ENGINE_BY_ID,ENGINE_R_NO_SUCH_ENGINE);
ERR_add_error_data(2, "id=", id);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册