diff options
author | cori hudson <54032873+hyperobject@users.noreply.github.com> | 2019-08-26 15:00:31 -0400 |
---|---|---|
committer | Wim <wim@42.be> | 2019-08-26 21:00:31 +0200 |
commit | 921f2dfcdf1a6263220b55eb55716e497373dfcf (patch) | |
tree | 436478bd7b61ea598d75af0d27520b512dad1683 /vendor/golang.org/x/crypto/acme/autocert | |
parent | 79a006c8de311a7bbab540e62bd3fac998d415d5 (diff) | |
download | matterbridge-msglm-921f2dfcdf1a6263220b55eb55716e497373dfcf.tar.gz matterbridge-msglm-921f2dfcdf1a6263220b55eb55716e497373dfcf.tar.bz2 matterbridge-msglm-921f2dfcdf1a6263220b55eb55716e497373dfcf.zip |
Add initial Keybase Chat support (#877)
* initial work on native keybase bridging
* Hopefully make a functional keybase bridge
* add keybase to bridgemap
* send to right channel, try to figure out received msgs
* add account and userid
* i am a Dam Fool
* Fix formatting for messages, handle /me
* update vendors, ran golint and goimports
* move handlers to handlers.go, clean up unused config options
* add sample config, fix inconsistent remote nick handling
* Update readme with keybase links
* Resolve fixmie errors
* Error -> Errorf
* fix linting errors in go.mod and go.sum
* explicitly join channels, ignore messages from non-specified channels
* check that team names match before bridging message
Diffstat (limited to 'vendor/golang.org/x/crypto/acme/autocert')
-rw-r--r-- | vendor/golang.org/x/crypto/acme/autocert/autocert.go | 3 | ||||
-rw-r--r-- | vendor/golang.org/x/crypto/acme/autocert/cache.go | 8 |
2 files changed, 10 insertions, 1 deletions
diff --git a/vendor/golang.org/x/crypto/acme/autocert/autocert.go b/vendor/golang.org/x/crypto/acme/autocert/autocert.go index e562609c..70ab355f 100644 --- a/vendor/golang.org/x/crypto/acme/autocert/autocert.go +++ b/vendor/golang.org/x/crypto/acme/autocert/autocert.go @@ -980,6 +980,9 @@ func (m *Manager) acmeClient(ctx context.Context) (*acme.Client, error) { return nil, err } } + if client.UserAgent == "" { + client.UserAgent = "autocert" + } var contact []string if m.Email != "" { contact = []string{"mailto:" + m.Email} diff --git a/vendor/golang.org/x/crypto/acme/autocert/cache.go b/vendor/golang.org/x/crypto/acme/autocert/cache.go index aa9aa845..03f63022 100644 --- a/vendor/golang.org/x/crypto/acme/autocert/cache.go +++ b/vendor/golang.org/x/crypto/acme/autocert/cache.go @@ -77,6 +77,7 @@ func (d DirCache) Put(ctx context.Context, name string, data []byte) error { if tmp, err = d.writeTempFile(name, data); err != nil { return } + defer os.Remove(tmp) select { case <-ctx.Done(): // Don't overwrite the file if the context was canceled. @@ -116,12 +117,17 @@ func (d DirCache) Delete(ctx context.Context, name string) error { } // writeTempFile writes b to a temporary file, closes the file and returns its path. -func (d DirCache) writeTempFile(prefix string, b []byte) (string, error) { +func (d DirCache) writeTempFile(prefix string, b []byte) (name string, reterr error) { // TempFile uses 0600 permissions f, err := ioutil.TempFile(string(d), prefix) if err != nil { return "", err } + defer func() { + if reterr != nil { + os.Remove(f.Name()) + } + }() if _, err := f.Write(b); err != nil { f.Close() return "", err |