Skip to content

Commit

Permalink
Only fall back to email search if the "nickname" has an @ character. …
Browse files Browse the repository at this point in the history
…This is because email searches will not go through the cache, so should be avoided if possible.
  • Loading branch information
ian.mcgreer%sun.com committed Apr 19, 2002
1 parent 0d82f84 commit 658362e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion security/nss/lib/pk11wrap/pk11cert.c
Expand Up @@ -1280,7 +1280,9 @@ PK11_FindCertFromNickname(char *nickname, void *wincx) {
nssPKIObjectCollection_AddInstances(collection, instances, 0);
nss_ZFreeIf(instances);
/* if it wasn't found, repeat the process for email address */
if (nssPKIObjectCollection_Count(collection) == 0) {
if (nssPKIObjectCollection_Count(collection) == 0 &&
PORT_Strchr(nickname, '@') != NULL)
{
(void)nssTrustDomain_GetCertsForEmailAddressFromCache(defaultTD,
nickname,
certList);
Expand Down

0 comments on commit 658362e

Please sign in to comment.