summaryrefslogtreecommitdiff
path: root/easy-rsa/1.0/build-req
blob: 30f62f5ef2d1e5f6b666b9154ef6a90bea845960 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh

#
# Build a certificate signing request and private key.  Use this
# when your root certificate and key is not available locally.
#

if test $# -ne 1; then
    echo "usage: build-req <name>";
    exit 1
fi                                                                             

if test $KEY_DIR; then
    cd $KEY_DIR && \
    openssl req -days 3650 -nodes -new -keyout $1.key -out $1.csr -config $KEY_CONFIG
else
    echo you must define KEY_DIR
fi