summaryrefslogtreecommitdiffstats
path: root/stap-authorize-signing-cert
blob: 22da27c4bd420da4a91dc68267c0b1c644bf3cca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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