diff options
author | GaƩtan Njinang <gaetan.njinang@gmail.com> | 2017-01-20 06:37:43 +0100 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2017-01-21 10:44:23 -0500 |
commit | 037f2c3f48fadfae58dcb1d496841a6b38c0e6a0 (patch) | |
tree | f64526139dc0166b9c33b259efcfc1c029775eec /test/recipes | |
parent | 8a05c4d3b5a1bfb9193ea24e71735e11de7168d2 (diff) |
'openssl passwd' command can now compute AIX MD5-based passwords hashes.
The difference between the AIX MD5 password algorithm and the standard MD5
password algorithm is that in AIX there is no magic string while in the
standard MD5 password algorithm the magic string is "$1$"
Documentation of '-aixmd5' option of 'openssl passwd' command is added.
1 test is added in test/recipes/20-test-passwd.t
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2251)
Diffstat (limited to 'test/recipes')
-rw-r--r-- | test/recipes/20-test_passwd.t | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/recipes/20-test_passwd.t b/test/recipes/20-test_passwd.t index 5b69f88a49..32aa7a3171 100644 --- a/test/recipes/20-test_passwd.t +++ b/test/recipes/20-test_passwd.t @@ -76,7 +76,7 @@ my @sha_tests = expected => '$6$rounds=1000$roundstoolow$kUMsbe306n21p9R.FRkW3IGn.S9NPN0x50YhH1xhLsPuWGsUSklZt58jaTfF4ZEQpyUNGc0dqbpBYYBaHHrsX.' } ); -plan tests => (disabled("des") ? 8 : 10) + scalar @sha_tests; +plan tests => (disabled("des") ? 9 : 11) + scalar @sha_tests; ok(compare1stline_re([qw{openssl passwd password}], '^.{13}\R$'), @@ -96,6 +96,8 @@ ok(compare1stline([qw{openssl passwd -salt xxxxxxxx -1 password}], '$1$xxxxxxxx$ 'BSD style MD5 password with salt xxxxxxxx'); ok(compare1stline([qw{openssl passwd -salt xxxxxxxx -apr1 password}], '$apr1$xxxxxxxx$dxHfLAsjHkDRmG83UXe8K0'), 'Apache style MD5 password with salt xxxxxxxx'); +ok(compare1stline([qw{openssl passwd -salt xxxxxxxx -aixmd5 password}], 'xxxxxxxx$8Oaipk/GPKhC64w/YVeFD/'), + 'AIX style MD5 password with salt xxxxxxxx'); ok(compare1stline([qw{openssl passwd -salt xxxxxxxxxxxxxxxx -5 password}], '$5$xxxxxxxxxxxxxxxx$fHytsM.wVD..zPN/h3i40WJRggt/1f73XkAC/gkelkB'), 'SHA256 password with salt xxxxxxxxxxxxxxxx'); ok(compare1stline([qw{openssl passwd -salt xxxxxxxxxxxxxxxx -6 password}], '$6$xxxxxxxxxxxxxxxx$VjGUrXBG6/8yW0f6ikBJVOb/lK/Tm9LxHJmFfwMvT7cpk64N9BW7ZQhNeMXAYFbOJ6HDG7wb0QpxJyYQn0rh81'), |