Re: nginx start and stop has issue for openssl engine

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I am using openssl engine with nginx.
openssl: OpenSSL_1_1_1f

If the engine does not include rsa, everythings works well

If the engine retister rsa, even the empty
IMPLEMENT_DYNAMIC_BIND_FN(bind_fn)
bind_fn
ENGINE_set_destroy_function(e, destroy_fn);
ENGINE_set_RSA(e, RSA_meth_new("rsa method", 0));

destroy_fn will NOT be called in nginx start and nginx -s quit.

Have some debug
If has rsa, engine_free_util e->struct_ref > 0, so not call e->destroy(e).

engine_table_select
    fnd = lh_ENGINE_PILE_retrieve(&(*table)->piles, &tmplate);
    if (!fnd)
        goto end;
    if (fnd->funct && engine_unlocked_init(fnd->funct)) {

If no rsa, engine_table_select funciton goto end.
If rsa, engine_table_select call engine_unlocked_init, ref++, for two times.
So at last,  e->destroy(e will not be called in engine_free_util.

Has anyone seen this issue?

Thanks



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux