create a common name for autoTLS agent certs

This commit is contained in:
tradel 2019-08-27 14:15:53 -07:00
parent 82544b64e5
commit 1acde6e30a
1 changed files with 2 additions and 1 deletions

View File

@ -65,7 +65,8 @@ func (c *Client) RequestAutoEncryptCerts(servers []string, port int, token strin
} }
// Create a CSR. // Create a CSR.
csr, err := connect.CreateCSR(id, pk) commonName := fmt.Sprintf("%s.agent.%s.%s", id.Agent, id.Datacenter, c.config.Domain)
csr, err := connect.CreateCSR(id, commonName, pk)
if err != nil { if err != nil {
return errFn(err) return errFn(err)
} }