Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
security/easy-rsa: fix cert issuance with BSD grep
easyrsa running on systems with bsdgrep for grep fails issuing certs because it attempts \d as shorthand for [[:digit:]] or [0-9] and triggers a grep failure with diagnostic grep: trailing backslash (\) Filed upstream: OpenVPN/easy-rsa#556 PR: 263812 Submitted by: grembo@
- Loading branch information
Showing
2 changed files
with
12 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- easyrsa.orig 2020-09-09 20:59:45 UTC | ||
+++ easyrsa | ||
@@ -1546,7 +1546,7 @@ default_server_san() { | ||
easyrsa_openssl req -in "$path" -noout -subject -nameopt sep_multiline | | ||
awk -F'=' '/^ *CN=/{print $2}' | ||
) | ||
- echo "$cn" | grep -E -q '^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$' | ||
+ echo "$cn" | grep -E -q '^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$' | ||
#shellcheck disable=SC2181 | ||
if [ $? -eq 0 ]; then | ||
print "subjectAltName = IP:$cn" |