Skip to content

Commit

Permalink
Freshclam: Minor error handling improvement
Browse files Browse the repository at this point in the history
Somehow forgot to save and commit final error handling check on the new
set_tls_client_certificate() function.
This change is needed to have Freshclam fail if you try to use the new
client certificate environment variables incorrectly.
  • Loading branch information
micahsnyder committed Aug 9, 2023
1 parent 4c8f3a2 commit 17eefa5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion libfreshclam/libfreshclam_internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,10 @@ static fc_error_t create_curl_handle(
#endif

/* Authenticate using a client certificate and private key, if specified by the FRESHCLAM_CLIENT_CERT, FRESHCLAM_CLIENT_KEY, and FRESHCLAM_CLIENT_KEY_PASSWD environment variables. */
set_tls_client_certificate(curl);
if (CL_SUCCESS != set_tls_client_certificate(curl)) {
logg(LOGG_DEBUG, "create_curl_handle: Failed to set certificate and private key for client authentiation.\n");
goto done;
}

*curlHandle = curl;
status = FC_SUCCESS;
Expand Down

0 comments on commit 17eefa5

Please sign in to comment.