1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-10 19:45:04 -05:00
Go to file
David Woodhouse 01f69232b0 curl: allow "pkcs11:" prefix for client certificates
RFC7512 provides a standard method to reference certificates in PKCS#11
tokens, by means of a URI starting 'pkcs11:'.

We're working on fixing various applications so that whenever they would
have been able to use certificates from a file, users can simply insert
a PKCS#11 URI instead and expect it to work. This expectation is now a
part of the Fedora packaging guidelines, for example.

This doesn't work with cURL because of the way that the colon is used
to separate the certificate argument from the passphrase. So instead of

   curl -E 'pkcs11:manufacturer=piv_II;id=%01' …

I instead need to invoke cURL with the colon escaped, like this:

   curl -E 'pkcs11\:manufacturer=piv_II;id=%01' …

This is suboptimal because we want *consistency* — the URI should be
usable in place of a filename anywhere, without having strange
differences for different applications.

This patch therefore disables the processing in parse_cert_parameter()
when the string starts with 'pkcs11:'. It means you can't pass a
passphrase with an unescaped PKCS#11 URI, but there's no need to do so
because RFC7512 allows a PIN to be given as a 'pin-value' attribute in
the URI itself.

Also, if users are already using RFC7512 URIs with the colon escaped as
in the above example — even providing a passphrase for cURL to handling
instead of using a pin-value attribute, that will continue to work
because their string will start 'pkcs11\:' and won't match the check.

What *does* break with this patch is the extremely unlikely case that a
user has a file which is in the local directory and literally named
just "pkcs11", and they have a passphrase on it. If that ever happened,
the user would need to refer to it as './pkcs11:<passphrase>' instead.
2016-08-17 11:35:16 +02:00
.github CONTRIBUTING.md: fix links 2016-02-18 11:59:17 +01:00
CMake URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
docs CURLOPT_PROXY.3: unsupported schemes cause errors now 2016-08-15 14:49:26 +02:00
include curl.h: make CURL_NO_OLDIES define CURL_STRICTER 2016-08-09 14:46:51 +02:00
lib nss: make the global variables static 2016-08-17 10:50:06 +02:00
m4 curl-compilers.m4: improve detection of GCC's -fvisibility= flag 2016-06-21 12:58:24 +02:00
packages os400: define BUILDING_LIBCURL in make script. 2016-08-02 14:21:31 +02:00
projects README: Mention wolfSSL in the 'Dependencies' section 2016-07-23 21:34:46 +01:00
scripts contrithanks.sh: exclude existing names case insensitively 2016-05-23 10:07:48 +02:00
src curl: allow "pkcs11:" prefix for client certificates 2016-08-17 11:35:16 +02:00
tests proxy: fix tests as follow-up to 93b0d907d5 2016-08-16 10:15:26 +02:00
winbuild winbuild: Allow changing C compiler via environment variable CC (#952) 2016-08-09 21:27:36 +02:00
.dir-locals.el Add .dir-locals and set c-basic-offset to 2. 2015-12-23 10:16:14 +01:00
.gitattributes Tell git to not convert configure-related files. 2012-07-17 20:35:23 +02:00
.gitignore build: Install zsh completion 2015-11-24 22:22:01 +01:00
.travis.yml travis: removed option to rebuild autotool from source 2016-08-03 13:25:32 +02:00
acinclude.m4 acinclude.m4: improve autodetection of CA bundle on FreeBSD 2016-06-27 11:42:43 +02:00
appveyor.yml Appveyor: Updates for options - CURL_STATICLIB/BUILD_TESTING 2016-07-01 09:53:22 +02:00
buildconf URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
buildconf.bat dist: ship buildconf.bat too 2016-02-12 16:45:25 +01:00
CHANGES URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
CHANGES.0 URLs: change more http to https 2016-02-04 18:46:54 -05:00
CMakeLists.txt cmake: Enable win32 threaded resolver by default 2016-08-08 02:37:29 -04:00
configure.ac configure.ac: add zlib search with pkg-config 2016-08-12 08:22:58 +02:00
COPYING COPYING: clarify that Daniel is not the sole author 2016-02-06 18:40:27 +01:00
CTestConfig.cmake ENH: move dashboard location 2009-07-15 19:40:46 +00:00
curl-config.in URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
GIT-INFO curl tool: renaming hugehelp files to tool_hugehelp 2012-12-26 23:30:54 +01:00
libcurl.pc.in URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
MacOSX-Framework MacOSX-Framework: sdk regex fix for sdk 10.10 and later 2015-10-25 12:35:49 +01:00
Makefile.am build: include scripts/ in the dist 2016-04-09 23:44:53 +02:00
Makefile.dist URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
maketgz maketgz: add -j to make dist 2016-03-22 10:35:22 +01:00
README URLs: follow GitHub project rename (also Travis CI) 2016-02-04 23:01:38 +01:00
README.md README.md: add our CII Best Practices badge 2016-08-15 11:15:01 +02:00
RELEASE-NOTES RELEASE-NOTES: synced with b7ee5316c2 2016-08-15 08:47:21 +02:00

curl logo CII Best Practices

Curl is a command-line tool for transferring data specified with URL syntax. Find out how to use curl by reading the curl.1 man page or the MANUAL document. Find out how to install Curl by reading the INSTALL document.

libcurl is the library curl is using to do its job. It is readily available to be used by your software. Read the libcurl.3 man page to learn how!

You find answers to the most frequent questions we get in the FAQ document.

Study the COPYING file for distribution terms and similar. If you distribute curl binaries or other binaries that involve libcurl, you might enjoy the LICENSE-MIXING document.

Contact

If you have problems, questions, ideas or suggestions, please contact us by posting to a suitable mailing list.

All contributors to the project are listed in the THANKS document.

Website

Visit the curl web site for the latest news and downloads.

Git

To download the very latest source off the Git server do this:

git clone https://github.com/curl/curl.git

(you'll get a directory named curl created, filled with the source code)

Notice

Curl contains pieces of source code that is Copyright (c) 1998, 1999 Kungliga Tekniska Högskolan. This notice is included here to comply with the distribution terms.