Allow to use client authentication with certificate in freshclam#955
Conversation
08ae1bc to
13e3b23
Compare
13e3b23 to
ca335f9
Compare
|
Apologies for the delay in reviewing this. This change look very straightforward. Some issues that I've taken on with the commit I just pushed:
I believe this works, and could be tested like so, if your FRESHCLAM_CLIENT_CERT="/home/micah/client_certificate.pem" FRESHCLAM_CLIENT_KEY="/home/micah/client_private_key.pem" FRESHCLAM_CLIENT_KEY_PASSWD="testtest" ./install/bin/freshclamWindows powershell: $env:FRESHCLAM_CLIENT_CERT="C:\Users\micah\.ssh\client_certificate.pem" & $env:FRESHCLAM_CLIENT_KEY="C:\Users\micah\.ssh\client_private_key.pem" & .\install\freshclam.exeI don't have such a server and am uncertain how to quickly set one up. |
Also: - Rename to use FRESHCLAM_CLIENT_CERT, FRESHCLAM_CLIENT_KEY instead prefixing with "CURL_". Unlike CURL_CA_BUNDLE, these variable names are not used by the `curl` program and so do not piggyback on that existing functionality. - Add FRESHCLAM_CLIENT_KEY_PASSWD environment variable to support password protected private key PEM files, as described in: https://curl.se/libcurl/c/CURLOPT_SSLCERT.html - Document the new environment variable options in the manpage and in the `freshclam --help` message. Also add missing documentation in the freshclam and clamsubmit help-messages for CURL_CA_BUNDLE. - Update the NEWS.md file to credit jedrzej for the new feature.
5413c54 to
3f3382b
Compare
val-ms
left a comment
There was a problem hiding this comment.
Had a bit of a hiccup this morning with our Jenkins. It's fixed now and this ran through okay, not that I expected any differently. Perhaps we could set up a test some time that makes use of this feature, but in the meantime I'm going to trust that it works okay base don the limited testing I did, and happy that it isn't causing any problems.
This PR adds the possibility to define certificate and private key for client authentication in freshclam when using private repo. Certificate and key paths are read from environment variables and passed on to libcurl, similarly to the CA bundle.