summary refs log tree commit diff
path: root/pkgs/tools/networking/easyrsa/fix-paths.patch
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/networking/easyrsa/fix-paths.patch')
-rw-r--r--pkgs/tools/networking/easyrsa/fix-paths.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/pkgs/tools/networking/easyrsa/fix-paths.patch b/pkgs/tools/networking/easyrsa/fix-paths.patch
new file mode 100644
index 000000000000..82688fa79460
--- /dev/null
+++ b/pkgs/tools/networking/easyrsa/fix-paths.patch
@@ -0,0 +1,33 @@
+diff --git a/easyrsa3/easyrsa b/easyrsa3/easyrsa
+index 6fec288..210648a 100755
+--- a/easyrsa3/easyrsa
++++ b/easyrsa3/easyrsa
+@@ -1003,7 +1003,7 @@ Note: using Easy-RSA configuration from: $vars"
+ 	
+ 	# Set defaults, preferring existing env-vars if present
+ 	set_var EASYRSA		"$PWD"
+-	set_var EASYRSA_OPENSSL	openssl
++	set_var EASYRSA_OPENSSL	"@openssl@"
+ 	set_var EASYRSA_PKI	"$EASYRSA/pki"
+ 	set_var EASYRSA_DN	cn_only
+ 	set_var EASYRSA_REQ_COUNTRY	"US"
+@@ -1030,13 +1030,17 @@ Note: using Easy-RSA configuration from: $vars"
+ 	# Detect openssl config, preferring EASYRSA_PKI over EASYRSA
+ 	if [ -f "$EASYRSA_PKI/openssl-1.0.cnf" ]; then
+ 		set_var EASYRSA_SSL_CONF	"$EASYRSA_PKI/openssl-1.0.cnf"
+-	else	set_var EASYRSA_SSL_CONF	"$EASYRSA/openssl-1.0.cnf"
++	elif [ -f "$EASYRSA/openssl-1.0.cnf" ]; then
++		set_var EASYRSA_SSL_CONF	"$EASYRSA/openssl-1.0.cnf"
++	else	set_var EASYRSA_SSL_CONF	"@out@/share/easyrsa/openssl-1.0.cnf"
+ 	fi
+ 
+ 	# Same as above for the x509-types extensions dir
+ 	if [ -d "$EASYRSA_PKI/x509-types" ]; then
+ 		set_var EASYRSA_EXT_DIR		"$EASYRSA_PKI/x509-types"
+-	else	set_var EASYRSA_EXT_DIR		"$EASYRSA/x509-types"
++	elif [ -d "$EASYRSA/x509-types" ]; then
++		set_var EASYRSA_EXT_DIR		"$EASYRSA/x509-types"
++	else	set_var EASYRSA_EXT_DIR		"@out@/share/easyrsa/x509-types"
+ 	fi
+ 
+ 	# EASYRSA_ALGO_PARAMS must be set depending on selected algo