From d428d53a8bbf843d1b28ae0d9a81b3ee2f0ddb0c Mon Sep 17 00:00:00 2001 From: Eric F Crist Date: Sat, 7 May 2022 06:57:56 -0500 Subject: [PATCH 1/2] Correct grep regex for POSIX compatibility Issue brought up by Michael Gmelin in FreeBSD bug: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=263812 The \d patter is not POSIX, instead :digit: or [0-9] should be used. Opted for the latter. Resolves #556 from freebsd/freebsd-ports@8e0b9d2 Signed-off-by: Eric F Crist --- easyrsa3/easyrsa | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easyrsa3/easyrsa b/easyrsa3/easyrsa index 4db2bb7..304e54e 100755 --- a/easyrsa3/easyrsa +++ b/easyrsa3/easyrsa @@ -2343,7 +2343,7 @@ default_server_san() { awk -F'=' '/^ *CN=/{print $2}' )" - if echo "$cn" | grep -E -q '^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$'; then + if echo "$cn" | grep -E -q '^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$'; then print "subjectAltName = IP:$cn" else print "subjectAltName = DNS:$cn" From 6b803b5a7b92b0fa85a49b5261349e864ae38606 Mon Sep 17 00:00:00 2001 From: Eric F Crist Date: Sat, 7 May 2022 07:05:11 -0500 Subject: [PATCH 2/2] update changelog for patch for #556 Signed-off-by: Eric F Crist --- ChangeLog | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 2df7099..39b97b4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,7 +3,7 @@ Easy-RSA 3 ChangeLog 3.1.0 (TBD) * Introduce basic support for OpenSSL version 3 (#492) -3.0.9 (2022-05-04) +3.0.9 (2022-05-xx) * Upgrade OpenSSL from 1.1.0j to 1.1.1o (#405, #407) - We are buliding this ourselves now. * Fix --version so it uses EASYRSA_OPENSSL (#416) @@ -20,6 +20,7 @@ Easy-RSA 3 ChangeLog * Introduce 'init-pki soft' option (#197) * Warnings are no longer silenced by --batch (#523) * Improve packaging options (#510) + * Update regex for POSIX compliance (#556) 3.0.8 (2020-09-09) * Provide --version option (#372)