depot/third_party/nixpkgs/pkgs/tools/networking/easyrsa/fix-paths.patch
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

33 lines
1.3 KiB
Diff

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