curl/lib/vtls
Dustin Howett 1027d52e7d schannel: when importing PFX, disable key persistence
By default, the PFXImportCertStore API persists the key in the user's
key store (as though the certificate was being imported for permanent,
ongoing use.)

The documentation specifies that keys that are not to be persisted
should be imported with the flag PKCS12_NO_PERSIST_KEY.
NOTE: this flag is only supported on versions of Windows newer than XP
and Server 2003.

--

This is take 2 of the original fix. It extends the lifetime of the
client certificate store to that of the credential handle. The original
fix which landed in 70d010d and was later reverted in aec8d30 failed to
work properly because it did not do that.

Minor changes were made to the schannel credential context to support
closing the client certificate store handle at the end of an SSL session.

--

Reported-by: ShadowZzj@users.noreply.github.com

Fixes https://github.com/curl/curl/issues/9300
Supersedes https://github.com/curl/curl/pull/9363
Closes https://github.com/curl/curl/pull/9460
2022-10-11 04:04:54 -04:00
..
bearssl.c bearssl: make it proper C89 compliant 2022-09-23 08:27:50 +02:00
bearssl.h copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
gskit.c copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
gskit.h copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
gtls.c http, vauth: always provide Curl_allow_auth_to_host() functionality 2022-09-27 14:05:37 +02:00
gtls.h copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
hostcheck.c copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
hostcheck.h copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
keylog.c lib and tests: add missing curl.h includes 2022-09-12 09:41:47 +02:00
keylog.h copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
mbedtls_threadlock.c copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
mbedtls_threadlock.h copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
mbedtls.c NPN: remove support for and use of 2022-09-05 07:39:02 +02:00
mbedtls.h copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
nss.c misc: ISSPACE() => ISBLANK() 2022-09-06 08:34:30 +02:00
nssg.h copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
openssl.c http, vauth: always provide Curl_allow_auth_to_host() functionality 2022-09-27 14:05:37 +02:00
openssl.h openssl: make certinfo available for QUIC 2022-09-27 14:02:27 +02:00
rustls.c NPN: remove support for and use of 2022-09-05 07:39:02 +02:00
rustls.h copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
schannel_verify.c copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
schannel.c schannel: when importing PFX, disable key persistence 2022-10-11 04:04:54 -04:00
schannel.h schannel: when importing PFX, disable key persistence 2022-10-11 04:04:54 -04:00
sectransp.c NPN: remove support for and use of 2022-09-05 07:39:02 +02:00
sectransp.h copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
vtls.c strcase: add and use Curl_timestrcmp 2022-10-08 11:50:47 +02:00
vtls.h vtls: make Curl_ssl_backend() return the enum type curl_sslbackend 2022-07-23 13:38:33 +02:00
wolfssl.c wolfSSL: fix session management bug. 2022-09-13 10:15:40 +02:00
wolfssl.h copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
x509asn1.c ctype: remove all use of <ctype.h>, use our own versions 2022-09-06 08:32:36 +02:00
x509asn1.h copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00