Geoff Thorpe wrote:
> 
> On Tue, 31 Oct 2000, Libor Krystek wrote:
> 
> > I'am creating new engine for other hardware. This hardware must be
> > initialized before using but for its initialization I need input some
> > parameters (e.g. hostname, username, password).
> > Function ENGINE_init(ENGINE *e) call engine function init() and it have
> > no input parameters.
> > How can I do it? Do you have any conception?
> 
> ENGINE_ctrl();
> 
> make your "init()" handler fail (setting an explanatory error) unless
> ENGINE_ctrl() has already been called to pass in everything you need.
> 
> ENGINE_init() is used to get a "functional" reference, not just a
> "structural" one. Eg. ENGINE_by_id() returns only a structural reference -
> so using that you can call ENGINE_ctrl() to initialise whatever you need.
> It is only when a structural reference is required that the ENGINE's
> "init" handler will be called to try and make the ENGINE actually get
> ready to work. This typically happens by calling ENGINE_init() directly,
> or something implicit like "ENGINE_set_default()" that requires the ENGINE
> be "working". For structural references, the ENGINE's own functions are
> never called - that's so that you can still look around the various
> ENGINEs available even though many of them won't be supported on your host
> system (because of lack of drivers, vendor libraries, etc).
> 
> Does that answer your question?

Leaves me with one - if specific engines have to be initialised "by
hand", then we haven't got much in the way of abstraction, have we? Is
there a better way? Config files? External programs?

Cheers,

Ben.

--
http://www.apache-ssl.org/ben.html

"There is no limit to what a man can do or how far he can go if he
doesn't mind who gets the credit."

Robert Woodruff
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to