Skip to content

Commit

Permalink
Update pledge_request.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
nallott authored Feb 19, 2024
1 parent 585badf commit 0885e70
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/brski/pledge/pledge_request.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ int post_voucher_pledge_request(struct pledge_config *pconf,
log_error("https_post_request fail");
return -1;
}

/* parse the certificate into a buffer */
if ((registrar_tls_cert = crypto_cert2buf(http_res.peer_certificate)) ==
NULL) {
log_error("crypto_cert2buf fail");
Expand All @@ -77,6 +77,7 @@ int post_voucher_pledge_request(struct pledge_config *pconf,

crypto_free_certcontext(http_res.peer_certificate);

/* create the voucher request and packate up for the reset API */
char *cms = voucher_pledge_request_to_base64(pconf, registrar_tls_cert);
free_binary_array(registrar_tls_cert);

Expand All @@ -90,7 +91,7 @@ int post_voucher_pledge_request(struct pledge_config *pconf,
sys_free(cms);

log_info("Request pledge voucher from %s", path.c_str());

/* this bit posts teh */
status = https_post_request(pconf->idevid_key_path, pconf->idevid_cert_path,
rconf->bind_address, rconf->port, path, false,
body, content_type, http_res);
Expand Down

0 comments on commit 0885e70

Please sign in to comment.