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.

// Harshvir

Reply via email to