mirror of
https://github.com/curl/curl.git
synced 2026-08-07 01:18:49 +03:00
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
This commit is contained in:
parent
c892795ea3
commit
298d2565e2
6 changed files with 109 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue