On Mon, Jul 18, 2011 at 4:05 PM, Coda Highland <chighl...@gmail.com> wrote:
> On Mon, Jul 18, 2011 at 2:41 PM, Patrick Donnelly <batr...@batbytes.com> 
> wrote:
>> Why does this command prepend useless redundant information?
>>
>> $ openssl md5 <(echo foo)
>> MD5(/dev/fd/63)= d3b07384d113edec49eaa6238ad5ff00
>
> --snip--
>
>> Thank you *so* much. I would have framed this email more politely but
>> you have successfully punted compatibility detection onto third party
>> developers. There is no way for you to fix it.
>
> I'm not an OpenSSL developer, but I can field this one because the
> answer is fairly obvious.
>
> To answer your initial question, consider the case of "$ openssl md5
> *.txt", where each line needs to have that information. The new format
> makes the output consistent regardless of manner of implementation,
> which from a future-proofing standpoint makes more sense than changing
> the output depending on the precise manner of input.

Are you seriously suggesting that parsing the md5sums of multiple
files from the output of "openssl md5 *.txt" is a sensible use case?
Why on earth would you not call "openssl md5" for each individual
file?

> My question is why you're depending on the output format of "openssl
> md5" in the first place. md5sum is almost as commonly available and is
> much more amenable to shell scripting, and if you're not doing shell
> scripting the output is irrelevant because you could be using OpenSSL
> as a library.

Because I'm relying on other features of openssl. It makes sense to
use the entire library of commands from one dependency instead of
using commands from multiple dependencies (md5sum and openssl).

Are you suggesting that "openssl md5" is not worthwhile using because
well-known alternatives exist that actually don't clutter the output
with garbage?

> Regardless, this is a simple change, and a simple awk or sed script
> will solve the problem while retaining compatibility with older
> versions. Perhaps:
>
> openssl md5 < blah | sed "s/^.*= *//"
>
> will serve. (This says, "if the line starts with an arbitrary number
> of characters, followed by an equals sign, followed by zero or more
> whitespace, remove that.")

I shouldn't have to do this to begin with. Also, if the current
compatibility breakage trend continues, I'm sure that won't work in a
year or two.

-- 
- Patrick Donnelly
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       openssl-dev@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to