Skip to content

Commit

Permalink
Bug 1320708, strsclnt: Avoid infloop if DB is created without passwor…
Browse files Browse the repository at this point in the history
…d, r=kaie
  • Loading branch information
ueno committed Aug 23, 2017
1 parent a10cf68 commit c4a923f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cmd/strsclnt/strsclnt.c
Expand Up @@ -886,8 +886,10 @@ PRBool
LoggedIn(CERTCertificate *cert, SECKEYPrivateKey *key)
{
if ((cert->slot) && (key->pkcs11Slot) &&
(PR_TRUE == PK11_IsLoggedIn(cert->slot, NULL)) &&
(PR_TRUE == PK11_IsLoggedIn(key->pkcs11Slot, NULL))) {
(!PK11_NeedLogin(cert->slot) ||
PR_TRUE == PK11_IsLoggedIn(cert->slot, NULL)) &&
(!PK11_NeedLogin(key->pkcs11Slot) ||
PR_TRUE == PK11_IsLoggedIn(key->pkcs11Slot, NULL))) {
return PR_TRUE;
}

Expand Down

0 comments on commit c4a923f

Please sign in to comment.