summaryrefslogtreecommitdiffstats
path: root/stap-authorize-signing-cert
diff options
context:
space:
mode:
authorDave Brolley <brolley@redhat.com>2009-05-04 16:05:22 -0400
committerDave Brolley <brolley@redhat.com>2009-05-04 16:05:22 -0400
commit2035bcd40b17832439df0a1eb28403b99a71b74f (patch)
tree0fb027ba40f34513279f2e39e1110b50a415d2c1 /stap-authorize-signing-cert
parent3ba2eb82cafa938c1c3f7ef9d2da06912a49d8e0 (diff)
downloadsystemtap-steved-2035bcd40b17832439df0a1eb28403b99a71b74f.tar.gz
systemtap-steved-2035bcd40b17832439df0a1eb28403b99a71b74f.tar.xz
systemtap-steved-2035bcd40b17832439df0a1eb28403b99a71b74f.zip
Module signing and verification using a separate file for the module signature.
Diffstat (limited to 'stap-authorize-signing-cert')
-rw-r--r--stap-authorize-signing-cert30
1 files changed, 30 insertions, 0 deletions
diff --git a/stap-authorize-signing-cert b/stap-authorize-signing-cert
new file mode 100644
index 00000000..22da27c4
--- /dev/null
+++ b/stap-authorize-signing-cert
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+# Add an existing server certificate to the
+# database of trusted SSL servers for the client.
+#
+# Copyright (C) 2009 Red Hat Inc.
+#
+# This file is part of systemtap, and is free software. You can
+# redistribute it and/or modify it under the terms of the GNU General
+# Public License (GPL); either version 2, or (at your option) any
+# later version.
+
+# Initialize the environment
+. `dirname $0`/stap-env
+
+certfile=$1
+certdb=$2
+
+# Obtain the filename of the certificate
+if test "X$certfile" = "X"; then
+ echo "Certificate file must be specified" >&2
+ exit 1
+fi
+
+# Obtain the certificate database directory name.
+if test "X$certdb" = "X"; then
+ certdb=$stap_signing_db
+fi
+
+${stap_exec_prefix}stap-authorize-cert $certfile $certdb