diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-12-18 11:06:49 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-12-18 11:06:49 +0000 |
commit | ab3da91fb6c91a9df52fff8f991570f456fd3c7a (patch) | |
tree | e8f3bfa2c6c3d20ec3b9c352c839e23949068b6b /app-crypt/dehydrated/files | |
parent | 6abbf81ef2f298e3221ff5e67a1f3c5f23958212 (diff) |
gentoo resync : 18.12.2020
Diffstat (limited to 'app-crypt/dehydrated/files')
-rw-r--r-- | app-crypt/dehydrated/files/dehydrated-0.7.0-fix-CN-extraction-for-older-openssl-versions.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/app-crypt/dehydrated/files/dehydrated-0.7.0-fix-CN-extraction-for-older-openssl-versions.patch b/app-crypt/dehydrated/files/dehydrated-0.7.0-fix-CN-extraction-for-older-openssl-versions.patch new file mode 100644 index 000000000000..91188fbe3587 --- /dev/null +++ b/app-crypt/dehydrated/files/dehydrated-0.7.0-fix-CN-extraction-for-older-openssl-versions.patch @@ -0,0 +1,30 @@ +From 29b67962ac07d5d2b24f69c863a9ef31e8ac53ee Mon Sep 17 00:00:00 2001 +From: Lukas Schauer <lukas@schauer.so> +Date: Fri, 11 Dec 2020 18:02:51 +0100 +Subject: [PATCH] fix CN extraction for older openssl versions + +--- + dehydrated | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/dehydrated b/dehydrated +index 622165e..37e0ab6 100755 +--- a/dehydrated ++++ b/dehydrated +@@ -926,14 +926,14 @@ extract_altnames() { + printf "%s" "${altnames}" | tr '\n' ' ' + else + # No SANs, extract CN +- altnames="$( <<<"${reqtext}" grep '^[[:space:]]*Subject:' | _sed -e 's/.* CN ?= ?([^ /,]*).*/\1/' )" ++ altnames="$( <<<"${reqtext}" grep '^[[:space:]]*Subject:' | _sed -e 's/.*[ /]CN ?= ?([^ /,]*).*/\1/' )" + printf "%s" "${altnames}" + fi + } + + # Get last issuer CN in certificate chain + get_last_cn() { +- <<<"${1}" _sed 'H;/-----BEGIN CERTIFICATE-----/h;$!d;x' | "${OPENSSL}" x509 -noout -issuer | head -n1 | _sed -e 's/.* CN ?= ?([^/,]*).*/\1/' ++ <<<"${1}" _sed 'H;/-----BEGIN CERTIFICATE-----/h;$!d;x' | "${OPENSSL}" x509 -noout -issuer | head -n1 | _sed -e 's/.*[ /]CN ?= ?([^/,]*).*/\1/' + } + + # Create certificate for domain(s) and outputs it FD 3 |