mirror of
https://github.com/moparisthebest/curl
synced 2024-12-23 08:38:49 -05:00
nss: inspect returnvalue of token check
PK11_IsPresent() checks for the token for the given slot is available, and sets needlogin flags for the PK11_Authenticate() call. Should it return false, we should however treat it as an error and bail out. Closes https://github.com/curl/curl/pull/4110
This commit is contained in:
parent
c7f3c073f4
commit
e5b371dc51
@ -691,7 +691,10 @@ static CURLcode nss_load_key(struct connectdata *conn, int sockindex,
|
||||
tmp = SECMOD_WaitForAnyTokenEvent(pem_module, 0, 0);
|
||||
if(tmp)
|
||||
PK11_FreeSlot(tmp);
|
||||
PK11_IsPresent(slot);
|
||||
if(!PK11_IsPresent(slot)) {
|
||||
PK11_FreeSlot(slot);
|
||||
return CURLE_SSL_CERTPROBLEM;
|
||||
}
|
||||
|
||||
status = PK11_Authenticate(slot, PR_TRUE, SSL_SET_OPTION(key_passwd));
|
||||
PK11_FreeSlot(slot);
|
||||
|
Loading…
Reference in New Issue
Block a user