ENGINE_load_sb()

Load the Security Builder Engine for OpenSSL.

Synopsis:

#include <sbengine/sbengine.h>
 
int ENGINE_load_sb(unsigned int flags)

Since:

BlackBerry 10.0.0

Arguments:

flags

Identifies which methods should be configured as default for OpenSSL.

Library:

libloadsbengine (For the qcc command, use the -l loadsbengine option to link against this library)

Description:

You can call ENGINE_load_sb() to use the OpenSSL dynamic ENGINE to load and register the Security Builder ENGINE.

For the flags parameter, you can specify any combination of the following flags defined in openssl/engine.h:

  • ENGINE_METHOD_RSA
  • ENGINE_METHOD_DSA
  • ENGINE_METHOD_DH
  • ENGINE_METHOD_RAND
  • ENGINE_METHOD_ECDH
  • ENGINE_METHOD_ECDSA
  • ENGINE_METHOD_CIPHERS
  • ENGINE_METHOD_DIGESTS
  • ENGINE_METHOD_PKEY_METHS
  • ENGINE_METHOD_PKEY_ASN1_METHS
  • ENGINE_METHOD_ALL
  • ENGINE_METHOD_NONE

ENGINE_load_sb() implements the following steps:

1.) It obtains an ENGINE instance of the OpenSSL dynamic ENGINE:

e = ENGINE_by_id("dynamic");

2.) It uses the SO_PATH and LOAD ctrl options of the dynamic ENGINE to load the Security Builder ENGINE shared library:

ENGINE_ctrl_cmd_string(e, "SO_PATH", SBENGINE_ID, 0);

ENGINE_ctrl_cmd_string(e, "LOAD", NULL, 0);

3.) It obtains an ENGINE instance of the Security Builder ENGINE:

e = ENGINE_by_id(SBENGINE_ID);

4.) It adds the Security Builder ENGINE shared library into OpenSSL's list of ENGINEs:

ENGINE_add(e);

5.) It sets the Security Builder ENGINE as default for all methods identified by the flags parameter:

ENGINE_set_default(e, flags);

Returns:

1 on success, 0 otherwise.

Last modified: 2014-05-14



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus