Greetings! On Tue, Sep 27, 2011 at 12:53 AM, Roumen Petrov <open...@roumenpetrov.info> wrote: > Dmitry Belyavsky wrote: >> >> Greetings! >> >> On Thu, Sep 22, 2011 at 3:00 AM, Roumen Petrov >> <open...@roumenpetrov.info> wrote: > > [SNIP] >>> >>> What is result if register_XXXX_gost methotds are moved from bind to init >>> ? >> >> Double-free occurs too. >> The >> >> openssl speed -engine gost -evp gost89 >> is successful, >> >> but the >> >> openssl engine gost >> >> fails with the same diagnostics. BTW it seems to be a bug in engine >> command, because when I use the DSO object to protect double-load, the >> speed command reports "can't use that engine" (./apps/apps.c line >> 1492) and the engine command does not. >> > > Hmm, I can not reproduce crash . Both command pass in my 64 bit env. : > OpenSSL 1.0.0e 6 Sep 2011 > built on: Thu Sep 8 01:45:55 EEST 2011 > options:bn(64,64) rc4(8x,int) des(idx,cisc,16,int) aes(partial) idea(int) > blowfish(idx) > compiler: gcc -fPIC -DOPENSSL_PIC -DZLIB_SHARED -DZLIB -DOPENSSL_THREADS > -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -Wa,--noexecstack > -fno-strict-aliasing -m64 -DL_ENDIAN -DTERMIO -O3 -Wall -DMD32_REG_T=int > -DOPENSSL_EXPERIMENTAL_JPAKE -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT > -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DWHIRLPOOL_ASM > > Why gost engine in bind method check for "if (id && strcmp(id, > engine_gost_id)) return 0;" ? Plase could you compare with capi engine > function bind_helper() . > > Off topic: destroy function may call ERR_unload_GOST_strings . > > I could not found more reasons. > My tests show that ENGINE_get_ex_new_index will crash engine if is called > from bind or if free callback is passed. This function is not called by gost > engine so out of scope. > > Roumen
cmdline is: OPENSSL_CONF=./apps/openssl.cnf OPENSSL_ENGINES=./engines/ccgost/ \ LD_LIBRARY_PATH=. ./apps/openssl engine -vvvv gost openssl.cnf is ======= openssl_conf = openssl_def [openssl_def] engines = engine_section [engine_section] gost = gost_section [gost_section] engine_id = gost #dynamic_path = /home/beldmit/crypto/openssl-1.0.0d-new/engines/ccgost/libgost.so default_algorithms = ALL ========= Thank you! -- SY, Dmitry Belyavsky ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List openssl-dev@openssl.org Automated List Manager majord...@openssl.org