From 0885e70ec33ad0cd35c42232cd312462dc904861 Mon Sep 17 00:00:00 2001 From: Nick Allott Date: Mon, 19 Feb 2024 14:59:54 +0000 Subject: [PATCH] Update pledge_request.cpp --- src/brski/pledge/pledge_request.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/brski/pledge/pledge_request.cpp b/src/brski/pledge/pledge_request.cpp index ec5d46f..6af1ba3 100644 --- a/src/brski/pledge/pledge_request.cpp +++ b/src/brski/pledge/pledge_request.cpp @@ -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"); @@ -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); @@ -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);