~ubuntu-branches/ubuntu/saucy/openvpn/saucy

« back to all changes in this revision

Viewing changes to easy-rsa/build-key-server

  • Committer: Bazaar Package Importer
  • Author(s): Alberto Gonzalez Iniesta
  • Date: 2005-01-05 19:03:11 UTC
  • mto: (1.4.1) (10.1.1 lenny)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20050105190311-d0uioiqtor5xbzre
Tags: upstream-1.99+2.rc6
ImportĀ upstreamĀ versionĀ 1.99+2.rc6

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
 
 
3
#
 
4
# Make a certificate/private key pair using a locally generated
 
5
# root certificate.
 
6
#
 
7
# Explicitly set nsCertType to server using the "server"
 
8
# extension in the openssl.cnf file.
 
9
 
 
10
if test $# -ne 1; then
 
11
        echo "usage: build-key <name>";
 
12
        exit 1
 
13
fi                                                                             
 
14
 
 
15
if test $KEY_DIR; then
 
16
        cd $KEY_DIR && \
 
17
        openssl req -days 3650 -nodes -new -keyout $1.key -out $1.csr -config $KEY_CONFIG && \
 
18
        openssl ca -days 3650 -out $1.crt -in $1.csr -extensions server -config $KEY_CONFIG
 
19
else
 
20
        echo you must define KEY_DIR
 
21
fi