Re: Evp_Encrypt_Init Segfault

2006-01-31 Thread Felix Dorner
Girish Venkatachalam wrote: Try calling EVP_CIPHER_CTX_cleanup(ctx) at the end... I have tried this, does not change the situation. gdb output is 200 EVP_EncryptInit(ctx, EVP_bf_ecb(), NULL, NULL); (gdb) step Program received signal SIGSEGV, Segmentation fault. 0xb7df82fb in

Re: Evp_Encrypt_Init Segfault

2006-01-31 Thread Alain Damiral
Have you tried with the EVP_EncryptInit_ex() family of functions ? I'm not sure it would help much but it could be worth a try Felix Dorner wrote: Girish Venkatachalam wrote: Try calling EVP_CIPHER_CTX_cleanup(ctx) at the end... I have tried this, does not change the

RE: Evp_Encrypt_Init Segfault

2006-01-31 Thread Mark
Hi, the following code executes once, and does fine. Calling the function a second time gives a segfault during the call marked by -- You may have inadvertantly corrupted the heap the first time your code is executed. I suggest you put several assert statements to ensure that memory

Re: Evp_Encrypt_Init Segfault

2006-01-31 Thread clarksom
I'm not much of an expert with any of this, but you may want to look at some of the return values of some of the functions to make sure everything is good, such as on EVP_EncryptFinal. Please take a look at some code I did up last summer in C++ (but it is almost all C), located at

Re: Evp_Encrypt_Init Segfault

2006-01-31 Thread Felix Dorner
I somehow corrupted the ctx object by overshooting the malloced area as Mark had pointed out. The problem is solved now, thanks, felix __ OpenSSL Project http://www.openssl.org User Support Mailing

Evp_Encrypt_Init Segfault

2006-01-30 Thread Felix Dorner
Hi, the following code executes once, and does fine. Calling the function a second time gives a segfault during the call marked by -- unsigned char *encrypt_message(unsigned char *message, int inl, int *outl) { EVP_CIPHER_CTX ctx; EVP_CIPHER_CTX_init(ctx);

Re: Evp_Encrypt_Init Segfault

2006-01-30 Thread Girish Venkatachalam
Try calling EVP_CIPHER_CTX_cleanup(ctx) at the end... --- Felix Dorner [EMAIL PROTECTED] wrote: Hi, the following code executes once, and does fine. Calling the function a second time gives a segfault during the call marked by -- unsigned char *encrypt_message(unsigned char *message,

Re: Evp_Encrypt_Init Segfault

2006-01-30 Thread Girish Venkatachalam
Try calling EVP_CIPHER_CTX_cleanup(ctx) at the end... --- Felix Dorner [EMAIL PROTECTED] wrote: Hi, the following code executes once, and does fine. Calling the function a second time gives a segfault during the call marked by -- unsigned char *encrypt_message(unsigned char *message,