Hi all,

   My requirement is to fetch a website's SSL server certificate. For
this I need the nsIChannel, so that I can use the securityInfo
option.

   I need to fetch nsIChannel for a websites internal domains too.
For
example, I have a website A and within that you may have requests to
another website B (may be an image server).

   In this case, will you be able to get the nsIChannel for both the
domains A and B ?

   I did the following using a JS XPCOM component:
1. registered an observer for "http-on-modify-request"
2. queried nsIChannel and nsIHttpChannel
3. in the onModifyRequest Listener, I used notificationCallbacks and
created instance for nsIDocShell through nsIInterfaceRequestor
4. used getDocShellEnumerator to get the docShell of all the children
5. used securityUI from the docShell to fetch the certificate

   I tried by simply using the nsIChannel alone instead of going
through all the above mentioned stuff. But I'm able to get the server
certificate of the master domain only (domain present in the
navigation bar of the browser).

   ie. In my case, the server certificate of website A is available
but not that of B.

   I think I'm going wrong in fetching the proper nsIChannel. How can
this be done or is there some other possibilities to fetch the SSL
server certificate of an internal domain ?

Thanks in advance,
Arun
-- 
dev-tech-crypto mailing list
dev-tech-crypto@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-crypto

Reply via email to