>> 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?

Because a lot of distributions that have a lot of files include a
manifest file containing the format "filename\thash" and verifying
them against each other should be pretty standard.

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

I am suggesting that it isn't worthwhile because the well-known
alternatives are something of a de-facto standard, not because
openssl's version does it "wrong".

>> Regardless, this is a simple change, anda 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.

The only further change I, as an independent user, would expect from
here would be to see the = disappear and possibly the space to be
replaced with a tab. If "openssl md5" were intended for scripting use
(and clearly it is NOT intended for such) I wouldn't be surprised if a
further change were made later to make its output conform to md5sum,
for compatibility with those other tools rather than for compatibility
with existing scripts. (Because, as I said, it's fairly evident that
it isn't intended to be scripted against. The openssl command line
suite is clearly intended to be used primarily interactively.)

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

Reply via email to