On Tue, Oct 05, 2010, Harshvir Sidhu wrote:
> Hi All,
> I am trying to load capi engine, Here the the code snippet that i am
> trying to use.
>
> void InitEngine()
> {
> ENGINE *e = NULL;
> int ret = 0;
> const char *engine_id = "capi";
> ENGINE_load_builtin_engines();
> ENGINE_register_all_complete();
> e = ENGINE_by_id(engine_id);
> if(!e)
> return;
> if(!ENGINE_init(e)) {
> ENGINE_free(e);
> return;
> }
> if(!ENGINE_set_default_RSA(e))
> abort();
> ENGINE_set_default_DSA(e);
> ENGINE_set_default_ciphers(e);
> ENGINE_finish(e);
> ENGINE_free(e);
> }
>
> The code is failing at *e = ENGINE_by_id(engine_id);* and after this call *e
> has NULL* value in it. Anyone any idea about this? Thanks.
>
You need to install the ENGINE DLL in an appropriate place, where depends on
how you compiled OpenSSL. Alternatively compiling with enable-static-engine
will include all ENGINEs in libeay32.dll
If you are using Openssl 0.9.8 you also need enable-capi-engine as it is not
compiled in by default.
Steve.
--
Dr Stephen N. Henson. OpenSSL project core developer.
Commercial tech support now available see: http://www.openssl.org
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [email protected]
Automated List Manager [email protected]