On Mon, Aug 26, 2013 at 02:45:10PM +0200, Stephen Henson via RT wrote: > > What is happening is related to how ENGINE works with dynamically loaded > engines in different contexts. > > If you do ENGINE_by_id("foo") it will first look for an engine called "foo" in > the list of engines and if present return a reference to that. > > If "foo" is not present in the list it will then attempt to load a shared > library engine for "foo". If it succeeds a reference is returned for the > loaded > engine. The new engine is NOT added to the list. It's this "unlisted" case > that > causes problems with the gost engine. > > If a second attempt is made to load "foo" then the code in the gost engine > prevents this: its use of static variables means it isn't safe to load it more > than once. There is AFAICS currently no way to just return a reference to the > unlisted engine which was loaded before. > > The behaviour in the config file reflects this. If you just specify the engine > id "gost" you get the dynamic load and unlisted engine behaviour. Then using > "gost" on the command line tries to load it twice and you get an error. > > If you use "dynamic_path" the engine is loaded *and* added. Then subsequent > attempts to use that engine work because it isn't loaded again: you just get > the existing listed reference. > > The behaviour makes sense but it is not ideal. AFAICS the only way to handle > this cleanly is to avoid the "unlisted" case and always add the engine to the > list. Perhaps a new flag could be added to cover this.
So as I understand it, you can only make this work with dynamic_path and not with engine_id. But only with engine_id will it look in the ENGINESDIR set at build time, and that seems to be the only way I can trigger it looking in that dir without complaining that it got loaded twice. I do now want to add the full path in the config file. Is there a way to make it look in ENGINESDIR and use "dynamic_path=gost"? Kurt ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List openssl-dev@openssl.org Automated List Manager majord...@openssl.org