This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

openssl on cygwin bug and patch


Hi all,

I have encountered a problem when using openssl to encrypt binary files
on cygwin.

Here is how to reproduce the problem:

1) When you install cygwin, make sure that the format for text files is
set to DOS
2) Encrypt a binary file (e.g. a .zip file, let's call it file.zip):

openssl enc -bf -in file.zip -out file.zip.enc
(give the password when prompted)

3) Decrypt the file:

openssl enc -bf -d -in file.zip.enc -out file.dec.zip
(give the password when prompted)

4) Compare the original and the decrypted files:
cmp -l file.zip file.dec.zip

You will notice that the files are different.

The problem is caused by the fact that openssl does not use the binary
flag for fopen(). The attached patch attempts to fix the problem.

							Regards,

								Emil

Attachment: openssl_cygwin.patch
Description: Text document

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]