_____  

From: owner-openssl-us...@openssl.org
[mailto:owner-openssl-us...@openssl.org] On Behalf Of Salz, Rich
Sent: Friday, 24 May, 2013 14:05
To: openssl-users@openssl.org
Subject: RE: Pipe command not working



Windows doesn't do pipes; you have to use temp files.

Not true. IIRC the original MSDOS-based Windows (3.1, 95, 98) didn't, 

but all "NT" series Windows do. I use Windows pipes all the time -- 

including for the sort of openssl commandline operations OP posted.

 

One thing to watch out for, though, with C programs (including openssl):

Standard/portable C makes a distinction between "text" and "binary" files.

On Unix this distinction is erased; all files -- and all pipes -- are the
same.

On Windows however text files are written with C's "newline" \n converted 

to two bytes CR LF, and back to \n when reading; binary files are not.

Mostly when accessing actual files -- even temporary ones -- programs 

get this right, but IME less often for pipes. And even though changing NL 

to CR LF generally has no effect on a person looking at the words and 

sentences in a text file, it has a catastrophic effect on hashing which 

by design is sensitive to any change at all even one bit.

 

For piping one commandline openssl to another, using (as I do) the 

ShiningLight build and thus the "visual c++" runtime, it has worked,

but for arbitrary mixtures of other Windows programs I have had issues.

 

One possibility: OP did say "in openssl" which is to me kind of ambiguous.

If you run commandline *interactive*, it doesn't do pipes, on any OS:

 

bash@myhost $ /path/to/openssl

OpenSSL> x509 -in somefile | md5

unknown option |

<usage summary>

OpenSSL>

 

C:\somedir> \path\to\openssl

OpenSSL> x509 -in somefile | md5

unknown option |

<usage summary>

OpenSSL>

 

 

Reply via email to