aboutsummaryrefslogtreecommitdiff
path: root/scripts/testroot.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/testroot.sh')
-rw-r--r--scripts/testroot.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/scripts/testroot.sh b/scripts/testroot.sh
new file mode 100644
index 00000000..f4336b2b
--- /dev/null
+++ b/scripts/testroot.sh
@@ -0,0 +1,15 @@
+#!/bin/sh -
+# $Id$
+#
+# Script to test against testroot.py.
+#
+# This blows away rpkid's database and rebuilds it with what we need
+# for this test. In the long run we must do better than this, but
+# gotta start somewhere.
+
+if test ! -r testroot.cer -o ! -r testroot.key
+then
+ ../openssl/openssl/apps/openssl req -new -newkey rsa:2048 -nodes -keyout testroot.key -out testroot.req -config testroot.cnf
+ ../openssl/openssl/apps/openssl x509 -req -in testroot.req -out testroot.cer -extfile testroot.cnf -extensions req_x509_ext -signkey testroot.key -text -sha256
+ rm -f testroot.req
+fi