@@ -205,6 +205,7 @@ int http_post_json(const char* url, const char* username,
205205 unsigned char * client_cert_compressed = NULL ;
206206 size_t dummySize = 0 ;
207207 int toReturn = -1 ;
208+ int errNum = 0 ;
208209 log_trace ("%s::%s(%d) : Initializing cURL" , LOG_INF );
209210 CURL * curl = curl_easy_init ();
210211 char errBuff [CURL_ERROR_SIZE ];
@@ -219,9 +220,8 @@ int http_post_json(const char* url, const char* username,
219220 return CURLE_FAILED_INIT ;
220221 }
221222
222- #if defined(__TPM__ )
223- if (ConfigData -> EnrollOnStartup )
224- {
223+ #if defined(__TPM__ )
224+ if (ConfigData -> EnrollOnStartup ) {
225225 log_info ("%s::%s(%d) : Skipping TPM - enroll on startup is turned on." ,
226226 LOG_INF );
227227 goto skipTPM ;
@@ -233,7 +233,7 @@ int http_post_json(const char* url, const char* username,
233233 /**************************************************************************/
234234 log_verbose ("%s::%s(%d) : Setting cURL to use TPM as SSL Engine %s" ,
235235 LOG_INF , engine_id );
236- int errNum = curl_easy_setopt (curl , CURLOPT_SSLENGINE , engine_id );
236+ errNum = curl_easy_setopt (curl , CURLOPT_SSLENGINE , engine_id );
237237 if ( CURLE_OK != errNum ) {
238238 return handle_curl_error (curl , errNum );
239239 }
@@ -256,7 +256,6 @@ int http_post_json(const char* url, const char* username,
256256 if ( CURLE_OK != errNum ) {
257257 return handle_curl_error (curl , errNum );
258258 }
259- }
260259
261260 skipTPM :
262261 #endif
0 commit comments