Skip to content
This repository has been archived by the owner on Feb 9, 2021. It is now read-only.

Commit

Permalink
docs for configurable server name and domain
Browse files Browse the repository at this point in the history
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
  • Loading branch information
ehazlett committed Jan 7, 2015
1 parent a06eb38 commit 6d61336
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions key_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func (c *ClientKeyManager) RegisterTLSConfig(tlsConfig *tls.Config) error {
}

// NewIdentityAuthTLSConfig creates a tls.Config for the server to use for
// libtrust identity authentication
// libtrust identity authentication for the domain specified
func NewIdentityAuthTLSConfig(trustKey PrivateKey, clients *ClientKeyManager, addr string, domain string) (*tls.Config, error) {
tlsConfig := newTLSConfig()

Expand All @@ -107,7 +107,7 @@ func NewIdentityAuthTLSConfig(trustKey PrivateKey, clients *ClientKeyManager, ad
if err != nil {
return nil, err
}
// add default docker domain for docker clients to look for
// add domain that it expects clients to use
domains = append(domains, domain)
x509Cert, err := GenerateSelfSignedServerCert(trustKey, domains, ips)
if err != nil {
Expand Down
5 changes: 3 additions & 2 deletions util.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ func LoadOrCreateTrustKey(trustKeyPath string) (PrivateKey, error) {
}

// NewIdentityAuthTLSClientConfig returns a tls.Config configured to use identity
// based authentication from the specified dockerUrl and the rootConfigPath.
// based authentication from the specified dockerUrl, the rootConfigPath and
// the server name to which it is connecting.
// If trustUnknownHosts is true it will automatically add the host to the
// known-hosts.json in rootConfigPath
// known-hosts.json in rootConfigPath.
func NewIdentityAuthTLSClientConfig(dockerUrl string, trustUnknownHosts bool, rootConfigPath string, serverName string) (*tls.Config, error) {
tlsConfig := newTLSConfig()

Expand Down

0 comments on commit 6d61336

Please sign in to comment.