Commit 6823c241 authored by Ryan's avatar Ryan Committed by Commit Bot

Avoid risky casts with NSS PIN prompts

Avoid risky casts between void* and object pointers
by using the wincx method on the
CryptoModuleBlockingPasswordDelegate. While safety
was assured by virtue of being passed as a
scoped_refptr<> to the appropriate base class,
consistently use the wincx() method of the password
delegate so that safety can be reasoned about from
the callsite, rather than inferred from the type.

BUG=none

Change-Id: I120584dd5a62d1533689871f4a207f7205c6ada7
Reviewed-on: https://chromium-review.googlesource.com/c/1309097Reviewed-by: default avatarDavid Benjamin <davidben@chromium.org>
Commit-Queue: Ryan Sleevi <rsleevi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604091}
parent 0d6cfa24
......@@ -169,9 +169,9 @@ void ClientCertStoreNSS::GetPlatformCertsOnWorkerThread(
ClientCertIdentityList* identities) {
crypto::EnsureNSSInit();
CERTCertList* found_certs =
CERT_FindUserCertsByUsage(CERT_GetDefaultCertDB(), certUsageSSLClient,
PR_FALSE, PR_FALSE, password_delegate.get());
CERTCertList* found_certs = CERT_FindUserCertsByUsage(
CERT_GetDefaultCertDB(), certUsageSSLClient, PR_FALSE, PR_FALSE,
password_delegate ? password_delegate->wincx() : nullptr);
if (!found_certs) {
DVLOG(2) << "No client certs found.";
return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment