easyrsa/1.0/build-key-pass
David Sommerseth f50a678a18 Initial easy-rsa commit
In the master branch of openvpn.git/openvpn-testing.git commit
26abb83cb1cf0c331db875186250b0c8d55d6013 removes easy-rsa from the
core OpenVPN tree.

This commit is the import of the easy-rsa based on the commit
mentioned.  The history before this import of easy-rsa can be found
in the openvpn.git/openvpn-testing.git trees.

Signed-off-by: David Sommerseth <davids@redhat.com>
2012-03-28 15:05:54 +02:00

21 lines
424 B
Bash
Executable File

#!/bin/sh
#
# Similar to build-key, but protect the private key
# with a password.
#
if test $# -ne 1; then
echo "usage: build-key-pass <name>";
exit 1
fi
if test $KEY_DIR; then
cd $KEY_DIR && \
openssl req -days 3650 -new -keyout $1.key -out $1.csr -config $KEY_CONFIG && \
openssl ca -days 3650 -out $1.crt -in $1.csr -config $KEY_CONFIG && \
chmod 0600 $1.key
else
echo you must define KEY_DIR
fi