I did just this, having a component implementing only the 4 functions of the nsIBadCertListener interfaces. all returning true as a first test. it gives me the same prob Marc had apparently, looping forever.
I am currently looking at the Certificate DB to save and trust certificate. I guess that's what the original CertDialog does. I am not familiar enough with XPCom / mozilla development to understand the other way Marc used. Thanks I've seen your thread on the nsIBadCertListener recently. I am implementing something similar. I have replaced the nsIBadCertListener;1 with my own implementation that basically first returns true all the time. but I get into the loop problem you had also apparently. I am not familiar enough with XPCom/Firefox development to understand what you meant by having listeners on HTTPS Mark B. wrote: > > Hi, thanks for the info. I tried that but got recursive call problems, > so I guess I did not implement that properly. > > Anyway, I don't think it's a good thing doing that, so I ended up > registering as an observer for http requests, and attached a > badcertlistener to every https request. If the condition I wanted to > check did not hold, I just displayed the usual bad cert dialogs. > > Mark > > > On Aug 19, 8:37 pm, Christian Biesinger <[EMAIL PROTECTED]> wrote: >> Nickolay Ponomarev wrote: >> > I didn't check the code now, but IIRC you should set >> > notificationCallbacks of a channel to an object that can be >> > getInterface'd to nsIBadCertListener. If you figure it out, please add >> > an example to the code snippets at developer.mozilla.org. >> >> If you want a global observer, you need to register under the same >> contract ID as the existing bad cert listener >> (@mozilla.org/nsBadCertListener;1) and forward calls to the old listener >> as needed. > > > _______________________________________________ > dev-tech-xpcom mailing list > [email protected] > https://lists.mozilla.org/listinfo/dev-tech-xpcom > > Quoted from: http://www.nabble.com/adding-a-nsIBadCertListener-tf4280266.html#a12237111 Christian Biesinger wrote: > > Nickolay Ponomarev wrote: > >> I didn't check the code now, but IIRC you should set >> notificationCallbacks of a channel to an object that can be >> getInterface'd to nsIBadCertListener. If you figure it out, please add >> an example to the code snippets at developer.mozilla.org. > > If you want a global observer, you need to register under the same > contract ID as the existing bad cert listener > (@mozilla.org/nsBadCertListener;1) and forward calls to the old listener > as needed. > _______________________________________________ > dev-tech-xpcom mailing list > [email protected] > https://lists.mozilla.org/listinfo/dev-tech-xpcom > > -- View this message in context: http://www.nabble.com/adding-a-nsIBadCertListener-tf4280266.html#a12418690 Sent from the Mozilla - XPCOM mailing list archive at Nabble.com. _______________________________________________ dev-tech-xpcom mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-xpcom
