Closed Bug 88227 Opened 23 years ago Closed 15 years ago

Need to decide the PSM interface we expose for embeddors

Categories

(Core Graveyard :: Embedding: APIs, defect)

All
Windows NT
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: chak, Assigned: thayes0993)

Details

Currently there's not a way for the embeddors to impl a security info dlg (i.e.
the one which gets shown when one clicks on the Mozilla lock icon) since they do
not have access to any PSM interfaces via nsIwebBrowser or some other embedding
interface(using which they can impl the dlg)

We have access to an nsISecureBrowserUI interface in
embedding/browser/webBrowser/nsWebBrowser.cpp where it's created. However, we
decided a while ago that this may not be the correct interface the embeddors
should have access to.

If we decide that exposing this interface is the way to go, then we can easily
impl the dlg. by doing something like:

+    // Get the nsISecureBrowserUI via nsIWebBrowser
+    nsresult rv = NS_OK;
+    nsCOMPtr<nsISecureBrowserUI> securityUI = do_GetInterface(mWebBrowser, &rv);
+    if (NS_FAILED(rv)) return;
+
+
nsCOMPtr<nsISSLStatusProvider> sslStatusProvider = do_QueryInterface(securityUI,
&rv);
+
if(NS_FAILED(rv)) return;
+
+    nsCOMPtr<nsISSLStatus> sslStatus;
+    rv = sslStatusProvider->GetSSLStatus(getter_AddRefs(sslStatus));
+    if (NS_FAILED(rv)) return;

Once we have nsISSLStatus we can get all kinds of info about the X.509 cert etc.
which can be used to impl. dlg.

So, let's decide the interface we want to expose....
QA Contact: dunn5557 → apis
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → INCOMPLETE
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.