diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 16:35:33 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 16:35:33 +0000 |
commit | 1f641814b2bfbbf2dc3347e11a3fe901bfdf1efc (patch) | |
tree | 77094b19bf9091ceb6f6ab7d0267f70fef9c8323 /debian/tests/sha2-contrib | |
parent | Adding upstream version 2.5.13+dfsg. (diff) | |
download | openldap-1f641814b2bfbbf2dc3347e11a3fe901bfdf1efc.tar.xz openldap-1f641814b2bfbbf2dc3347e11a3fe901bfdf1efc.zip |
Adding debian version 2.5.13+dfsg-5.debian/2.5.13+dfsg-5debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-x | debian/tests/sha2-contrib | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/debian/tests/sha2-contrib b/debian/tests/sha2-contrib new file mode 100755 index 0000000..32f7637 --- /dev/null +++ b/debian/tests/sha2-contrib @@ -0,0 +1,16 @@ +#!/bin/bash + +set -e + +reference_hash="{SHA256}$(echo -n secret | openssl dgst -sha256 -binary | openssl enc -base64)" +test_hash=$(/usr/sbin/slappasswd -s secret -h '{SHA256}' -o module-load=pw-sha2) + +echo "Reference hash of \"secret\" (openssl): ${reference_hash}" +echo "slapd's pw-sha2 hash: ${test_hash}" + +if [ "${reference_hash}" != "${test_hash}" ]; then + echo "ERROR: hashes differ" + exit 1 +else + echo "PASS: hashes are identical" +fi |