Make the CA URL accept /directory. #23
This commit is contained in:
parent
959cf005c7
commit
b958bd2da4
1 changed files with 5 additions and 3 deletions
|
@ -75,10 +75,12 @@ func NewClient(caURL string, usr User, keyBits int, optPort string) (*Client, er
|
|||
solvers := make(map[string]solver)
|
||||
solvers["simpleHttp"] = &simpleHTTPChallenge{jws: jws, optPort: optPort}
|
||||
|
||||
dirURL := caURL + "/directory"
|
||||
dirResp, err := http.Get(dirURL)
|
||||
if !strings.HasSuffix(caURL, "/directory") {
|
||||
caURL = caURL + "/directory"
|
||||
}
|
||||
dirResp, err := http.Get(caURL)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("get directory at '%s': %v", dirURL, err)
|
||||
return nil, fmt.Errorf("get directory at '%s': %v", caURL, err)
|
||||
}
|
||||
defer dirResp.Body.Close()
|
||||
|
||||
|
|
Loading…
Reference in a new issue