delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/09/25/21:32:14

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Authentication-Warning: csd.cs.technion.ac.il: emild owned process doing -bs
Date: Sun, 26 Sep 2004 02:26:11 +0200 (IST)
From: Kohn Emil Dan <emild AT cs DOT Technion DOT AC DOT IL>
To: cygwin AT cygwin DOT com
Subject: openssl on cygwin bug and patch
Message-ID: <Pine.GSO.4.56.0409260224130.28442@csd.cs.technion.ac.il>
MIME-Version: 1.0

---559023410-851401618-1096157552=:28442
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII


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
---559023410-851401618-1096157552=:28442
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII; NAME="openssl_cygwin.patch"
Content-Transfer-Encoding: BASE64
Content-Description: 
Content-Disposition: ATTACHMENT; FILENAME="openssl_cygwin.patch"

ZGlmZiAtdSAtciAtdyBvcGVuc3NsLTAuOS43ZC9jcnlwdG8vYmlvL2Jzc19m
aWxlLmMgb3BlbnNzbC0wLjkuN2Qud29yay9jcnlwdG8vYmlvL2Jzc19maWxl
LmMNCi0tLSBvcGVuc3NsLTAuOS43ZC9jcnlwdG8vYmlvL2Jzc19maWxlLmMJ
MjAwMy0xMi0yNyAxNjo0MDo1MC4wMDAwMDAwMDAgKzAyMDANCisrKyBvcGVu
c3NsLTAuOS43ZC53b3JrL2NyeXB0by9iaW8vYnNzX2ZpbGUuYwkyMDA0LTA5
LTI2IDAxOjI5OjU0LjAwMDAwMDAwMCArMDIwMA0KQEAgLTI2NCw3ICsyNjQs
NyBAQA0KIAkJCXJldD0wOw0KIAkJCWJyZWFrOw0KIAkJCX0NCi0jaWYgZGVm
aW5lZChPUEVOU1NMX1NZU19NU0RPUykgfHwgZGVmaW5lZChPUEVOU1NMX1NZ
U19XSU5ET1dTKSB8fCBkZWZpbmVkKE9QRU5TU0xfU1lTX09TMikNCisjaWYg
ZGVmaW5lZChPUEVOU1NMX1NZU19NU0RPUykgfHwgZGVmaW5lZChPUEVOU1NM
X1NZU19XSU5ET1dTKSB8fCBkZWZpbmVkKE9QRU5TU0xfU1lTX09TMikgfHwg
ZGVmaW5lZChPUEVOU1NMX1NZU05BTUVfQ1lHV0lOMzIpDQogCQlpZiAoIShu
dW0gJiBCSU9fRlBfVEVYVCkpDQogCQkJc3RyY2F0KHAsImIiKTsNCiAJCWVs
c2UNCg==


---559023410-851401618-1096157552=:28442
Content-Type: text/plain; charset=us-ascii

--
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/
---559023410-851401618-1096157552=:28442--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019