Re: Clarification on nsHTMLInputElement/ certificates
Anderson Walls <[email protected]> Mon, 23 Apr 2012 07:45:53 -0700 (PDT)
| Newsgroups | gmane.comp.mozilla.devel.dom |
|---|---|
| Organization | http://groups.google.com |
| Message-ID | <[email protected]> |
On Apr 19, 10:53=A0pm, Boris Zbarsky <[email protected]> wrote: > On 4/19/12 9:42 PM, Anderson Walls wrote: > > > Boris once again thank you so much, that is exactly what I needed. DER > > will do just fine, converting is simple with openssl. Thank you so > > much for your assistance sir. > > You're very welcome! > > -Boris Boris you wouldn't happen to be able to direct me to the correct header files in order to get this all to work properly would you? I have included the NSIx509Cert.h and the whole thing complies but never enters the if statement, I'm assuming because I do not have the correct headers for the nsISupports cert part. Hope to have this thing running by this afternoon! Just as a reminder here is what I have inserted into the nsHTMLInputElement.cpp postHandleEvent method: if(IsPasswordTextControl()){ std::cerr << "This is a password" << std::endl; nsCOMPtr<nsISupports> cert; NodePrincipal()->GetCertificate(getter_AddRefs(cert)); if(cert){ std::cerr << "CERT" << std::endl; nsCOMPtr<nsIX059Cert> c =3D do_QueryInterface(cert); PRUint32 =3D length; PRUint8* data; c->GetRawDER(&length,&data); std::cerr << data << std::endl; NS_Free(data); } } if I try to take out the if part and just let it run I segfault when I go into a password field, which obviously is bad. The site I have been testing on is Navy Federal's web page so I know they do have a cert. I have a feeling I am just missing some headers or something pretty basic. Any ideas? -Anderson