Greetings!!! We have developed an engine with our own AES implementation.(PFA engine file - sw_cryptodev.c). This was a modification of the hw_cryptodev.c engine file provided with the openssl source code. The engine is getting loaded, keys are getting initialized and even encryption/decryption is done correctly.We tried this with file encryption. But after the decryption a segmentation fault occurs. While debugging we found that after it returns from our decryption routing the following happens: apps/enc.c Line number 593 if (in != NULL) BIO_free(in); crypto/bio/bio_lib.c within BIO_free method it calls file_free crypto/bio/bss_file.c within the file_free the segmentation fault occurs We tried commenting out the BIO_free calls in apps/enc.c. But then the segmentation fault shifted to the following flow apps/enc.c apps_shutdown(); crypto/ex_data.c static void int_cleanup(void) { EX_DATA_CHECK(return;) // lh_doall(ex_data, def_cleanup_cb); --> internally calls def_cleanup_cb which seg faults. // lh_free(ex_data); ex_data = NULL; impl = NULL; } We commented out the two lines as shown above and the code now works fine. After all this we tried using the openvpn (open source VPN solution) which uses openssl.But the application also shows a segmentation fault which was not shown with the original openssl. We feel that the problem should be in our engine code. Please help us in this matter. Thanks in advance
__________________________________________________________ Enjoy this Diwali with Y! India Click here http://in.promos.yahoo.com/fabmall/index.html
sw_cryptodev.c
Description: pat1251177750