Skip to content

Commit 17eefa5

Browse files
committed
Freshclam: Minor error handling improvement
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.
1 parent 4c8f3a2 commit 17eefa5

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

libfreshclam/libfreshclam_internal.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,10 @@ static fc_error_t create_curl_handle(
732732
#endif
733733

734734
/* 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. */
735-
set_tls_client_certificate(curl);
735+
if (CL_SUCCESS != set_tls_client_certificate(curl)) {
736+
logg(LOGG_DEBUG, "create_curl_handle: Failed to set certificate and private key for client authentiation.\n");
737+
goto done;
738+
}
736739

737740
*curlHandle = curl;
738741
status = FC_SUCCESS;

0 commit comments

Comments
 (0)