Simple patch to EasyRSA
The attached makes EasyRSA commands source the vars file themselves, if they can find it.
build-ca renamed from easy-rsa/build-ca +4 -0
@@ -4,6 +4,10 @@ # Build a root certificate # +if [ -f $(dirname $0)/vars ] ; then + source $(dirname $0)/vars +fi + if test $KEY_DIR; then cd $KEY_DIR && \ openssl req -days 3650 -nodes -new -x509 -keyout ca.key -out ca.crt -config $KEY_CONFIG
build-dh renamed from easy-rsa/build-dh +4 -0
@@ -5,6 +5,10 @@ # of an SSL/TLS connection. # +if [ -f $(dirname $0)/vars ] ; then + source $(dirname $0)/vars +fi + if test $KEY_DIR; then openssl dhparam -out ${KEY_DIR}/dh${KEY_SIZE}.pem ${KEY_SIZE} else
build-inter renamed from easy-rsa/build-inter +4 -0
@@ -5,6 +5,10 @@ # root certificate. # +if [ -f $(dirname $0)/vars ] ; then + source $(dirname $0)/vars +fi + if test $# -ne 1; then echo "usage: build-inter <name>"; exit 1
build-key renamed from easy-rsa/build-key +4 -0
@@ -5,6 +5,10 @@ # root certificate. # +if [ -f $(dirname $0)/vars ] ; then + source $(dirname $0)/vars +fi + if test $# -ne 1; then echo "usage: build-key <name>"; exit 1
build-key-pass renamed from easy-rsa/build-key-pass +4 -0
@@ -5,6 +5,10 @@ # with a password. # +if [ -f $(dirname $0)/vars ] ; then + source $(dirname $0)/vars +fi + if test $# -ne 1; then echo "usage: build-key-pass <name>"; exit 1
build-req renamed from easy-rsa/build-req +4 -0
@@ -5,6 +5,10 @@ # when your root certificate and key is not available locally. # +if [ -f $(dirname $0)/vars ] ; then + source $(dirname $0)/vars +fi + if test $# -ne 1; then echo "usage: build-req <name>"; exit 1
build-req-pass renamed from easy-rsa/build-req-pass +4 -0
@@ -5,6 +5,10 @@ # with a password. # +if [ -f $(dirname $0)/vars ] ; then + source $(dirname $0)/vars +fi + if test $# -ne 1; then echo "usage: build-req-pass <name>"; exit 1
Only in easy-rsa: client-scripts
list-crl renamed from easy-rsa/list-crl +4 -0
@@ -5,6 +5,10 @@ # # +if [ -f $(dirname $0)/vars ] ; then + source $(dirname $0)/vars +fi + if test $# -ne 1; then echo "usage: list-crl <crlfile.pem>"; exit 1
make-crl renamed from easy-rsa/make-crl +4 -0
@@ -5,6 +5,10 @@ # # +if [ -f $(dirname $0)/vars ] ; then + source $(dirname $0)/vars +fi + if test $# -ne 1; then echo "usage: make-crl <crlfile.pem>"; exit 1
revoke-crt renamed from easy-rsa/revoke-crt +4 -0
@@ -5,6 +5,10 @@ # # +if [ -f $(dirname $0)/vars ] ; then + source $(dirname $0)/vars +fi + if test $# -ne 1; then echo "usage: revoke-crt <file.crt>"; exit 1
sign-req renamed from easy-rsa/sign-req +4 -0
@@ -5,6 +5,10 @@ # with a local root certificate and key. # +if [ -f $(dirname $0)/vars ] ; then + source $(dirname $0)/vars +fi + if test $# -ne 1; then echo "usage: sign-req <name>"; exit 1
diff -ru3 openvpn-2.0_beta11/easy-rsa/vars easy-rsa/vars