]> git.ipfire.org Git - thirdparty/curl.git/commit
SSL: implement public key pinning
authormoparisthebest <admin@moparisthebest.com>
Wed, 1 Oct 2014 02:31:17 +0000 (22:31 -0400)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 7 Oct 2014 12:44:19 +0000 (14:44 +0200)
commit93e450793ce289925dfd1d5e3b2d14e781f8dfd4
tree3ceea898922e067a4a692204f6388ab633deebef
parentd1b56d00439ab26d7fc43e37ab18ae331ddc400d
SSL: implement public key pinning

Option --pinnedpubkey takes a path to a public key in DER format and
only connect if it matches (currently only implemented with OpenSSL).

Provides CURLOPT_PINNEDPUBLICKEY for curl_easy_setopt().

Extract a public RSA key from a website like so:
openssl s_client -connect google.com:443 2>&1 < /dev/null | \
sed -n '/-----BEGIN/,/-----END/p' | openssl x509 -noout -pubkey \
| openssl rsa -pubin -outform DER > google.com.der
20 files changed:
docs/curl.1
docs/libcurl/opts/CURLOPT_PINNEDPUBLICKEY.3 [new file with mode: 0644]
docs/libcurl/symbols-in-versions
include/curl/curl.h
lib/strerror.c
lib/url.c
lib/urldata.h
lib/vtls/openssl.c
src/tool_cfgable.c
src/tool_cfgable.h
src/tool_getparam.c
src/tool_help.c
src/tool_operate.c
tests/certs/Server-localhost-sv.pub.der [new file with mode: 0644]
tests/certs/Server-localhost.nn-sv.pub.der [new file with mode: 0644]
tests/certs/Server-localhost0h-sv.pub.der [new file with mode: 0644]
tests/certs/scripts/genserv.sh
tests/data/Makefile.am
tests/data/test2034 [new file with mode: 0644]
tests/data/test2035 [new file with mode: 0644]