69ef562811
- Include upstream patches: + 4eac410.patch Fix string comprehension + a138c0d.patch Fix incorrect "openssl rand" usage + 83a1a21.patch Add --copy-ext option - Include upstream patches: + d20d2b3.patch Update docs and examples to fit changes in 534f673 - Adapted easy-rsa-packaging.patch to work with upstream patch - Include upstream patches: + 534f673.patch Make $PWD/pki the default PKI location - Adapted easy-rsa-packaging.patch to work with upstream patch - Treat /etc/easy-rsa as public default config, no default vars OBS-URL: https://build.opensuse.org/request/show/518428 OBS-URL: https://build.opensuse.org/package/show/network:vpn/easy-rsa?expand=0&rev=10
35 lines
1.0 KiB
Diff
35 lines
1.0 KiB
Diff
From 4eac410bce13a4730aa160ba48e6fa0aef7edd7c Mon Sep 17 00:00:00 2001
|
|
From: azvyagintsev <azvyagintsev@mirantis.com>
|
|
Date: Tue, 4 Jul 2017 20:14:57 +0300
|
|
Subject: [PATCH] Fix string comprehension
|
|
|
|
- "[[" syntax work only in "Bash"
|
|
---
|
|
easyrsa3/easyrsa | 6 ++----
|
|
1 file changed, 2 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/easyrsa3/easyrsa b/easyrsa3/easyrsa
|
|
index e004e2b..901a52f 100755
|
|
--- a/easyrsa3/easyrsa
|
|
+++ b/easyrsa3/easyrsa
|
|
@@ -641,8 +641,7 @@ $(display_dn req "$req_in")
|
|
|
|
# If type is server and no subjectAltName was requested,
|
|
# add one to the extensions file
|
|
- if [[ "$crt_type" == 'server' ]]
|
|
- then
|
|
+ if [ "$crt_type" = 'server' ]; then
|
|
echo "$EASYRSA_EXTRA_EXTS" |
|
|
grep -q subjectAltName ||
|
|
print $(default_server_san "$req_in")
|
|
@@ -941,8 +940,7 @@ default_server_san() {
|
|
awk -F'=' '/^ *CN=/{print $2}'
|
|
)
|
|
echo "$cn" | egrep -q '^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$'
|
|
- if [[ $? -eq 0 ]]
|
|
- then
|
|
+ if [ $? -eq 0 ]; then
|
|
print "subjectAltName = IP:$cn"
|
|
else
|
|
print "subjectAltName = DNS:$cn"
|