forked from TrueCloudLab/certificates
Fix linting errors and remove useless code
This commit is contained in:
parent
15f2935db1
commit
21baa69473
1 changed files with 8 additions and 9 deletions
|
@ -225,7 +225,11 @@ intermediate private key.`,
|
||||||
// TODO actually initialize the CA config and start listening
|
// TODO actually initialize the CA config and start listening
|
||||||
// TODO get the root cert fingerprint to post back to the onboarding guide
|
// TODO get the root cert fingerprint to post back to the onboarding guide
|
||||||
payload, err := json.Marshal(onboardingPayload{Fingerprint: "foobarbatbaz"})
|
payload, err := json.Marshal(onboardingPayload{Fingerprint: "foobarbatbaz"})
|
||||||
req, err := http.NewRequest("POST", "http://localhost:3002/onboarding/" + token, bytes.NewBuffer(payload))
|
if err != nil {
|
||||||
|
log.Fatal(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
req, err := http.NewRequest("POST", "http://localhost:3002/onboarding/"+token, bytes.NewBuffer(payload))
|
||||||
req.Header.Set("Content-Type", "application/json")
|
req.Header.Set("Content-Type", "application/json")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
|
@ -236,18 +240,13 @@ intermediate private key.`,
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
body, err = ioutil.ReadAll(resp.Body)
|
|
||||||
if err != nil {
|
|
||||||
log.Fatal(err)
|
|
||||||
}
|
|
||||||
resp.Body.Close()
|
resp.Body.Close()
|
||||||
|
|
||||||
fmt.Printf("Initialized!\n")
|
fmt.Printf("Initialized!\n")
|
||||||
fmt.Printf("Step CA has been started. Please return to the onboarding guide in your browser to continue.\n")
|
fmt.Printf("Step CA has been started. Please return to the onboarding guide in your browser to continue.\n")
|
||||||
for {
|
for {
|
||||||
time.Sleep(1 * time.Second);
|
time.Sleep(1 * time.Second)
|
||||||
}
|
}
|
||||||
return nil
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue