#define NURON_R_NOT_LOADED 107
#define NURON_R_DSO_FAILURE 108
#define NURON_R_CTRL_COMMAND_NOT_IMPLEMENTED 109
-#define NURON_R_NOT_LOADED 110
static ERR_STRING_DATA nuron_str_functs[] =
{
/* This first element is changed to match the dynamic 'lib' number */
ERR_load_strings(nuron_err_lib, nuron_str_functs);
}
}
+static void nuron_unload_error_strings(void)
+ {
+ if(nuron_err_lib >= 0)
+ {
+ ERR_unload_strings(nuron_err_lib, nuron_str_functs);
+ nuron_err_lib = -1;
+ }
+ }
#else
-#define NURONerr(f,r) /* NOP */
-static void nuron_load_error_strings(void) { } /* NOP */
+#define NURONerr(f,r) /* NOP */
+static void nuron_load_error_strings(void) { } /* NOP */
+static void nuron_unload_error_strings(void) { } /* NOP */
#endif
typedef int tfnModExp(BIGNUM *r,const BIGNUM *a,const BIGNUM *p,const BIGNUM *m);
static DSO *pvDSOHandle = NULL;
+static int nuron_destroy(ENGINE *e)
+ {
+ nuron_unload_error_strings();
+ return 1;
+ }
+
static int nuron_init(ENGINE *e)
{
if(pvDSOHandle != NULL)
!ENGINE_set_DH(e, &nuron_dh) ||
#endif
!ENGINE_set_BN_mod_exp(e, nuron_mod_exp) ||
+ !ENGINE_set_destroy_function(e, nuron_destroy) ||
!ENGINE_set_init_function(e, nuron_init) ||
!ENGINE_set_finish_function(e, nuron_finish) ||
!ENGINE_set_ctrl_function(e, nuron_ctrl) ||