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

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Stéphane Graber
  • Date: 2013-05-24 17:42:45 UTC
  • mfrom: (1.1.19) (10.2.22 sid)
  • Revision ID: package-import@ubuntu.com-20130524174245-g9y6wlforycufqy5
Tags: 2.3.1-2ubuntu1
* Merge from Debian unstable. Remaining changes:
  - debian/openvpn.init.d:
    + Do not use start-stop-daemon and </dev/null to avoid blocking boot.
    + Show per-VPN result messages.
    + Add "--script-security 2" by default for backwards compatabliity.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh
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-server <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 -extensions server -config $KEY_CONFIG && \
18
 
        openssl ca -days 3650 -out $1.crt -in $1.csr -extensions server -config $KEY_CONFIG && \
19
 
        chmod 0600 $1.key
20
 
else
21
 
        echo you must define KEY_DIR
22
 
fi