Re: weird bug

2013-08-16 Thread Ken Goldman
On 8/16/2013 1:51 PM, Ztatik Light wrote: found yet another weird peculiarity... In my full application, i need the following lines after both encrypt_file() and decrypt_read(), otherwise i get garbage data: char err[1024]; ERR_error_string( ERR_get_error(), err ); printf( "%s\n", err ); And e

RE: weird bug

2013-08-16 Thread Salz, Rich
Ø I have no idea wtf is up with all these bugs but i'm surprised openssl is this glitchy It is not. The problem is almost definitely in your code. It is also hard to help when the code you post isn't the code you're trying to debug. Get and run valgrind and see what it says. Compile with ma

Re: weird bug

2013-08-16 Thread Ztatik Light
found yet another weird peculiarity... In my full application, i need the following lines after both encrypt_file() and decrypt_read(), otherwise i get garbage data: char err[1024]; ERR_error_string( ERR_get_error(), err ); printf( "%s\n", err ); And err is 0... but without those three lines the

RE: weird bug

2013-08-16 Thread Salz, Rich
Ø Seriously - if i just use des instead of des_ede3 in works. that simple. has got to be a bug Run your code through something like valgrind -- Principal Security Engineer Akamai Technology Cambridge, MA

Re: weird bug

2013-08-16 Thread Ztatik Light
yes, i fixed that.. it's not causing the problem.. Seriously - if i just use des instead of des_ede3 in works. that simple. has got to be a bug On Fri, Aug 16, 2013 at 10:49 AM, Salz, Rich wrote: > **Ø **Some serious bug? > > ** ** > > Yes, but in your code: > > **Ø **char new_filena

RE: weird bug

2013-08-16 Thread Salz, Rich
Ø Some serious bug? Yes, but in your code: Ø char new_filename[strlen( filename + 5 )]; char new_filename[strlen( filename) + 5]; -- Principal Security Engineer Akamai Technology Cambridge, MA

Re: weird bug

2013-08-16 Thread Ztatik Light
If I simply replace "EVP_des_ede3_cbc" with "EVP_des_cbc" ... then it works okay Some serious bug? On Fri, Aug 16, 2013 at 10:17 AM, Ztatik Light wrote: > same result - did you actually try it? > > BIO_read is producing this error: > > "error:06065064:digital envelope routines:EVP_DecryptFinal_

Re: weird bug

2013-08-16 Thread Ztatik Light
same result - did you actually try it? BIO_read is producing this error: "error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt" On Fri, Aug 16, 2013 at 3:28 AM, Ben Laurie wrote: > Try > > write_data( file_, data, strlen(data) + 1, "mykey"); > > > > On 16 August 2013 03:34

Re: weird bug

2013-08-16 Thread Ben Laurie
Try write_data( file_, data, strlen(data) + 1, "mykey"); On 16 August 2013 03:34, Ztatik Light wrote: > ps, yes, line 29 is a mistake and should read: char new_filename[strlen( > filename ) + 5]; > > But even with that fix i get the same results > > > On Fri, Aug 16, 2013 at 2:27 AM, Ztatik L

weird bug

2013-08-16 Thread Ztatik Light
So, I'm having a really weird issue... i'm trying simple file encryption/decryption with BIO_*, but if the encrypted file is in a subdirectory.. i get garbage data, I'll post the code i'm using, with a brief elaboration on how i'm using it and what behaviour i'm getting: /

Re: weird bug

2013-08-16 Thread Ztatik Light
ps, yes, line 29 is a mistake and should read: char new_filename[strlen( filename ) + 5]; But even with that fix i get the same results On Fri, Aug 16, 2013 at 2:27 AM, Ztatik Light wrote: > maybe not - still confused > > > On Fri, Aug 16, 2013 at 2:21 AM, Ztatik Light wrote: > >> strange i thi

Re: weird bug

2013-08-16 Thread Ztatik Light
maybe not - still confused On Fri, Aug 16, 2013 at 2:21 AM, Ztatik Light wrote: > strange i think it has something to do with me using "rb" and "wb" instead > of "r" and "w"... > > > On Fri, Aug 16, 2013 at 2:14 AM, Ztatik Light wrote: > >> So, I'm having a really weird issue... i'm trying simpl

Re: weird bug

2013-08-16 Thread Ztatik Light
strange i think it has something to do with me using "rb" and "wb" instead of "r" and "w"... On Fri, Aug 16, 2013 at 2:14 AM, Ztatik Light wrote: > So, I'm having a really weird issue... i'm trying simple file > encryption/decryption with BIO_*, but if the encrypted file is in a > subdirectory..