Skip to content

Commit

Permalink
Attempt to unwrap getCa response
Browse files Browse the repository at this point in the history
  • Loading branch information
deedubs committed Sep 13, 2018
1 parent 02f0900 commit cf9377a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,14 @@ func (c Client) FetchCa() ([]byte, error) {
return nil, err
}

return resp.Payload, nil
caResp := sign.Response{}

err = json.Unmarshal(resp.Payload, &caResp)
if err != nil {
return nil, err
}

return caResp.Certificate, nil
}

//RequestCertificate Request a signed certificate
Expand Down

0 comments on commit cf9377a

Please sign in to comment.