Clarification on nsHTMLInputElement/ certificates

Anderson Walls <[email protected]> Wed, 18 Apr 2012 06:23:18 -0700 (PDT)
Newsgroups gmane.comp.mozilla.devel.dom
Organization http://groups.google.com
Message-ID <918de63f-2431-40c6-b9c6-bb43d4c0dc09@dc2g2000vbb.googlegroups.com>
I am currently working on a research project that requires me to
modify a browser in order to return a website's certificate (to
stdout/ stderr) when the user clicks into a password field.

As of right now I have added the following into the switch statement
(aVisitor.mEvent->message) in the PostHandleEvent method of
nsHTMLElement.

Case NS_FOCUS_CONTENT:{

// start of my addition
if( IsPasswordTextControl() ){
  std::cerr << "Entered Password Field" << std::endl;
}

// continue mozilla source

So I now know when ever I have clicked into a password field which is
great but I have been trying for the last few weeks to sift through
the DOM in order to find where I can grab the certificate or determine
that there is not one for the document/tab/frame that the user is
currently in. Im sure there is a method out there that does exactly
this and can be added into the if statement just not sure what it is/
where to find it.

Hopefully this is explained clearly, any assistance would be greatly
appreciated.