Change SetHTTPSPort to SetTLSPort

This commit is contained in:
xenolf 2015-12-27 18:56:36 +01:00
parent 0e857b2fef
commit 523f3eb250
2 changed files with 9 additions and 7 deletions

View file

@ -105,14 +105,16 @@ func NewClient(caDirURL string, user User, keyBits int) (*Client, error) {
// SetHTTPPort specifies a custom port to be used for HTTP based challenges.
func (c *Client) SetHTTPPort(port string) {
/*if chlng, ok := c.solvers["http-01"]; ok {
}*/
if chlng, ok := c.solvers["http-01"]; ok {
chlng.(*httpChallenge).optPort = port
}
}
// SetHTTPSPort specifies a custom port to be used for HTTPS based challenges.
func (c *Client) SetHTTPSPort(port string) {
/*if chlng, ok := c.solvers["tls-sni-01"]; ok {
}*/
// SetTLSPort specifies a custom port to be used for TLS based challenges.
func (c *Client) SetTLSPort(port string) {
if chlng, ok := c.solvers["tls-sni-01"]; ok {
chlng.(*tlsSNIChallenge).optPort = port
}
}
// ExcludeChallenges explicitly removes challenges from the pool for solving.

View file

@ -48,7 +48,7 @@ func setup(c *cli.Context) (*Configuration, *Account, *acme.Client) {
}
if c.GlobalIsSet("tlsPort") {
client.SetHTTPPort(c.GlobalString("tlsPort"))
client.SetTLSPort(c.GlobalString("tlsPort"))
}
return conf, acc, client