Back to index

lightning-sunbird  0.9+nobinonly
Classes | Typedefs | Functions | Variables
pkistore.c File Reference
#include "pkim.h"
#include "pki.h"
#include "nsspki.h"
#include "base.h"
#include "pkistore.h"

Go to the source code of this file.

Classes

struct  nssCertificateStoreStr
struct  certificate_hash_entry_str
struct  nickname_template_str
struct  email_template_str

Typedefs

typedef struct certificate_hash_entry_str

Functions

static NSSCertificate * nssCertStore_FindCertByIssuerAndSerialNumberLocked (nssCertificateStore *store, NSSDER *issuer, NSSDER *serial)
NSS_IMPLEMENT nssCertificateStore * nssCertificateStore_Create (NSSArena *arenaOpt)
NSS_IMPLEMENT PRStatus nssCertificateStore_Destroy (nssCertificateStore *store)
static PRStatus add_certificate_entry (nssCertificateStore *store, NSSCertificate *cert)
static PRStatus add_subject_entry (nssCertificateStore *store, NSSCertificate *cert)
static void remove_certificate_entry (nssCertificateStore *store, NSSCertificate *cert)
static PRStatus nssCertificateStore_AddLocked (nssCertificateStore *store, NSSCertificate *cert)
NSS_IMPLEMENT NSSCertificate * nssCertificateStore_FindOrAdd (nssCertificateStore *store, NSSCertificate *c)
static void remove_subject_entry (nssCertificateStore *store, NSSCertificate *cert)
NSS_IMPLEMENT void nssCertificateStore_RemoveCertLOCKED (nssCertificateStore *store, NSSCertificate *cert)
NSS_IMPLEMENT void nssCertificateStore_Lock (nssCertificateStore *store, nssCertificateStoreTrace *out)
NSS_IMPLEMENT void nssCertificateStore_Unlock (nssCertificateStore *store, nssCertificateStoreTrace *in, nssCertificateStoreTrace *out)
static NSSCertificate ** get_array_from_list (nssList *certList, NSSCertificate *rvOpt[], PRUint32 maximumOpt, NSSArena *arenaOpt)
NSS_IMPLEMENT NSSCertificate ** nssCertificateStore_FindCertificatesBySubject (nssCertificateStore *store, NSSDER *subject, NSSCertificate *rvOpt[], PRUint32 maximumOpt, NSSArena *arenaOpt)
static void match_nickname (const void *k, void *v, void *a)
NSS_IMPLEMENT NSSCertificate ** nssCertificateStore_FindCertificatesByNickname (nssCertificateStore *store, NSSUTF8 *nickname, NSSCertificate *rvOpt[], PRUint32 maximumOpt, NSSArena *arenaOpt)
static void match_email (const void *k, void *v, void *a)
NSS_IMPLEMENT NSSCertificate ** nssCertificateStore_FindCertificatesByEmail (nssCertificateStore *store, NSSASCII7 *email, NSSCertificate *rvOpt[], PRUint32 maximumOpt, NSSArena *arenaOpt)
NSS_IMPLEMENT NSSCertificate * nssCertificateStore_FindCertificateByIssuerAndSerialNumber (nssCertificateStore *store, NSSDER *issuer, NSSDER *serial)
NSS_IMPLEMENT NSSCertificate * nssCertificateStore_FindCertificateByEncodedCertificate (nssCertificateStore *store, NSSDER *encoding)
NSS_EXTERN PRStatus nssCertificateStore_AddTrust (nssCertificateStore *store, NSSTrust *trust)
NSS_IMPLEMENT NSSTrust * nssCertificateStore_FindTrustForCertificate (nssCertificateStore *store, NSSCertificate *cert)
NSS_EXTERN PRStatus nssCertificateStore_AddSMIMEProfile (nssCertificateStore *store, nssSMIMEProfile *profile)
NSS_IMPLEMENT nssSMIMEProfile * nssCertificateStore_FindSMIMEProfileForCertificate (nssCertificateStore *store, NSSCertificate *cert)
static PLHashNumber nss_certificate_hash (const void *key)
static int nss_compare_certs (const void *v1, const void *v2)
NSS_IMPLEMENT nssHash * nssHash_CreateCertificate (NSSArena *arenaOpt, PRUint32 numBuckets)
NSS_IMPLEMENT void nssCertificateStore_DumpStoreInfo (nssCertificateStore *store, void(*cert_dump_iter)(const void *, void *, void *), void *arg)

Variables

const NSSError NSS_ERROR_BUSY

Class Documentation

struct nssCertificateStoreStr

Definition at line 72 of file pkistore.c.

Class Members
NSSArena * arena
PRBool i_alloced_arena
nssHash * issuer_and_serial
PZLock * lock
nssHash * subject
struct certificate_hash_entry_str

Definition at line 83 of file pkistore.c.

Class Members
NSSCertificate * cert
nssSMIMEProfile * profile
NSSTrust * trust
struct nickname_template_str

Definition at line 437 of file pkistore.c.

Class Members
NSSUTF8 * nickname
nssList * subjectList
struct email_template_str

Definition at line 486 of file pkistore.c.

Class Members
NSSASCII7 * email
nssList * emailList

Typedef Documentation

Definition at line 83 of file pkistore.c.


Function Documentation

static PRStatus add_certificate_entry ( nssCertificateStore *  store,
NSSCertificate *  cert 
) [static]

Definition at line 180 of file pkistore.c.

{
    PRStatus nssrv;
    certificate_hash_entry *entry;
    entry = nss_ZNEW(cert->object.arena, certificate_hash_entry);
    if (!entry) {
       return PR_FAILURE;
    }
    entry->cert = cert;
    nssrv = nssHash_Add(store->issuer_and_serial, cert, entry);
    if (nssrv != PR_SUCCESS) {
       nss_ZFreeIf(entry);
    }
    return nssrv;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static PRStatus add_subject_entry ( nssCertificateStore *  store,
NSSCertificate *  cert 
) [static]

Definition at line 200 of file pkistore.c.

{
    PRStatus nssrv;
    nssList *subjectList;
    subjectList = (nssList *)nssHash_Lookup(store->subject, &cert->subject);
    if (subjectList) {
       /* The subject is already in, add this cert to the list */
       nssrv = nssList_AddUnique(subjectList, cert);
    } else {
       /* Create a new subject list for the subject */
       subjectList = nssList_Create(NULL, PR_FALSE);
       if (!subjectList) {
           return PR_FAILURE;
       }
       nssList_SetSortFunction(subjectList, nssCertificate_SubjectListSort);
       /* Add the cert entry to this list of subjects */
       nssrv = nssList_Add(subjectList, cert);
       if (nssrv != PR_SUCCESS) {
           return nssrv;
       }
       /* Add the subject list to the cache */
       nssrv = nssHash_Add(store->subject, &cert->subject, subjectList);
    }
    return nssrv;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static NSSCertificate** get_array_from_list ( nssList *  certList,
NSSCertificate *  rvOpt[],
PRUint32  maximumOpt,
NSSArena *  arenaOpt 
) [static]

Definition at line 379 of file pkistore.c.

{
    PRUint32 count;
    NSSCertificate **rvArray = NULL;
    count = nssList_Count(certList);
    if (count == 0) {
       return NULL;
    }
    if (maximumOpt > 0) {
       count = PR_MIN(maximumOpt, count);
    }
    if (rvOpt) {
       nssList_GetArray(certList, (void **)rvOpt, count);
    } else {
       rvArray = nss_ZNEWARRAY(arenaOpt, NSSCertificate *, count + 1);
       if (rvArray) {
           nssList_GetArray(certList, (void **)rvArray, count);
       }
    }
    return rvArray;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void match_email ( const void k,
void v,
void a 
) [static]

Definition at line 494 of file pkistore.c.

{
    PRStatus nssrv;
    NSSCertificate *c;
    nssList *subjectList = (nssList *)v;
    struct email_template_str *et = (struct email_template_str *)a;
    nssrv = nssList_GetArray(subjectList, (void **)&c, 1);
    if (nssrv == PR_SUCCESS && 
         nssUTF8_Equal(c->email, et->email, &nssrv)) 
    {
       nssListIterator *iter = nssList_CreateIterator(subjectList);
       if (iter) {
           for (c  = (NSSCertificate *)nssListIterator_Start(iter);
                c != (NSSCertificate *)NULL;
                c  = (NSSCertificate *)nssListIterator_Next(iter))
           {
              nssList_Add(et->emailList, c);
           }
           nssListIterator_Finish(iter);
           nssListIterator_Destroy(iter);
       }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void match_nickname ( const void k,
void v,
void a 
) [static]

Definition at line 445 of file pkistore.c.

{
    PRStatus nssrv;
    NSSCertificate *c;
    NSSUTF8 *nickname;
    nssList *subjectList = (nssList *)v;
    struct nickname_template_str *nt = (struct nickname_template_str *)a;
    nssrv = nssList_GetArray(subjectList, (void **)&c, 1);
    nickname = nssCertificate_GetNickname(c, NULL);
    if (nssrv == PR_SUCCESS && nickname &&
         nssUTF8_Equal(nickname, nt->nickname, &nssrv)) 
    {
       nt->subjectList = subjectList;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static PLHashNumber nss_certificate_hash ( const void key) [static]

Definition at line 721 of file pkistore.c.

{
    unsigned int i;
    PLHashNumber h;
    NSSCertificate *c = (NSSCertificate *)key;
    h = 0;
    for (i=0; i<c->issuer.size; i++)
       h = (h >> 28) ^ (h << 4) ^ ((unsigned char *)c->issuer.data)[i];
    for (i=0; i<c->serial.size; i++)
       h = (h >> 28) ^ (h << 4) ^ ((unsigned char *)c->serial.data)[i];
    return h;
}

Here is the caller graph for this function:

static int nss_compare_certs ( const void v1,
const void v2 
) [static]

Definition at line 737 of file pkistore.c.

{
    PRStatus ignore;
    NSSCertificate *c1 = (NSSCertificate *)v1;
    NSSCertificate *c2 = (NSSCertificate *)v2;
    return (int)(nssItem_Equal(&c1->issuer, &c2->issuer, &ignore) &&
                 nssItem_Equal(&c1->serial, &c2->serial, &ignore));
}

Here is the call graph for this function:

Here is the caller graph for this function:

static PRStatus nssCertificateStore_AddLocked ( nssCertificateStore *  store,
NSSCertificate *  cert 
) [static]

Definition at line 238 of file pkistore.c.

{
    PRStatus nssrv = add_certificate_entry(store, cert);
    if (nssrv == PR_SUCCESS) {
       nssrv = add_subject_entry(store, cert);
       if (nssrv == PR_FAILURE) {
           remove_certificate_entry(store, cert);
       }
    }
    return nssrv;
}

Here is the call graph for this function:

Here is the caller graph for this function:

NSS_EXTERN PRStatus nssCertificateStore_AddSMIMEProfile ( nssCertificateStore *  store,
nssSMIMEProfile *  profile 
)

Definition at line 682 of file pkistore.c.

{
    NSSCertificate *cert;
    certificate_hash_entry *entry;
    cert = profile->certificate;
    PZ_Lock(store->lock);
    entry = (certificate_hash_entry *)
                              nssHash_Lookup(store->issuer_and_serial, cert);
    if (entry) {
       entry->profile = nssSMIMEProfile_AddRef(profile);
    }
    PZ_Unlock(store->lock);
    return (entry) ? PR_SUCCESS : PR_FAILURE;
}

Here is the call graph for this function:

NSS_EXTERN PRStatus nssCertificateStore_AddTrust ( nssCertificateStore *  store,
NSSTrust *  trust 
)

Definition at line 645 of file pkistore.c.

{
    NSSCertificate *cert;
    certificate_hash_entry *entry;
    cert = trust->certificate;
    PZ_Lock(store->lock);
    entry = (certificate_hash_entry *)
                              nssHash_Lookup(store->issuer_and_serial, cert);
    if (entry) {
       entry->trust = nssTrust_AddRef(trust);
    }
    PZ_Unlock(store->lock);
    return (entry) ? PR_SUCCESS : PR_FAILURE;
}

Here is the call graph for this function:

NSS_IMPLEMENT nssCertificateStore* nssCertificateStore_Create ( NSSArena *  arenaOpt)

Definition at line 101 of file pkistore.c.

{
    NSSArena *arena;
    nssCertificateStore *store;
    PRBool i_alloced_arena;
    if (arenaOpt) {
       arena = arenaOpt;
       i_alloced_arena = PR_FALSE;
    } else {
       arena = nssArena_Create();
       if (!arena) {
           return NULL;
       }
       i_alloced_arena = PR_TRUE;
    }
    store = nss_ZNEW(arena, nssCertificateStore);
    if (!store) {
       goto loser;
    }
    store->lock = PZ_NewLock(nssILockOther);
    if (!store->lock) {
       goto loser;
    }
    /* Create the issuer/serial --> {cert, trust, S/MIME profile } hash */
    store->issuer_and_serial = nssHash_CreateCertificate(arena, 0);
    if (!store->issuer_and_serial) {
       goto loser;
    }
    /* Create the subject DER --> subject list hash */
    store->subject = nssHash_CreateItem(arena, 0);
    if (!store->subject) {
       goto loser;
    }
    store->arena = arena;
    store->i_alloced_arena = i_alloced_arena;
    return store;
loser:
    if (store) {
       if (store->lock) {
           PZ_DestroyLock(store->lock);
       }
       if (store->issuer_and_serial) {
           nssHash_Destroy(store->issuer_and_serial);
       }
       if (store->subject) {
           nssHash_Destroy(store->subject);
       }
    }
    if (i_alloced_arena) {
       nssArena_Destroy(arena);
    }
    return NULL;
}

Here is the call graph for this function:

NSS_IMPLEMENT PRStatus nssCertificateStore_Destroy ( nssCertificateStore *  store)

Definition at line 160 of file pkistore.c.

{
    if (nssHash_Count(store->issuer_and_serial) > 0) {
       nss_SetError(NSS_ERROR_BUSY);
       return PR_FAILURE;
    }
    PZ_DestroyLock(store->lock);
    nssHash_Destroy(store->issuer_and_serial);
    nssHash_Destroy(store->subject);
    if (store->i_alloced_arena) {
       nssArena_Destroy(store->arena);
    } else {
       nss_ZFreeIf(store);
    }
    return PR_SUCCESS;
}

Here is the call graph for this function:

NSS_IMPLEMENT void nssCertificateStore_DumpStoreInfo ( nssCertificateStore *  store,
void(*)(const void *, void *, void *)  cert_dump_iter,
void arg 
)

Definition at line 760 of file pkistore.c.

{
    PZ_Lock(store->lock);
    nssHash_Iterate(store->issuer_and_serial, cert_dump_iter, arg);
    PZ_Unlock(store->lock);
}

Here is the call graph for this function:

NSS_IMPLEMENT NSSCertificate* nssCertificateStore_FindCertificateByEncodedCertificate ( nssCertificateStore *  store,
NSSDER encoding 
)

Definition at line 620 of file pkistore.c.

{
    PRStatus nssrv = PR_FAILURE;
    NSSDER issuer, serial;
    NSSCertificate *rvCert = NULL;
#ifdef NSS_3_4_CODE
    nssrv = issuer_and_serial_from_encoding(encoding, &issuer, &serial);
#endif
    if (nssrv != PR_SUCCESS) {
       return NULL;
    }
    rvCert = nssCertificateStore_FindCertificateByIssuerAndSerialNumber(store, 
                                                                     &issuer, 
                                                                     &serial);
#ifdef NSS_3_4_CODE
    PORT_Free(issuer.data);
    PORT_Free(serial.data);
#endif
    return rvCert;
}

Here is the call graph for this function:

NSS_IMPLEMENT NSSCertificate* nssCertificateStore_FindCertificateByIssuerAndSerialNumber ( nssCertificateStore *  store,
NSSDER issuer,
NSSDER serial 
)

Definition at line 575 of file pkistore.c.

{
    NSSCertificate *rvCert = NULL;

    PZ_Lock(store->lock);
    rvCert = nssCertStore_FindCertByIssuerAndSerialNumberLocked (
                           store, issuer, serial);
    PZ_Unlock(store->lock);
    return rvCert;
}

Here is the call graph for this function:

NSS_IMPLEMENT NSSCertificate** nssCertificateStore_FindCertificatesByEmail ( nssCertificateStore *  store,
NSSASCII7 email,
NSSCertificate *  rvOpt[],
PRUint32  maximumOpt,
NSSArena *  arenaOpt 
)

Definition at line 522 of file pkistore.c.

{
    NSSCertificate **rvArray = NULL;
    struct email_template_str et;
    et.email = email;
    et.emailList = nssList_Create(NULL, PR_FALSE);
    if (!et.emailList) {
       return NULL;
    }
    PZ_Lock(store->lock);
    nssHash_Iterate(store->subject, match_email, &et);
    if (et.emailList) {
       /* get references before leaving the store's lock protection */
       nssCertificateList_AddReferences(et.emailList);
    }
    PZ_Unlock(store->lock);
    if (et.emailList) {
       rvArray = get_array_from_list(et.emailList, 
                                     rvOpt, maximumOpt, arenaOpt);
       nssList_Destroy(et.emailList);
    }
    return rvArray;
}

Here is the call graph for this function:

NSS_IMPLEMENT NSSCertificate** nssCertificateStore_FindCertificatesByNickname ( nssCertificateStore *  store,
NSSUTF8 nickname,
NSSCertificate *  rvOpt[],
PRUint32  maximumOpt,
NSSArena *  arenaOpt 
)

Definition at line 465 of file pkistore.c.

{
    NSSCertificate **rvArray = NULL;
    struct nickname_template_str nt;
    nt.nickname = nickname;
    nt.subjectList = NULL;
    PZ_Lock(store->lock);
    nssHash_Iterate(store->subject, match_nickname, &nt);
    if (nt.subjectList) {
       nssCertificateList_AddReferences(nt.subjectList);
       rvArray = get_array_from_list(nt.subjectList, 
                                     rvOpt, maximumOpt, arenaOpt);
    }
    PZ_Unlock(store->lock);
    return rvArray;
}

Here is the call graph for this function:

NSS_IMPLEMENT NSSCertificate** nssCertificateStore_FindCertificatesBySubject ( nssCertificateStore *  store,
NSSDER subject,
NSSCertificate *  rvOpt[],
PRUint32  maximumOpt,
NSSArena *  arenaOpt 
)

Definition at line 407 of file pkistore.c.

{
    NSSCertificate **rvArray = NULL;
    nssList *subjectList;
    PZ_Lock(store->lock);
    subjectList = (nssList *)nssHash_Lookup(store->subject, subject);
    if (subjectList) {
       nssCertificateList_AddReferences(subjectList);
       rvArray = get_array_from_list(subjectList, 
                                     rvOpt, maximumOpt, arenaOpt);
    }
    PZ_Unlock(store->lock);
    return rvArray;
}

Here is the call graph for this function:

NSS_IMPLEMENT NSSCertificate* nssCertificateStore_FindOrAdd ( nssCertificateStore *  store,
NSSCertificate *  c 
)

Definition at line 255 of file pkistore.c.

{
    PRStatus nssrv;
    NSSCertificate *rvCert = NULL;

    PZ_Lock(store->lock);
    rvCert = nssCertStore_FindCertByIssuerAndSerialNumberLocked(
                                      store, &c->issuer, &c->serial);
    if (!rvCert) {
       nssrv = nssCertificateStore_AddLocked(store, c);
       if (PR_SUCCESS == nssrv) {
           rvCert = nssCertificate_AddRef(c);
       }
    }
    PZ_Unlock(store->lock);
    return rvCert;
}

Here is the call graph for this function:

NSS_IMPLEMENT nssSMIMEProfile* nssCertificateStore_FindSMIMEProfileForCertificate ( nssCertificateStore *  store,
NSSCertificate *  cert 
)

Definition at line 701 of file pkistore.c.

{
    certificate_hash_entry *entry;
    nssSMIMEProfile *rvProfile = NULL;
    PZ_Lock(store->lock);
    entry = (certificate_hash_entry *)
                              nssHash_Lookup(store->issuer_and_serial, cert);
    if (entry && entry->profile) {
       rvProfile = nssSMIMEProfile_AddRef(entry->profile);
    }
    PZ_Unlock(store->lock);
    return rvProfile;
}

Here is the call graph for this function:

NSS_IMPLEMENT NSSTrust* nssCertificateStore_FindTrustForCertificate ( nssCertificateStore *  store,
NSSCertificate *  cert 
)

Definition at line 664 of file pkistore.c.

{
    certificate_hash_entry *entry;
    NSSTrust *rvTrust = NULL;
    PZ_Lock(store->lock);
    entry = (certificate_hash_entry *)
                              nssHash_Lookup(store->issuer_and_serial, cert);
    if (entry && entry->trust) {
       rvTrust = nssTrust_AddRef(entry->trust);
    }
    PZ_Unlock(store->lock);
    return rvTrust;
}

Here is the call graph for this function:

NSS_IMPLEMENT void nssCertificateStore_Lock ( nssCertificateStore *  store,
nssCertificateStoreTrace *  out 
)

Definition at line 340 of file pkistore.c.

{
#ifdef DEBUG
    PORT_Assert(out);
    out->store = store;
    out->lock = store->lock;
    out->locked = PR_TRUE;
    PZ_Lock(out->lock);
#else
    PZ_Lock(store->lock);
#endif
}
NSS_IMPLEMENT void nssCertificateStore_RemoveCertLOCKED ( nssCertificateStore *  store,
NSSCertificate *  cert 
)

Definition at line 325 of file pkistore.c.

{
    certificate_hash_entry *entry;
    entry = (certificate_hash_entry *)
                              nssHash_Lookup(store->issuer_and_serial, cert);
    if (entry && entry->cert == cert) {
       remove_certificate_entry(store, cert);
       remove_subject_entry(store, cert);
    }
}

Here is the call graph for this function:

NSS_IMPLEMENT void nssCertificateStore_Unlock ( nssCertificateStore *  store,
nssCertificateStoreTrace *  in,
nssCertificateStoreTrace *  out 
)

Definition at line 356 of file pkistore.c.

{
#ifdef DEBUG
    PORT_Assert(in);
    PORT_Assert(out);
    out->store = store;
    out->lock = store->lock;
    out->unlocked = PR_TRUE;

    PORT_Assert(in->store == out->store);
    PORT_Assert(in->lock == out->lock);
    PORT_Assert(in->locked);

    PZ_Unlock(out->lock);
#else
    PZ_Unlock(store->lock);
#endif
}
static NSSCertificate * nssCertStore_FindCertByIssuerAndSerialNumberLocked ( nssCertificateStore *  store,
NSSDER issuer,
NSSDER serial 
) [static]

Definition at line 554 of file pkistore.c.

{
    certificate_hash_entry *entry;
    NSSCertificate *rvCert = NULL;
    NSSCertificate index;

    index.issuer = *issuer;
    index.serial = *serial;
    entry = (certificate_hash_entry *)
                           nssHash_Lookup(store->issuer_and_serial, &index);
    if (entry) {
       rvCert = nssCertificate_AddRef(entry->cert);
    }
    return rvCert;
}

Here is the call graph for this function:

Here is the caller graph for this function:

NSS_IMPLEMENT nssHash* nssHash_CreateCertificate ( NSSArena *  arenaOpt,
PRUint32  numBuckets 
)

Definition at line 747 of file pkistore.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static void remove_certificate_entry ( nssCertificateStore *  store,
NSSCertificate *  cert 
) [static]

Definition at line 277 of file pkistore.c.

{
    certificate_hash_entry *entry;
    entry = (certificate_hash_entry *)
                             nssHash_Lookup(store->issuer_and_serial, cert);
    if (entry) {
       nssHash_Remove(store->issuer_and_serial, cert);
       if (entry->trust) {
           nssTrust_Destroy(entry->trust);
       }
       if (entry->profile) {
           nssSMIMEProfile_Destroy(entry->profile);
       }
       nss_ZFreeIf(entry);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void remove_subject_entry ( nssCertificateStore *  store,
NSSCertificate *  cert 
) [static]

Definition at line 298 of file pkistore.c.

{
    nssList *subjectList;
    /* Get the subject list for the cert's subject */
    subjectList = (nssList *)nssHash_Lookup(store->subject, &cert->subject);
    if (subjectList) {
       /* Remove the cert from the subject hash */
       nssList_Remove(subjectList, cert);
       nssHash_Remove(store->subject, &cert->subject);
       if (nssList_Count(subjectList) == 0) {
           nssList_Destroy(subjectList);
       } else {
           /* The cert being released may have keyed the subject entry.
            * Since there are still subject certs around, get another and
            * rekey the entry just in case.
            */
           NSSCertificate *subjectCert;
           (void)nssList_GetArray(subjectList, (void **)&subjectCert, 1);
           nssHash_Add(store->subject, &subjectCert->subject, subjectList);
       }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

Definition at line 94 of file errorval.c.