apps/passwd.c: Make MD5 and SHA password making EBCDIC aware
authorRichard Levitte <levitte@openssl.org>
Wed, 23 Aug 2017 14:03:18 +0000 (16:03 +0200)
committerRichard Levitte <levitte@openssl.org>
Thu, 24 Aug 2017 21:46:44 +0000 (23:46 +0200)
commit0f3ffbd1581fad58095fedcc32b0da42a486b8b7
tree8255711bf1678783a9fd74e6b4db926b1f0dad73
parent17621bc2bc6605e7ef6317a6c9a1b1c04216b01a
apps/passwd.c: Make MD5 and SHA password making EBCDIC aware

This mimics the behaviour of DES_crypt, where the salt and password
are expected to be in EBCDIC when CHARSET_EBCDIC is defined, and are
converted internally to ASCII.  This is also done with the magic ID
string if it's not already ASCII.  The resulting output is entirely
built up of ASCII components and is converted back to EBCDIC at the
end.

Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/4229)
apps/passwd.c