aboutsummaryrefslogtreecommitdiff
path: root/scripts/testroot.sh
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2007-10-31 17:07:07 +0000
committerRob Austein <sra@hactrn.net>2007-10-31 17:07:07 +0000
commita105111b05a06da83b4a17d5902d1cf5643b8bb4 (patch)
tree49da4dc1b06c8352142dec14348e7e343b0ca0e7 /scripts/testroot.sh
parent8015aac75ab11bd601b354ebb34c976448d8b575 (diff)
Checkpoint
svn path=/scripts/testroot.cer; revision=1216
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