summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2020-12-15 21:54:19 +0100
committerThomas Deutschmann <whissi@gentoo.org>2020-12-15 22:43:33 +0100
commitff5e10bdd6d92c50249116907ee8e0602c3ec726 (patch)
tree39f9d3a0adc2fbdaa2abb2a6915f19f362773b7c /app-crypt/dehydrated/files
parentacct-user/dehydrated: new user for app-crypt/dehydrated, UID 361 (diff)
downloadgentoo-ff5e10bdd6d92c50249116907ee8e0602c3ec726.tar.gz
gentoo-ff5e10bdd6d92c50249116907ee8e0602c3ec726.tar.bz2
gentoo-ff5e10bdd6d92c50249116907ee8e0602c3ec726.zip
app-crypt/dehydrated: bump to v0.7.0
Package-Manager: Portage-3.0.12, Repoman-3.0.2 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
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.patch30
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 00000000000..91188fbe358
--- /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