perkeep/pkg/osutil
mpl c55c8602d3 server/camlistored: use Let's Encrypt
Or to be more precise, golang.org/x/crypto/acme/autocert

The default behaviour regarding HTTPS certificates changes as such:

1) If the high-level config does not specify a certificate, the
low-level config used to be generated with a default certificate path.
This is no longer the case.
2) If the low-level config does not specify a certificate, we used to
generate self-signed ones at the default path. This is no longer always
the case. We only do this if our hostname does not look like an FQDN,
otherwise we try Let's Encrypt.
3) As a result, if the high-level config does not specify a certificate,
and the hostname looks like an FQDN, it is no longer the case that we'll
generate a self-signed. Let's Encrypt will be tried instead.

To sum up, the new rules are:
If cert/key files are specified, and found, use them.
If cert/key files are specified, not found, and the default values,
generate them (self-signed CA used as a cert), and use them.
If cert/key files are not specified, use Let's Encrypt if we have an
FQDN, otherwise generate self-signed.

Regarding cert caching:

On non-GCE, store the autocert cache dir in
osutil.CamliConfigDir()/letsencrypt.cache
On GCE, store in /tmp/camli-letsencrypt.cache

Fixes #701
Fixes #859

Change-Id: Id78a9c6f113fa93e38d690033c10a749d1844ea6
2016-12-05 19:43:37 +01:00
..
gce vendor: rename google.golang.org/cloud to cloud.google.com/go 2016-09-08 15:14:12 +02:00
cpu.go osutil: add CPUUsage function 2013-11-30 11:59:36 -08:00
cpu_freebsd.go pkg/osutil: add FreeBSD CPU usage. 2014-07-04 20:00:00 -07:00
cpu_linux.go osutil: add CPUUsage function 2013-11-30 11:59:36 -08:00
findproc_appengine.go osutil: fix typo in build tag 2013-08-02 21:23:55 +02:00
findproc_normal.go integration tests: kill camlistored when all tests are done 2013-08-02 15:42:49 +02:00
mem.go osutil: add MemUsage func 2014-01-26 21:56:16 -08:00
mem_unix.go osutil: add MemUsage func 2014-01-26 21:56:16 -08:00
openurl.go
osutil.go add canonical import paths 2016-03-13 19:57:14 -07:00
paths.go server/camlistored: use Let's Encrypt 2016-12-05 19:43:37 +01:00
paths_test.go pkg/jsonconfig: remove dependence on pkg/osutil 2015-12-01 00:43:39 +01:00
restart_freebsd.go Fix compilation on FreeBSD. Thanks to retzkek. Fixes Issue 168. 2013-07-02 22:12:53 -07:00
restart_stub.go osutil: fix Windows build 2016-05-16 14:31:55 +02:00
restart_unix.go pkg/osutil: add arguments to RestartProcess 2016-05-09 16:18:39 +02:00
restart_windows.go osutil: fix Windows build 2016-05-16 14:31:55 +02:00
syscall.go pkg/blobserver/localdisk: gate tmp file creations 2016-08-17 18:24:30 +02:00
syscall_appengine.go pkg/blobserver/localdisk: gate tmp file creations 2016-08-17 18:24:30 +02:00
syscall_posix.go pkg/blobserver/localdisk: gate tmp file creations 2016-08-17 18:24:30 +02:00
syscall_solaris.go pkg/blobserver/localdisk: gate tmp file creations 2016-08-17 18:24:30 +02:00
syscall_windows.go pkg/blobserver/localdisk: gate tmp file creations 2016-08-17 18:24:30 +02:00