diff options
author | Dimitri Sokolyuk <demon@dim13.org> | 2016-01-14 01:03:13 +0100 |
---|---|---|
committer | Dimitri Sokolyuk <demon@dim13.org> | 2016-01-14 01:03:13 +0100 |
commit | daf5a7d875e9744abf462c09b1a5cef77a98e9fd (patch) | |
tree | 95b461ffdd0a18740ac5a0883ec6782a7a2a9999 /provider.go | |
parent | 92023bf6e060e2adf240964d2d7589c43eca7f75 (diff) |
Backup old cert and key
Diffstat (limited to 'provider.go')
-rw-r--r-- | provider.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/provider.go b/provider.go index 953f2ad..cc1c46c 100644 --- a/provider.go +++ b/provider.go @@ -124,8 +124,9 @@ func (p *Provider) parseJson(resp *http.Response, v interface{}) (nextStep, erro return ns, problem(resp.Body) case "application/json": return ns, json.NewDecoder(resp.Body).Decode(v) + default: + return ns, errContentType } - return ns, errContentType } func (p *Provider) parseCert(resp *http.Response) (*x509.Certificate, nextStep, error) { @@ -137,8 +138,9 @@ func (p *Provider) parseCert(resp *http.Response) (*x509.Certificate, nextStep, case "application/pkix-cert": c, err := readCert(resp.Body) return c, ns, err + default: + return nil, ns, errContentType } - return nil, ns, errContentType } func problem(r io.Reader) error { |