Re: openssl commandline tools always output in text mode
On Sat, Jun 07, 2003 at 11:50:21AM +0200, Corinna Vinschen wrote: Since I was a bit bored a few minutes ago I started to run your test on Linux and guess what? The testit.out file had CRLF lineendings, too. Ups, I just gave it a try on FreeBSD and got the same results as well! Weird. Perhaps this is in aticipation of some format adaption for SMTP... So it's very likely related to your input data, nothing behaving different in the Cygwin version of OpenSSL. It seems, no matter what input data the smime tool gets, it always converts it CR LF. As long as this is consistent on all platforms, I'm fine with it. Thanks for your feedback, Patrick -- 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/
Re: openssl commandline tools always output in text mode
On Sat, Jun 07, 2003 at 11:50:21AM +0200, Corinna Vinschen wrote: > On Fri, Jun 06, 2003 at 09:19:12PM +0200, Patrick Eisenacher wrote: > > Please let me know whether you get the same result as I do and whether > > Yes, I do get the same result. > > > this helps identifying the culprit. > > Oh, you don't have to wait for me, you can debug this also very easily by > yourself. OpenSSL builds OOTB. Useing the util/cygwin.sh script from the > OpenSSL source dir and setting CFLAGS=-g in the make command will help. Since I was a bit bored a few minutes ago I started to run your test on Linux and guess what? The testit.out file had CRLF lineendings, too. So it's very likely related to your input data, nothing behaving different in the Cygwin version of OpenSSL. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Developermailto:[EMAIL PROTECTED] Red Hat, Inc. -- 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/
Re: openssl commandline tools always output in text mode
On Fri, Jun 06, 2003 at 09:19:12PM +0200, Patrick Eisenacher wrote: > Please let me know whether you get the same result as I do and whether Yes, I do get the same result. > this helps identifying the culprit. Oh, you don't have to wait for me, you can debug this also very easily by yourself. OpenSSL builds OOTB. Useing the util/cygwin.sh script from the OpenSSL source dir and setting CFLAGS=-g in the make command will help. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Developermailto:[EMAIL PROTECTED] Red Hat, Inc. -- 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/
Re: openssl commandline tools always output in text mode
Hi Corinna, On Fri, Jun 06, 2003 at 01:29:29PM +0200, Patrick Eisenacher wrote: Did you try the example I provided in my last posting? No, I don't have keys and that stuff to test with. What I did was, to examine the source code of OpenSSL. The OpenSSL tools do open input files generally in binary mode while writing sometimes in binary mode, sometimes in the "don't care" mode. If your input file contains CRLFs, the output file might contain them untranslated. Is that possible here? Are your input files "infected" with CRLFs? Nope. But I attached you a key, cert and testmail with which you should be able to reproduce the problem. The command is: $ openssl smime -decrypt -in testmail.corinna.plain.encrypted -recip corinna.crt -inkey corinna.key -out testit.out $ cat -A testit.out Content-Type: text/plain; charset=us-ascii; format=flowed^M$ Content-Transfer-Encoding: 7bit^M$ ^M$ test plain^M$ ^M$ $ od -c testit.out 000 C o n t e n t - T y p e : t e 020 x t / p l a i n ; c h a r s e 040 t = u s - a s c i i ; f o r m 060 a t = f l o w e d \r \n C o n t e 100 n t - T r a n s f e r - E n c o 120 d i n g : 7 b i t \r \n \r \n t e 140 s t p l a i n \r \n \r \n 154 Please let me know whether you get the same result as I do and whether this helps identifying the culprit. Thanks, Patrick testcase.tar.gz Description: GNU Zip compressed data -- 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/
openssl commandline tools always output in text mode
Heyho, openssl's commandline tools always output in text mode, no matter what your mount type is, be it binary or text. Is this a bug or a feature? ;o) I wonder whether I can convince openssl to generate its output according to my mount type, which is binary for me. Currently I postprocess openssl's output with a small perl filter to get rid of the superfluous CRs. But this is suboptimal, as I have to remove this filter once I want to run my scripts on a real unix OS. Can anybody help? $ openssl smime -decrypt -in msg.body -recip recipient.crt -inkey recipient.key -out testit.out $ cat -A testit.out Content-Type: text/plain; charset=us-ascii; format=flowed^M$ Content-Transfer-Encoding: 7bit^M$ ^M$ test decryption^M$ ^M$ $ openssl version OpenSSL 0.9.7b 10 Apr 2003 Thanks, Patrick -- 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/
Re: openssl commandline tools always output in text mode
On Fri, Jun 06, 2003 at 01:29:29PM +0200, Patrick Eisenacher wrote: > Hello Corinna, > > attached you find the output of cygcheck. Nothing enlightening, unfortunately. > Did you try the example I provided in my last posting? No, I don't have keys and that stuff to test with. What I did was, to examine the source code of OpenSSL. The OpenSSL tools do open input files generally in binary mode while writing sometimes in binary mode, sometimes in the "don't care" mode. If your input file contains CRLFs, the output file might contain them untranslated. Is that possible here? Are your input files "infected" with CRLFs? Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Developermailto:[EMAIL PROTECTED] Red Hat, Inc. -- 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/
Re: openssl commandline tools always output in text mode
Hello Corinna, attached you find the output of cygcheck. Your example also works for me. So I should rephrase my statement, that all openssl commandline tools output in text mode to openssl's smime commandline tool outputs in text mode. Perhaps others as well... Did you try the example I provided in my last posting? Patrick On Thu, Jun 05, 2003 at 10:40:35PM +0200, Patrick Eisenacher wrote: Heyho, openssl's commandline tools always output in text mode, no matter what your mount type is, be it binary or text. Is this a bug or a feature? ;o) Weird. It works for me: [snip] Since openssl doesn't use any of the env variables TMP, TEMP, TMPDIR (which was a problem in patch(1) once), I don't know what's going on on your system. Please send a cygcheck output according to http://cygwin.com/bugs.html. Perhaps this gives a clue. Corinna Cygwin Win95/NT Configuration Diagnostics Current System Time: Fri Jun 06 13:15:14 2003 Windows 2000 Professional Ver 5.0 Build 2195 Service Pack 3 Path: D:\Cygwin\usr\local\bin D:\Cygwin\bin D:\Cygwin\bin c:\WINNT\system32 c:\WINNT c:\WINNT\system32\WBEM d:\Tcl\bin c:\PROGRAMME\THINKPAD\UTILITIES d:\ULTRAE~1 d:\network associates\PGPcmdln D:\Cygwin\bin d:\WinCvs d:\Doxygen\bin e:\fillmore-labs\Entwicklung\Prototype\TestSystem\Server d:\Microsoft Visual Studio\Common\Tools\WinNT d:\Microsoft Visual Studio\Common\MSDev98\Bin d:\Microsoft Visual Studio\Common\Tools d:\Microsoft Visual Studio\VC98\bin d:\Ant\bin C:\Dokumente und Einstellungen\eisenacher\bin D:\Cygwin\bin\id.exe output (nontsec) UID: 1000(eisenacher) GID: 544(Administratoren) 513(Kein) 544(Administratoren) 545(Benutzer) D:\Cygwin\bin\id.exe output (ntsec) UID: 1000(eisenacher) GID: 544(Administratoren) 513(Kein) 544(Administratoren) 545(Benutzer) SysDir: C:\WINNT\System32 WinDir: C:\WINNT CYGWIN = `ntsec tty binmode' HOME = `C:\Dokumente und Einstellungen\eisenacher' MAKE_MODE = `unix' PWD = `/home/eisenacher' USER = `eisenacher' ALLUSERSPROFILE = `C:\Dokumente und Einstellungen\All Users' APACHE_HOME = `D:\Apache Group\Apache2' APPDATA = `C:\Dokumente und Einstellungen\eisenacher\Anwendungsdaten' CATALINA_HOME = `D:\Tomcat-4.1.18' CLASSPATH = `E:\fillmore-labs\Entwicklung\Prototype\TestSystem\Server\server.jar;E:\fillmore-labs\Entwicklung\Prototype\TestSystem\Server\xmlrpc.jar' COMMONPROGRAMFILES = `C:\Programme\Gemeinsame Dateien' COMPUTERNAME = `NB-RASTA' COMSPEC = `C:\WINNT\system32\cmd.exe' CVSROOT = `:ext:[EMAIL PROTECTED]:/cvsroot' CVS_RSH = `D:/Cygwin/bin/ssh.exe' HOMEDRIVE = `C:' HOMEPATH = `\Dokumente und Einstellungen\eisenacher\Anwendungsdaten' INCLUDE = `D:\Microsoft Visual Studio\VC98\atl\include;D:\Microsoft Visual Studio\VC98\mfc\include;D:\Microsoft Visual Studio\VC98\include' JAVA_HOME = `D:\Java' LIB = `D:\Microsoft Visual Studio\VC98\mfc\lib;D:\Microsoft Visual Studio\VC98\lib' LOGONSERVER = `\\NB-RASTA' MANPATH = `:/usr/ssl/man' MSDEVDIR = `D:\Microsoft Visual Studio\Common\MSDev98' NUMBER_OF_PROCESSORS = `1' OLDPWD = `/usr/bin' OS2LIBPATH = `C:\WINNT\system32\os2\dll;' OS = `Windows_NT' PATHEXT = `.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.tcl' PAYMENT_HOST_CGI_BIN = `D:\Apache Group\Apache2\cgi-bin' PERLIO = `perlio' PGDATA = `/usr/local/etc/service_provider' PROCESSOR_ARCHITECTURE = `x86' PROCESSOR_IDENTIFIER = `x86 Family 6 Model 11 Stepping 1, GenuineIntel' PROCESSOR_LEVEL = `6' PROCESSOR_REVISION = `0b01' PROGRAMFILES = `C:\Programme' PROMPT = `$P$G' PS1 = `\[\033]0;\w\007 [EMAIL PROTECTED] \[\033[33m\w\033[0m\] $ ' SECUDE_ERROR_TRCFILE = `C:\Dokumente und Einstellungen\eisenacher\Desktop\error.log' SECUDE_ERROR_TRCLEVEL = `2' SGML_CATALOG_FILES = `/usr/local/lib/xml/dtd/docbook42/docbook.cat' SHLVL = `1' SSH_AGENT_PID = `1652' SSH_AUTH_SOCK = `/tmp/ssh-RchU1660/agent.1660' SYSTEMDRIVE = `C:' SYSTEMROOT = `C:\WINNT' TEMP = `e:\TEMP' TERM = `cygwin' TMP = `e:\TEMP' USERDOMAIN = `NB-RASTA' USERNAME = `eisenacher' USERPROFILE = `C:\Dokumente und Einstellungen\eisenacher' WINDIR = `C:\WINNT' _ = `/usr/bin/cygcheck' HKEY_CURRENT_USER\Software\Cygnus Solutions HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2 (default) = `/cygdrive' cygdrive flags = 0x0022 HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\Program Options HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0 HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\00 (default) = `\\.\tape1:' unix = `/dev/st1' fbinary = 0x fsilent = 0x0001 HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\01 (default) = `\\.\tape0:' unix = `/dev/st0' fbinary = 0
Re: openssl commandline tools always output in text mode
On Thu, Jun 05, 2003 at 10:40:35PM +0200, Patrick Eisenacher wrote: > Heyho, > > openssl's commandline tools always output in text mode, no matter what > your mount type is, be it binary or text. > > Is this a bug or a feature? ;o) Weird. It works for me: $ openssl version OpenSSL 0.9.7b 10 Apr 2003 $ cat > foo0