aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2020-11-26 00:17:08 +0100
committerGuilhem Moulin <guilhem@fripost.org>2020-11-26 00:17:08 +0100
commitc3cce44cfc175b9ac641820c63354ade12fb05b5 (patch)
tree6cb1807941d7f2aa59527e6364e42d9482fda335
parent0d1274eafa7119cafd51a67015bb658c8ec9b1a8 (diff)
parent51369e3955cdc5bf3f1ba0f6e2d7c4d73406c111 (diff)
Merge tag 'upstream/0.7' into debian
New release 0.7
-rw-r--r--Changelog14
-rw-r--r--Makefile14
-rw-r--r--README2
-rw-r--r--certs/lets-encrypt-e1.pem17
-rw-r--r--certs/lets-encrypt-e2.pem17
-rw-r--r--certs/lets-encrypt-r3-cross-signed.pem26
-rw-r--r--certs/lets-encrypt-r3.pem30
-rw-r--r--certs/lets-encrypt-r4-cross-signed.pem26
-rw-r--r--certs/lets-encrypt-r4.pem30
-rw-r--r--certs/letsencryptauthorityx3.pem32
-rw-r--r--certs/letsencryptauthorityx4.pem32
-rwxr-xr-xclient15
-rw-r--r--config/lacme-certs.conf11
-rwxr-xr-xlacme35
-rw-r--r--lacme-accountd.1.md2
-rw-r--r--lacme.8.md13
16 files changed, 271 insertions, 45 deletions
diff --git a/Changelog b/Changelog
index b71cce7..13db236 100644
--- a/Changelog
+++ b/Changelog
@@ -1,3 +1,17 @@
+lacme (0.7) upstream;
+
+ * Breaking change: the certificate indicated by 'CAfile' is no longer
+ used as is in 'certificate-chain' (along with the leaf cert). The
+ chain returned by the ACME v2 endpoint is used instead. This allows
+ for more flexibility with respect to key/CA rotation, cf.
+ https://letsencrypt.org/2020/11/06/own-two-feet.html and
+ https://community.letsencrypt.org/t/beginning-issuance-from-r3/139018
+ + 'CAfile' now defaults to @@datadir@@/lacme/ca-certificates.crt which
+ is a concatenation of all known active CA certificates (which
+ includes the previous default).
+
+ -- Guilhem Moulin <guilhem@fripost.org> Wed, 25 Nov 2020 23:39:39 +0100
+
lacme (0.6.1) upstream;
+ Adapt Apache2 snippet to Apache2 2.4.
diff --git a/Makefile b/Makefile
index 757a581..a4098de 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@ DESTDIR ?= /usr/local
BUILDDIR ?= ./build
MANUAL_FILES = $(addprefix $(BUILDDIR)/,$(patsubst ./%.md,%,$(wildcard ./*.[1-9].md)))
-all: manual $(addprefix $(BUILDDIR)/,lacme lacme-accountd client webserver $(wildcard config/* snippets/*))
+all: manual $(addprefix $(BUILDDIR)/,lacme lacme-accountd client webserver $(wildcard certs/* config/* snippets/*) certs/ca-certificates.crt)
doc: manual
manual: $(MANUAL_FILES)
@@ -11,6 +11,16 @@ manual: $(MANUAL_FILES)
$(MANUAL_FILES): $(BUILDDIR)/%: $(BUILDDIR)/%.md
pandoc -f markdown -t json -- "$<" | ./pandoc2man.jq | pandoc -s -f json -t man -o "$@"
+# used for validation, see https://letsencrypt.org/certificates/
+$(BUILDDIR)/certs/ca-certificates.crt: \
+ certs/letsencryptauthorityx[34].pem \
+ certs/lets-encrypt-x[34]-cross-signed.pem \
+ certs/lets-encrypt-r[34].pem \
+ certs/lets-encrypt-r[34]-cross-signed.pem \
+ certs/lets-encrypt-e[12].pem
+ mkdir -pv -- $(BUILDDIR)/certs
+ cat $^ >$@
+
prefix ?= $(DESTDIR)
exec_prefix ?= $(prefix)
bindir ?= $(exec_prefix)/bin
@@ -38,7 +48,7 @@ $(BUILDDIR)/%: %
install: all
install -m0644 -vDt $(sysconfdir)/lacme $(BUILDDIR)/config/*.conf $(BUILDDIR)/snippets/*.conf
install -vd $(sysconfdir)/lacme/lacme-certs.conf.d
- install -m0644 -vDt $(datadir)/lacme certs/lets-encrypt-x[1-4]-cross-signed.pem
+ install -m0644 -vDt $(datadir)/lacme $(BUILDDIR)/certs/*
install -m0755 -vDt $(libexecdir)/lacme $(BUILDDIR)/client $(BUILDDIR)/webserver
install -m0644 -vDt $(man1dir) $(BUILDDIR)/lacme-accountd.1
install -m0644 -vDt $(man8dir) $(BUILDDIR)/lacme.8
diff --git a/README b/README
index 8defc54..eb46cdd 100644
--- a/README
+++ b/README
@@ -31,7 +31,7 @@ own executable:
Consult the manuals for more information.
- https://guilhem.org/man/lacme.1.html
+ https://guilhem.org/man/lacme.8.html
https://guilhem.org/man/lacme-accountd.1.html
_______________________________________________________________________
diff --git a/certs/lets-encrypt-e1.pem b/certs/lets-encrypt-e1.pem
new file mode 100644
index 0000000..2a19d41
--- /dev/null
+++ b/certs/lets-encrypt-e1.pem
@@ -0,0 +1,17 @@
+-----BEGIN CERTIFICATE-----
+MIICxjCCAk2gAwIBAgIRALO93/inhFu86QOgQTWzSkUwCgYIKoZIzj0EAwMwTzEL
+MAkGA1UEBhMCVVMxKTAnBgNVBAoTIEludGVybmV0IFNlY3VyaXR5IFJlc2VhcmNo
+IEdyb3VwMRUwEwYDVQQDEwxJU1JHIFJvb3QgWDIwHhcNMjAwOTA0MDAwMDAwWhcN
+MjUwOTE1MTYwMDAwWjAyMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNTGV0J3MgRW5j
+cnlwdDELMAkGA1UEAxMCRTEwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQkXC2iKv0c
+S6Zdl3MnMayyoGli72XoprDwrEuf/xwLcA/TmC9N/A8AmzfwdAVXMpcuBe8qQyWj
++240JxP2T35p0wKZXuskR5LBJJvmsSGPwSSB/GjMH2m6WPUZIvd0xhajggEIMIIB
+BDAOBgNVHQ8BAf8EBAMCAYYwHQYDVR0lBBYwFAYIKwYBBQUHAwIGCCsGAQUFBwMB
+MBIGA1UdEwEB/wQIMAYBAf8CAQAwHQYDVR0OBBYEFFrz7Sv8NsI3eblSMOpUb89V
+yy6sMB8GA1UdIwQYMBaAFHxClq7eS0g7+pL4nozPbYupcjeVMDIGCCsGAQUFBwEB
+BCYwJDAiBggrBgEFBQcwAoYWaHR0cDovL3gyLmkubGVuY3Iub3JnLzAnBgNVHR8E
+IDAeMBygGqAYhhZodHRwOi8veDIuYy5sZW5jci5vcmcvMCIGA1UdIAQbMBkwCAYG
+Z4EMAQIBMA0GCysGAQQBgt8TAQEBMAoGCCqGSM49BAMDA2cAMGQCMHt01VITjWH+
+Dbo/AwCd89eYhNlXLr3pD5xcSAQh8suzYHKOl9YST8pE9kLJ03uGqQIwWrGxtO3q
+YJkgsTgDyj2gJrjubi1K9sZmHzOa25JK1fUpE8ZwYii6I4zPPS/Lgul/
+-----END CERTIFICATE-----
diff --git a/certs/lets-encrypt-e2.pem b/certs/lets-encrypt-e2.pem
new file mode 100644
index 0000000..0fd9f40
--- /dev/null
+++ b/certs/lets-encrypt-e2.pem
@@ -0,0 +1,17 @@
+-----BEGIN CERTIFICATE-----
+MIICxjCCAkygAwIBAgIQTtI99q9+x/mwxHJv+VEqdzAKBggqhkjOPQQDAzBPMQsw
+CQYDVQQGEwJVUzEpMCcGA1UEChMgSW50ZXJuZXQgU2VjdXJpdHkgUmVzZWFyY2gg
+R3JvdXAxFTATBgNVBAMTDElTUkcgUm9vdCBYMjAeFw0yMDA5MDQwMDAwMDBaFw0y
+NTA5MTUxNjAwMDBaMDIxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNy
+eXB0MQswCQYDVQQDEwJFMjB2MBAGByqGSM49AgEGBSuBBAAiA2IABCOaLO3lixmN
+YVWex+ZVYOiTLgi0SgNWtU4hufk50VU4Zp/LbBVDxCsnsI7vuf4xp4Cu+ETNggGE
+yBqJ3j8iUwe5Yt/qfSrRf1/D5R58duaJ+IvLRXeASRqEL+VkDXrW3qOCAQgwggEE
+MA4GA1UdDwEB/wQEAwIBhjAdBgNVHSUEFjAUBggrBgEFBQcDAgYIKwYBBQUHAwEw
+EgYDVR0TAQH/BAgwBgEB/wIBADAdBgNVHQ4EFgQUbZkq9U0C6+MRwWC6km+NPS7x
+6kQwHwYDVR0jBBgwFoAUfEKWrt5LSDv6kviejM9ti6lyN5UwMgYIKwYBBQUHAQEE
+JjAkMCIGCCsGAQUFBzAChhZodHRwOi8veDIuaS5sZW5jci5vcmcvMCcGA1UdHwQg
+MB4wHKAaoBiGFmh0dHA6Ly94Mi5jLmxlbmNyLm9yZy8wIgYDVR0gBBswGTAIBgZn
+gQwBAgEwDQYLKwYBBAGC3xMBAQEwCgYIKoZIzj0EAwMDaAAwZQIxAPJCN9qpyDmZ
+tX8K3m8UYQvK51BrXclM6WfrdeZlUBKyhTXUmFAtJw4X6A0x9mQFPAIwJa/No+KQ
+UAM1u34E36neL/Zba7ombkIOchSgx1iVxzqtFWGddgoG+tppRPWhuhhn
+-----END CERTIFICATE-----
diff --git a/certs/lets-encrypt-r3-cross-signed.pem b/certs/lets-encrypt-r3-cross-signed.pem
new file mode 100644
index 0000000..1d82449
--- /dev/null
+++ b/certs/lets-encrypt-r3-cross-signed.pem
@@ -0,0 +1,26 @@
+-----BEGIN CERTIFICATE-----
+MIIEZTCCA02gAwIBAgIQQAF1BIMUpMghjISpDBbN3zANBgkqhkiG9w0BAQsFADA/
+MSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMT
+DkRTVCBSb290IENBIFgzMB4XDTIwMTAwNzE5MjE0MFoXDTIxMDkyOTE5MjE0MFow
+MjELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUxldCdzIEVuY3J5cHQxCzAJBgNVBAMT
+AlIzMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuwIVKMz2oJTTDxLs
+jVWSw/iC8ZmmekKIp10mqrUrucVMsa+Oa/l1yKPXD0eUFFU1V4yeqKI5GfWCPEKp
+Tm71O8Mu243AsFzzWTjn7c9p8FoLG77AlCQlh/o3cbMT5xys4Zvv2+Q7RVJFlqnB
+U840yFLuta7tj95gcOKlVKu2bQ6XpUA0ayvTvGbrZjR8+muLj1cpmfgwF126cm/7
+gcWt0oZYPRfH5wm78Sv3htzB2nFd1EbjzK0lwYi8YGd1ZrPxGPeiXOZT/zqItkel
+/xMY6pgJdz+dU/nPAeX1pnAXFK9jpP+Zs5Od3FOnBv5IhR2haa4ldbsTzFID9e1R
+oYvbFQIDAQABo4IBaDCCAWQwEgYDVR0TAQH/BAgwBgEB/wIBADAOBgNVHQ8BAf8E
+BAMCAYYwSwYIKwYBBQUHAQEEPzA9MDsGCCsGAQUFBzAChi9odHRwOi8vYXBwcy5p
+ZGVudHJ1c3QuY29tL3Jvb3RzL2RzdHJvb3RjYXgzLnA3YzAfBgNVHSMEGDAWgBTE
+p7Gkeyxx+tvhS5B1/8QVYIWJEDBUBgNVHSAETTBLMAgGBmeBDAECATA/BgsrBgEE
+AYLfEwEBATAwMC4GCCsGAQUFBwIBFiJodHRwOi8vY3BzLnJvb3QteDEubGV0c2Vu
+Y3J5cHQub3JnMDwGA1UdHwQ1MDMwMaAvoC2GK2h0dHA6Ly9jcmwuaWRlbnRydXN0
+LmNvbS9EU1RST09UQ0FYM0NSTC5jcmwwHQYDVR0OBBYEFBQusxe3WFbLrlAJQOYf
+r52LFMLGMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjANBgkqhkiG9w0B
+AQsFAAOCAQEA2UzgyfWEiDcx27sT4rP8i2tiEmxYt0l+PAK3qB8oYevO4C5z70kH
+ejWEHx2taPDY/laBL21/WKZuNTYQHHPD5b1tXgHXbnL7KqC401dk5VvCadTQsvd8
+S8MXjohyc9z9/G2948kLjmE6Flh9dDYrVYA9x2O+hEPGOaEOa1eePynBgPayvUfL
+qjBstzLhWVQLGAkXXmNs+5ZnPBxzDJOLxhF2JIbeQAcH5H0tZrUlo5ZYyOqA7s9p
+O5b85o3AM/OJ+CktFBQtfvBhcJVd9wvlwPsk+uyOy2HI7mNxKKgsBTt375teA2Tw
+UdHkhVNcsAKX1H7GNNLOEADksd86wuoXvg==
+-----END CERTIFICATE-----
diff --git a/certs/lets-encrypt-r3.pem b/certs/lets-encrypt-r3.pem
new file mode 100644
index 0000000..43b222a
--- /dev/null
+++ b/certs/lets-encrypt-r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mcvMCIGA1UdIAQbMBkwCAYGZ4EMAQIBMA0GCysGAQQB
+gt8TAQEBMA0GCSqGSIb3DQEBCwUAA4ICAQCFyk5HPqP3hUSFvNVneLKYY611TR6W
+PTNlclQtgaDqw+34IL9fzLdwALduO/ZelN7kIJ+m74uyA+eitRY8kc607TkC53wl
+ikfmZW4/RvTZ8M6UK+5UzhK8jCdLuMGYL6KvzXGRSgi3yLgjewQtCPkIVz6D2QQz
+CkcheAmCJ8MqyJu5zlzyZMjAvnnAT45tRAxekrsu94sQ4egdRCnbWSDtY7kh+BIm
+lJNXoB1lBMEKIq4QDUOXoRgffuDghje1WrG9ML+Hbisq/yFOGwXD9RiX8F6sw6W4
+avAuvDszue5L3sz85K+EC4Y/wFVDNvZo4TYXao6Z0f+lQKc0t8DQYzk1OXVu8rp2
+yJMC6alLbBfODALZvYH7n7do1AZls4I9d1P4jnkDrQoxB3UqQ9hVl3LEKQ73xF1O
+yK5GhDDX8oVfGKF5u+decIsH4YaTw7mP3GFxJSqv3+0lUFJoi5Lc5da149p90Ids
+hCExroL1+7mryIkXPeFM5TgO9r0rvZaBFOvV2z0gp35Z0+L4WPlbuEjN/lxPFin+
+HlUjr8gRsI3qfJOQFy/9rKIJR0Y/8Omwt/8oTWgy1mdeHmmjk7j1nYsvC9JSQ6Zv
+MldlTTKB3zhThV1+XWYp6rjd5JW1zbVWEkLNxE7GJThEUG3szgBVGP7pSWTUTsqX
+nLRbwHOoq7hHwg==
+-----END CERTIFICATE-----
diff --git a/certs/lets-encrypt-r4-cross-signed.pem b/certs/lets-encrypt-r4-cross-signed.pem
new file mode 100644
index 0000000..f0ed3cd
--- /dev/null
+++ b/certs/lets-encrypt-r4-cross-signed.pem
@@ -0,0 +1,26 @@
+-----BEGIN CERTIFICATE-----
+MIIEZTCCA02gAwIBAgIQQAF1BIMlO+Rkt3exI9CKgjANBgkqhkiG9w0BAQsFADA/
+MSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCB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cDAjANBgkqhkiG9w0B
+AQsFAAOCAQEAN4CpgPmK2C5pq/RdV9gEdWcvPnPfT9ToucrAMTcn//wyWBWF2wG4
+hvPBQxxuqPECZsi4nLQ45VJpyC1NDd0GqGQIMqNdC4N4TLDtd7Yhy8v5JsfEMUbb
+6xW4sKeeeKy3afOkel60Xg1/7ndSmppiHqdh+TdJML1hptRgdxGiB8LMpHuW/oM8
+akfyt4TkBhA8+Wu8MM6dlJyJ7nHBVnEUFQ4Ni+GzNC/pQSL2+Y9Mq4HHIk2ZFy0W
+B8KsVwdeNrERPL+LjhhLde1Et0aL9nlv4CqwXHML2LPgk38j/WllbQ/8HRd2VpB+
+JW6Z8JNhcnuBwATHMCeJVCFapoZsPfQQ6Q==
+-----END CERTIFICATE-----
diff --git a/certs/lets-encrypt-r4.pem b/certs/lets-encrypt-r4.pem
new file mode 100644
index 0000000..578b3bd
--- /dev/null
+++ b/certs/lets-encrypt-r4.pem
@@ -0,0 +1,30 @@
+-----BEGIN CERTIFICATE-----
+MIIFFjCCAv6gAwIBAgIRAIp5IlCr5SxSbO7Pf8lC3WIwDQYJKoZIhvcNAQELBQAw
+TzELMAkGA1UEBhMCVVMxKTAnBgNVBAoTIEludGVybmV0IFNlY3VyaXR5IFJlc2Vh
+cmNoIEdyb3VwMRUwEwYDVQQDEwxJU1JHIFJvb3QgWDEwHhcNMjAwOTA0MDAwMDAw
+WhcNMjUwOTE1MTYwMDAwWjAyMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNTGV0J3Mg
+RW5jcnlwdDELMAkGA1UEAxMCUjQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK
+AoIBAQCzKNx3KdPnkb7ztwoAx/vyVQslImNTNq/pCCDfDa8oPs3Gq1e2naQlGaXS
+Mm1Jpgi5xy+hm5PFIEBrhDEgoo4wYCVg79kaiT8faXGy2uo/c0HEkG9m/X2eWNh3
+z81ZdUTJoQp7nz8bDjpmb7Z1z4vLr53AcMX/0oIKr13N4uichZS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seUSMHO
+w6yqv10/H/dw/8r2EDUincBBX3o9DL3SadqragkKy96HtMiLcqMMGAPm0gti1b6f
+bnvOdr0mrIVIKX5nzOeGZORaYLoSD4C8qvFT7U+Um6DMo36cVDNsPmkF575/s3C2
+CxGiCPQqVxPgfNSh+2CPd2Xv04lNeuw6gG89DlOhHuoFKRlmPnom+gwqhz3ZXMfz
+TfmvjrBokzCICA==
+-----END CERTIFICATE-----
diff --git a/certs/letsencryptauthorityx3.pem b/certs/letsencryptauthorityx3.pem
new file mode 100644
index 0000000..4e82cb5
--- /dev/null
+++ b/certs/letsencryptauthorityx3.pem
@@ -0,0 +1,32 @@
+-----BEGIN CERTIFICATE-----
+MIIFjTCCA3WgAwIBAgIRANOxciY0IzLc9AUoUSrsnGowDQYJKoZIhvcNAQELBQAw
+TzELMAkGA1UEBhMCVVMxKTAnBgNVBAoTIEludGVybmV0IFNlY3VyaXR5IFJlc2Vh
+cmNoIEdyb3VwMRUwEwYDVQQDEwxJU1JHIFJvb3QgWDEwHhcNMTYxMDA2MTU0MzU1
+WhcNMjExMDA2MTU0MzU1WjBKMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNTGV0J3Mg
+RW5jcnlwdDEjMCEGA1UEAxMaTGV0J3MgRW5jcnlwdCBBdXRob3JpdHkgWDMwggEi
+MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCc0wzwWuUuR7dyXTeDs2hjMOrX
+NSYZJeG9vjXxcJIvt7hLQQWrqZ41CFjssSrEaIcLo+N15Obzp2JxunmBYB/XkZqf
+89B4Z3HIaQ6Vkc/+5pnpYDxIzH7KTXcSJJ1HG1rrueweNwAcnKx7pwXqzkrrvUHl
+Npi5y/1tPJZo3yMqQpAMhnRnyH+lmrhSYRQTP2XpgofL2/oOVvaGifOFP5eGr7Dc
+Gu9rDZUWfcQroGWymQQ2dYBrrErzG5BJeC+ilk8qICUpBMZ0wNAxzY8xOJUWuqgz
+uEPxsR/DMH+ieTETPS02+OP88jNquTk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ilRh/0
+ayLThlHLN81gSkJjVrPI0Y8xCVPB4twb1PFUd2fPM3sA1tJ83sZ5v8vgFv2yofKR
+PB0t6JzUA81mSqM3kxl5e+IZwhYAyO0OTg3/fs8HqGTNKd9BqoUwSRBzp06JMg5b
+rUCGwbCUDI0mxadJ3Bz4WxR6fyNpBK2yAinWEsikxqEt
+-----END CERTIFICATE-----
diff --git a/certs/letsencryptauthorityx4.pem b/certs/letsencryptauthorityx4.pem
new file mode 100644
index 0000000..34064da
--- /dev/null
+++ b/certs/letsencryptauthorityx4.pem
@@ -0,0 +1,32 @@
+-----BEGIN CERTIFICATE-----
+MIIFjTCCA3WgAwIBAgIRAJObmZ6kjhYNW0JZtD0gE9owDQYJKoZIhvcNAQELBQAw
+TzELMAkGA1UEBhMCVVMxKTAnBgNVBAoTIEludGVybmV0IFNlY3VyaXR5IFJlc2Vh
+cmNoIEdyb3VwMRUwEwYDVQQDEwxJU1JHIFJvb3QgWDEwHhcNMTYxMDA2MTU0NDM0
+WhcNMjExMDA2MTU0NDM0WjBKMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNTGV0J3Mg
+RW5jcnlwdDEjMCEGA1UEAxMaTGV0J3MgRW5jcnlwdCBBdXRob3JpdHkgWDQwggEi
+MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDhJHRCe7eRMdlz/ziq2M5EXLc5
+CtxErg29RbmXN2evvVBPX9MQVGv3QdqOY+ZtW8DoQKmMQfzRA4n/YmEJYNYHBXia
+kL0aZD5P3M93L4lry2evQU3FjQDAa/6NhNy18pUxqOj2kKBDSpN0XLM+Q2lLiSJH
+dFE+mWTDzSQB+YQvKHcXIqfdw2wITGYvN3TFb5OOsEY3FmHRUJjIsA9PWFN8rPba
+LZZhUK1D3AqmT561Urmcju9O30azMdwg/GnCoyB1Puw4GzZOZmbS3/VmpJMve6YO
+lD5gPUpLHG+6tE0cPJFYbi9NxNpw2+0BOXbASefpNbUUBpDB5ZLiEP1rubSFAgMB
+AA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1t96zvNd2s9ewSKx/DblXbKsBDzIdHJ+qi6+
+F9DIVM5/ICdtDdulOO+dr/BXB+pBZ3uVxjRANvJKKpdxkePyluITSNZHbanWRN07
+gMvwBWOL060i4VrL9er1sBQrRjU9iNpZQGTnLVAxQVFu
+-----END CERTIFICATE-----
diff --git a/client b/client
index b59c013..bacd4d6 100755
--- a/client
+++ b/client
@@ -361,20 +361,7 @@ elsif ($COMMAND eq 'newOrder') {
die "Timeout exceeded while waiting for certificate\n" if $timeout > 0 and $i >= $timeout;
sleep $retry_after;
}
-
- # keep only the leaf certificate
- pipe my $rd, my $wd or die "Can't pipe: $!";
- my $pid = fork // die "Can't fork: $!";
- unless ($pid) {
- open STDIN, '<&', $rd or die "Can't dup: $!";
- exec qw/openssl x509 -outform PEM/ or die;
- }
- $rd->close() or die "Can't close: $!";
- $wd->print( $r->decoded_content() );
- $wd->close() or die "Can't close: $!";
-
- waitpid $pid => 0;
- die $? if $? > 0;
+ print $r->decoded_content();
}
diff --git a/config/lacme-certs.conf b/config/lacme-certs.conf
index dd02f95..232c85b 100644
--- a/config/lacme-certs.conf
+++ b/config/lacme-certs.conf
@@ -20,8 +20,8 @@
#
#certificate = /etc/nginx/ssl/srv.pem
-# Where to store the issued certificate, concatenated with the content
-# of the file specified specified with the CAfile option (in PEM format).
+# Where to store the issued certificate along with its chain of trust
+# (in PEM format).
#
#certificate-chain = /etc/nginx/ssl/srv.chain.pem
@@ -30,11 +30,10 @@
#
#min-days = 21
-# Path to the issuer's certificate. This is used for certificate-chain
-# and to verify the validity of each issued certificate. Specifying an
-# empty value skip certificate validation.
+# Path to trusted issuer certificates, used for validating each issued
+# certificate. Specifying an empty value skips certificate validation.
#
-#CAfile = @@datadir@@/lacme/lets-encrypt-x3-cross-signed.pem
+#CAfile = @@datadir@@/lacme/ca-certificates.crt
# Subject field of the Certificate Signing Request. This option is
# required.
diff --git a/lacme b/lacme
index 1ca4a38..07ebb45 100755
--- a/lacme
+++ b/lacme
@@ -584,12 +584,10 @@ sub spawn($@) {
#############################################################################
-# Install the certificate
+# Install the certificate (optionally excluding the chain of trust)
#
sub install_cert($$;$) {
- my $filename = shift;
- my $x509 = shift;
- my @chain = grep !/\A\s*\z/, @_; # ignore empty CAfile
+ my ($filename, $chain, $leafonly) = @_;
my ($dirname, $basename) =
$filename =~ /\A(.*)\/([^\/]+)\z/ ? ($1, $2) : ('.', $filename);
@@ -599,12 +597,23 @@ sub install_cert($$;$) {
eval {
my $umask = umask() // die "umask: $!";
chmod(0644 &~ $umask, $fh) or die "chmod: $!";
- $fh->print($x509) or die "Can't print: $!";
- foreach (@chain) { # append the chain
- open my $fh2, '<', $_ or die "Can't open $_: $!";
- my $ca = do { local $/ = undef; $fh2->getline() };
- $fh2->close() or die "Can't close: $!";
- $fh->print($ca) or die "Can't print: $!";
+ if ($leafonly) {
+ # keep only the leaf certificate
+ pipe my $rd, my $wd or die "Can't pipe: $!";
+ my $pid = fork // die "Can't fork: $!";
+ unless ($pid) {
+ open STDIN, '<&', $rd or die "Can't dup: $!";
+ open STDOUT, '>&', $fh or die "Can't dup: $!";
+ exec qw/openssl x509 -outform PEM/ or die;
+ }
+ $rd->close() or die "Can't close: $!";
+ $wd->print($chain);
+ $wd->close() or die "Can't close: $!";
+
+ waitpid $pid => 0;
+ die $? if $? > 0;
+ } else {
+ $fh->print($chain) or die "Can't print: $!";
}
$fh->close() or die "Can't close: $!";
};
@@ -743,7 +752,7 @@ elsif ($COMMAND eq 'newOrder' or $COMMAND eq 'new-cert') {
};
# verify certificate validity against the CA
- $conf->{CAfile} //= '@@datadir@@/lacme/lets-encrypt-x3-cross-signed.pem';
+ $conf->{CAfile} //= '@@datadir@@/lacme/ca-certificates.crt';
if ($conf->{CAfile} ne '' and spawn({in => $x509}, 'openssl', 'verify', '-CAfile', $conf->{CAfile},
qw/-purpose sslserver -x509_strict/)) {
print STDERR "[$s] Error: Received invalid X.509 certificate from ACME server!\n";
@@ -754,11 +763,11 @@ elsif ($COMMAND eq 'newOrder' or $COMMAND eq 'new-cert') {
# install certificate
if (defined $conf->{'certificate'}) {
print STDERR "Installing X.509 certificate $conf->{'certificate'}\n";
- install_cert($conf->{'certificate'}, $x509);
+ install_cert($conf->{'certificate'}, $x509, 1);
}
if (defined $conf->{'certificate-chain'}) {
print STDERR "Installing X.509 certificate chain $conf->{'certificate-chain'}\n";
- install_cert($conf->{'certificate-chain'}, $x509, $conf->{CAfile});
+ install_cert($conf->{'certificate-chain'}, $x509);
}
if (defined $conf->{chown}) {
diff --git a/lacme-accountd.1.md b/lacme-accountd.1.md
index 6cf9ea8..a967b67 100644
--- a/lacme-accountd.1.md
+++ b/lacme-accountd.1.md
@@ -128,7 +128,7 @@ Alternatively, use [OpenSSH] 6.7 or later to forward the socket and
execute [`lacme`(8)] remotely:
~$ ssh -oExitOnForwardFailure=yes -tt -R /path/to/remote.sock:$XDG_RUNTIME_DIR/S.lacme user@example.org \
- sudo lacme --socket=/path/to/remote.sock newOrder
+ sudo lacme --socket=/path/to/remote.sock newOrder
See also
========
diff --git a/lacme.8.md b/lacme.8.md
index 90fd3cf..4098662 100644
--- a/lacme.8.md
+++ b/lacme.8.md
@@ -326,9 +326,8 @@ Valid options are:
*certificate-chain*
-: Where to store the issued certificate, concatenated with the content
- of the file specified specified with the *CAfile* option (in PEM
- format).
+: Where to store the issued certificate along with its chain of trust
+ (in PEM format).
At least one of *certificate* or *certificate-chain* is required.
*certificate-key*
@@ -350,11 +349,9 @@ Valid options are:
*CAfile*
-: Path to the issuer's certificate. This is used for
- *certificate-chain* and to verify the validity of each issued
- certificate.
- Specifying an empty value skip certificate validation.
- Default: `@@datadir@@/lacme/lets-encrypt-x3-cross-signed.pem`.
+: Path to trusted issuer certificates, used for validating each issued
+ certificate. Specifying an empty values skips certificate validation.
+ Default: `@@datadir@@/lacme/ca-certificates.crt`.
*hash*