curl 7.39.0 and later support --pinnedpubkey - if compiled to use OpenSSL library. As far as I can see this is the only cli download utility which is capable of certificate pinning at all so it would be really good to have that functionality.
more details: http://curl.haxx.se/libcurl/c/CURLOPT_PINNEDPUBLICKEY.html <<This is currently only implemented in the OpenSSL, GnuTLS and GSKit backends. Added in libcurl 7.39.0 >>
I am not sure whether NSS API is ready for this. I can see it is already implemented in Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=744204 https://bugzilla.mozilla.org/show_bug.cgi?id=787133 ... but curl might be too low-level of a tool to gain anything from the Firefox implementation.
Are we stuck with NSS?
(In reply to Richard Z. from comment #3) > Are we stuck with NSS? libcurl was ported to NSS as part of the Fedora Crypto Consolidation project: http://fedoraproject.org/wiki/FedoraCryptoConsolidation We have put a lot of effort to make it stable and feature-complete. If there is a requirement for the public key pinning, it is a reason to write a patch, not a reason to switch the backend IMO. But you are free to recompile libcurl against OpenSSL or GnuTLS on your own...
patch sent upstream: http://article.gmane.org/gmane.comp.web.curl.library/45293
upstream commit: https://github.com/bagder/curl/commit/b47c17d6
fixed in curl-7.42.0-1.fc23
curl-7.40.0-5.fc22 has been submitted as an update for Fedora 22. https://admin.fedoraproject.org/updates/curl-7.40.0-5.fc22
Package curl-7.40.0-5.fc22: * should fix your issue, * was pushed to the Fedora 22 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing curl-7.40.0-5.fc22' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2015-10155/curl-7.40.0-5.fc22 then log in and leave karma (feedback).
curl-7.40.0-5.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.