From 966350b11e02afc2ae9386404b50696f759618bd Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Tue, 28 Jul 2020 05:29:39 -0400 Subject: [PATCH] import mod_md-2.0.8-8.module+el8.3.0+6814+67d1e611 --- .gitignore | 1 + .mod_md.metadata | 1 + .../mod_md-2.0.8-tolerate-missing-res.patch | 22 +++++++++++++++++++ SPECS/mod_md.spec | 21 +++++++++++++++++- 4 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 SOURCES/mod_md-2.0.8-tolerate-missing-res.patch diff --git a/.gitignore b/.gitignore index 6333b36..7bff8e6 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ +SOURCES/a2md.xml SOURCES/mod_md-2.0.8.tar.gz diff --git a/.mod_md.metadata b/.mod_md.metadata index 083e09c..b258a33 100644 --- a/.mod_md.metadata +++ b/.mod_md.metadata @@ -1 +1,2 @@ +c3e8fe59d72b01e93a40c7c53f18f9da6343876b SOURCES/a2md.xml 6cec32070c6fd83701be0874a2d8b4f30d929d03 SOURCES/mod_md-2.0.8.tar.gz diff --git a/SOURCES/mod_md-2.0.8-tolerate-missing-res.patch b/SOURCES/mod_md-2.0.8-tolerate-missing-res.patch new file mode 100644 index 0000000..37819cc --- /dev/null +++ b/SOURCES/mod_md-2.0.8-tolerate-missing-res.patch @@ -0,0 +1,22 @@ +diff --git a/src/md_acme.c b/src/md_acme.c +index d2cc00a..005a387 100644 +--- a/src/md_acme.c ++++ b/src/md_acme.c +@@ -728,8 +728,15 @@ static apr_status_t update_directory(const md_http_response_t *res) + acme->api.v2.revoke_cert = md_json_dups(acme->p, json, "revokeCert", NULL); + acme->api.v2.key_change = md_json_dups(acme->p, json, "keyChange", NULL); + acme->api.v2.new_nonce = md_json_dups(acme->p, json, "newNonce", NULL); +- if (acme->api.v2.new_account && acme->api.v2.new_order +- && acme->api.v2.revoke_cert && acme->api.v2.key_change ++ /* RFC 8555 only requires "directory" and "newNonce" resources. ++ * mod_md uses "newAccount" and "newOrder" so check for them. ++ * But mod_md does not use the "revokeCert" or "keyChange" ++ * resources, so tolerate the absense of those keys. In the ++ * future if mod_md implements revocation or key rollover then ++ * the use of those features should be predicated on the ++ * server's advertised capabilities. */ ++ if (acme->api.v2.new_account ++ && acme->api.v2.new_order + && acme->api.v2.new_nonce) { + acme->version = MD_ACME_VERSION_2; + } diff --git a/SPECS/mod_md.spec b/SPECS/mod_md.spec index 012a12e..299efa1 100644 --- a/SPECS/mod_md.spec +++ b/SPECS/mod_md.spec @@ -3,15 +3,19 @@ Name: mod_md Version: 2.0.8 -Release: 6%{?dist} +Release: 8%{?dist} Summary: Certificate provisioning using ACME for the Apache HTTP Server License: ASL 2.0 URL: https://icing.github.io/mod_md/ Source0: https://github.com/icing/mod_md/releases/download/v%{version}/mod_md-%{version}.tar.gz +# documentation +Source10: a2md.xml Patch1: mod_md-2.0.8-state_dir.patch Patch2: mod_md-2.0.8-duptrim-seg.patch +Patch3: mod_md-2.0.8-tolerate-missing-res.patch BuildRequires: gcc BuildRequires: pkgconfig, httpd-devel >= 2.4.37, openssl-devel >= 1.1.0, jansson-devel, libcurl-devel +BuildRequires: xmlto Requires: httpd-mmn = %{_httpd_mmn}, mod_ssl >= 1:2.4.37-17 Conflicts: httpd < 2.4.37-17 Epoch: 1 @@ -26,6 +30,9 @@ domains and their virtual hosts automatically, including at renewal. %setup -q %patch1 -p1 -b .state_dir %patch2 -p1 -b .dup_trim +%patch3 -p1 -b .tol_missing_res + +xmlto man $RPM_SOURCE_DIR/a2md.xml %build %configure @@ -50,14 +57,26 @@ mv %{buildroot}%{_httpd_moddir}/mod_md.so.0.0.0 %{buildroot}%{_httpd_moddir}/mod mkdir -p %{buildroot}%{_httpd_modconfdir} echo "LoadModule md_module modules/mod_md.so" > %{buildroot}%{_httpd_modconfdir}/01-md.conf +# Install man pages +install -d $RPM_BUILD_ROOT%{_mandir}/man1 +install -m 644 -p a2md.1 $RPM_BUILD_ROOT%{_mandir}/man1 + %files %doc README.md ChangeLog AUTHORS %license LICENSE %config(noreplace) %{_httpd_modconfdir}/01-md.conf %{_httpd_moddir}/mod_md.so %{_bindir}/a2md +%{_mandir}/man1/* %changelog +* Thu May 28 2020 Lubos Uhliarik - 1:2.0.8-8 +- Resolves: #1832844 - mod_md does not work with ACME server that does not + provide keyChange or revokeCert resources + +* Wed Jan 22 2020 Lubos Uhliarik - 1:2.0.8-7 +- Resolves: #1747912 - add a2md(1) documentation + * Mon Dec 09 2019 Lubos Uhliarik - 1:2.0.8-6 - Resolves: #1781263 - mod_md ACMEv1 crash