gen_req() no longer alters the global EXTRA_EXTS variable
When forming the OpenSSL config replacement text, gen_req() should not alter the global variable as it is referred to again by sign_req() when the wrapper-commands build-*-full are called. This change localizes the replacement text to avoid competing over the global variable. Signed-off-by: Josh Cepek <josh.cepek@usa.net> Based-On: patch submitted by Joe Hu <i@sapika.ch> Fixes: Issue #25
This commit is contained in:
parent
5c1ca9543d
commit
bc586578b4
@ -525,7 +525,7 @@ Continuing with key generation will replace this key."
|
||||
# When EASYRSA_EXTRA_EXTS is defined, append it to openssl's [req] section:
|
||||
if [ -n "$EASYRSA_EXTRA_EXTS" ]; then
|
||||
# Setup & insert the extra ext data keyed by a magic line
|
||||
EASYRSA_EXTRA_EXTS="
|
||||
local extra_exts="
|
||||
req_extensions = req_extra
|
||||
[ req_extra ]
|
||||
$EASYRSA_EXTRA_EXTS"
|
||||
@ -534,7 +534,7 @@ $EASYRSA_EXTRA_EXTS"
|
||||
{ while ( getline<"/dev/stdin" ) {print} next }
|
||||
{print}
|
||||
}'
|
||||
print "$EASYRSA_EXTRA_EXTS" | \
|
||||
print "$extra_exts" | \
|
||||
awk "$awkscript" "$EASYRSA_SSL_CONF" \
|
||||
> "$EASYRSA_TEMP_FILE" \
|
||||
|| die "Copying SSL config to temp file failed"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user