summaryrefslogtreecommitdiff
path: root/debian/tests/keygen-test
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2008-05-20 19:59:07 +0000
committerColin Watson <cjwatson@debian.org>2008-05-20 19:59:07 +0000
commit2231f4c3038aefc1f77cf456b188b53fb6da4a13 (patch)
treea7bac02b6fa3cd8c2f22f9fd76c45b7f47d4ac60 /debian/tests/keygen-test
parent15177d9485f496337dabadb0364c08be971c1239 (diff)
Generate two keys with the PID forced to the same value and test that
they differ, to defend against recurrences of the recent Debian OpenSSL vulnerability.
Diffstat (limited to 'debian/tests/keygen-test')
-rwxr-xr-xdebian/tests/keygen-test12
1 files changed, 12 insertions, 0 deletions
diff --git a/debian/tests/keygen-test b/debian/tests/keygen-test
new file mode 100755
index 000000000..02b7c761a
--- /dev/null
+++ b/debian/tests/keygen-test
@@ -0,0 +1,12 @@
1#! /bin/sh
2
3rm -f key1 key1.pub key2 key2.pub
4LD_PRELOAD="$(pwd)/getpid.so" FORCE_PID=1234 \
5 ../../build-deb/ssh-keygen -N '' -f key1 >/dev/null
6LD_PRELOAD="$(pwd)/getpid.so" FORCE_PID=1234 \
7 ../../build-deb/ssh-keygen -N '' -f key2 >/dev/null
8if cmp -s key1 key2; then
9 echo "Generated two identical keys!" >&2
10 exit 1
11fi
12exit 0