Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(4239)

Issue 6782094: environs/config: error for cert not found

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 5 months ago by rog
Modified:
11 years, 5 months ago
Reviewers:
mp+135206, niemeyer
Visibility:
Public.

Description

environs/config: error for cert not found We change config.New so that it returns a special error when the default CA certificate is not found. This will enable us to act on that error and generate a certificate file when necessary. https://code.launchpad.net/~rogpeppe/juju-core/156-config-error-return/+merge/135206 Requires: https://code.launchpad.net/~rogpeppe/juju-core/149-state-info-rootcert/+merge/134642 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : environs/config: error for cert not found #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+103 lines, -24 lines) Patch
A [revision details] View 1 chunk +2 lines, -0 lines 0 comments Download
M environs/config/config.go View 5 chunks +22 lines, -12 lines 2 comments Download
M environs/config/config_test.go View 4 chunks +79 lines, -12 lines 0 comments Download

Messages

Total messages: 2
rog
Please take a look.
11 years, 5 months ago (2012-11-20 18:05:59 UTC) #1
niemeyer
11 years, 5 months ago (2012-11-20 22:32:53 UTC) #2
https://codereview.appspot.com/6782094/diff/2001/environs/config/config.go
File environs/config/config.go (right):

https://codereview.appspot.com/6782094/diff/2001/environs/config/config.go#ne...
environs/config/config.go:34: var ErrDefaultCACertNotFound = errors.New("default
CA certificate not found")
s/ErrDefaultCACertNotFound/ErrNoCert/? (!)

Also, I believe this can be returned at all times, whenever we have no
certificate. We can trivially take decisions based on the availability of keys
in the map in the one place we'll care.

https://codereview.appspot.com/6782094/diff/2001/environs/config/config.go#ne...
environs/config/config.go:54: // If no CA  details are specified and no CA
certificate
Double space.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b