diff options
author | Anderson Toshiyuki Sasaki <ansasaki@redhat.com> | 2018-02-19 14:31:06 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2018-08-08 09:46:01 +0200 |
commit | 298d2565e2a2f06a859b7f5a1cc24ba7c87a8ce2 (patch) | |
tree | d6c7b12308a7d3617d6843297168c2e6a42d7578 /src/tool_getparam.c | |
parent | c892795ea3601a6d210a325b2ac566b1c30d3334 (diff) | |
download | curl-298d2565e2a2f06a859b7f5a1cc24ba7c87a8ce2.tar.gz |
ssl: set engine implicitly when a PKCS#11 URI is provided
This allows the use of PKCS#11 URI for certificates and keys without
setting the corresponding type as "ENG" and the engine as "pkcs11"
explicitly. If a PKCS#11 URI is provided for certificate, key,
proxy_certificate or proxy_key, the corresponding type is set as "ENG"
if not provided and the engine is set to "pkcs11" if not provided.
Acked-by: Nikos Mavrogiannopoulos
Closes #2333
Diffstat (limited to 'src/tool_getparam.c')
-rw-r--r-- | src/tool_getparam.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tool_getparam.c b/src/tool_getparam.c index e42a894cb..1a81c3803 100644 --- a/src/tool_getparam.c +++ b/src/tool_getparam.c @@ -342,7 +342,7 @@ void parse_cert_parameter(const char *cert_parameter, * looks like a RFC7512 PKCS#11 URI which can be used as-is. * Also if cert_parameter contains no colon nor backslash, this * means no passphrase was given and no characters escaped */ - if(!strncmp(cert_parameter, "pkcs11:", 7) || + if(curl_strnequal(cert_parameter, "pkcs11:", 7) || !strpbrk(cert_parameter, ":\\")) { *certname = strdup(cert_parameter); return; |