~dave-cheney/juju-core/057-environs-config-default-series-tests

« back to all changes in this revision

Viewing changes to state/open.go

state: add CACert to Info.

We will need to know the CA certificate when connecting to the state.

We don't make it mandatory when connecting to the state yet, because
that requires quite a few more changes, and this is a reasonable stepping
stone along the way.

R=john.meinel, niemeyer
CC=
https://codereview.appspot.com/6855054

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
 
25
25
        // UseSSH specifies whether MongoDB should be contacted through an
26
26
        // SSH tunnel.
 
27
        // TODO(rog) remove
27
28
        UseSSH bool
28
29
 
 
30
        // CACert holds the CA certificate that will be used
 
31
        // to validate the state server's certificate, in PEM format.
 
32
        CACert []byte
 
33
 
29
34
        // EntityName holds the name of the entity that is connecting.
30
35
        // It should be empty when connecting as an administrator.
31
36
        EntityName string
48
53
                fwd     *sshForwarder
49
54
                err     error
50
55
        )
 
56
        // TODO(rog) require CA cert
51
57
        if info.UseSSH {
52
58
                // TODO implement authorization on SSL connection; drop sshDial.
53
59
                if len(info.Addrs) > 1 {