On 02/04/2011 10:19 AM, Anupama Joshi wrote: > When does it get removed? Does it gets removed immediately or after the NSS > is shutdown?
Immediately after the last reference. IIRC. Everytime you look the cert up, you get a new reference to it. You need to destroy all the references you make. bob > On Fri, Feb 4, 2011 at 9:59 AM, Robert Relyea <rrel...@redhat.com> wrote: > >>>> Hi, >>>> I want to build certifiacte chain using a certifiacte passed by user >>>> and some certificates which are already there in the certDB. >>>> I am using CERT_NewTempCertificate(certDB, &certItem, NULL, PR_FALSE, >>>> PR_TRUE); to add the user given cert temporarily in the certDB. >>>> After the chain is established then I need to remove it from the temp >>>> store or cache wherever it is so that the next session with my server >>>> does not give false results as if the cert is in the DB. >>>> But I am unable to do it till the session is completely shutdown. >>>> How can I remove this certificate from the temp storage immediately >>>> after chain is established. >>>> Calling CERT_DestroyCertificate (tmpCert); does not do it. >> It means you have a reference leak, or some one else has latched onto >> the certificate. >> For temp certs, when the last reference to the cert is released, the >> cert is removed from the cache. >> >> bob >>>> Thanks >> >>
-- dev-tech-crypto mailing list dev-tech-crypto@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-tech-crypto