Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(666)

Side by Side Diff: gecko-sdk/include/nsIBadCertListener.h

Issue 20346: Version 1.8 of gecko-sdk. Downloaded from here:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/
Patch Set: Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « gecko-sdk/include/nsIASN1Sequence.h ('k') | gecko-sdk/include/nsICRLInfo.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 /*
2 * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/builds/tinderbox/XR-Mozilla1.8.0 -Release/WINNT_5.2_Depend/mozilla/security/manager/ssl/public/nsIBadCertListener .idl
3 */
4
5 #ifndef __gen_nsIBadCertListener_h__
6 #define __gen_nsIBadCertListener_h__
7
8
9 #ifndef __gen_nsISupports_h__
10 #include "nsISupports.h"
11 #endif
12
13 /* For IDL files that don't want to include root IDL files. */
14 #ifndef NS_NO_VTABLE
15 #define NS_NO_VTABLE
16 #endif
17 class nsIX509Cert; /* forward declaration */
18
19 class nsIInterfaceRequestor; /* forward declaration */
20
21
22 /* starting interface: nsIBadCertListener */
23 #define NS_IBADCERTLISTENER_IID_STR "86960956-edb0-11d4-998b-00b0d02354a0"
24
25 #define NS_IBADCERTLISTENER_IID \
26 {0x86960956, 0xedb0, 0x11d4, \
27 { 0x99, 0x8b, 0x00, 0xb0, 0xd0, 0x23, 0x54, 0xa0 }}
28
29 /**
30 * Functions that display warnings for problems with web site trust.
31 *
32 * @status FROZEN
33 */
34 class NS_NO_VTABLE nsIBadCertListener : public nsISupports {
35 public:
36
37 NS_DEFINE_STATIC_IID_ACCESSOR(NS_IBADCERTLISTENER_IID)
38
39 /**
40 * No decision was made by the user, whether to trust a cert.
41 */
42 enum { UNINIT_ADD_FLAG = -1 };
43
44 /**
45 * The user decided to add trust to a certificate temporarily
46 * for the current application session only.
47 */
48 enum { ADD_TRUSTED_FOR_SESSION = 1 };
49
50 /**
51 * The user decided to add trust to a certificate permanently.
52 */
53 enum { ADD_TRUSTED_PERMANENTLY = 2 };
54
55 /**
56 * Inform the user there are problems with the trust of a certificate,
57 * and request a decision from the user.
58 * The UI should offer the user a way to look at the certificate in detail.
59 * The following is a sample UI message to be shown to the user:
60 *
61 * Unable to verify the identity of %S as a trusted site.
62 * Possible reasons for this error:
63 * - Your browser does not recognize the Certificate Authority
64 * that issued the site's certificate.
65 * - The site's certificate is incomplete due to a
66 * server misconfiguration.
67 * - You are connected to a site pretending to be %S,
68 * possibly to obtain your confidential information.
69 * Please notify the site's webmaster about this problem.
70 * Before accepting this certificate, you should examine this site's
71 * certificate carefully. Are you willing to to accept this certificate
72 * for the purpose of identifying the Web site %S?
73 * o Accept this certificate permanently
74 * x Accept this certificate temporarily for this session
75 * o Do not accept this certificate and do not connect to this Web site
76 *
77 * @param socketInfo A network communication context that can be used to obta in more information
78 * about the active connection.
79 * @param cert The certificate that is not trusted and that is having the pro blem.
80 * @param certAddType The user's trust decision. See constants defined above.
81 *
82 * @return true if the user decided to connect anyway, false if the user deci ded to not connect
83 */
84 /* boolean confirmUnknownIssuer (in nsIInterfaceRequestor socketInfo, in nsIX5 09Cert cert, out short certAddType); */
85 NS_IMETHOD ConfirmUnknownIssuer(nsIInterfaceRequestor *socketInfo, nsIX509Cert *cert, PRInt16 *certAddType, PRBool *_retval) = 0;
86
87 /**
88 * Inform the user there are problems with the trust of a certificate,
89 * and request a decision from the user.
90 * The hostname mentioned in the server's certificate is not the hostname
91 * that was used as a destination address for the current connection.
92 *
93 * @param socketInfo A network communication context that can be used to obta in more information
94 * about the active connection.
95 * @param targetURL The URL that was used to open the current connection.
96 * @param cert The certificate that was presented by the server.
97 *
98 * @return true if the user decided to connect anyway, false if the user deci ded to not connect
99 */
100 /* boolean confirmMismatchDomain (in nsIInterfaceRequestor socketInfo, in AUTF 8String targetURL, in nsIX509Cert cert); */
101 NS_IMETHOD ConfirmMismatchDomain(nsIInterfaceRequestor *socketInfo, const nsAC String & targetURL, nsIX509Cert *cert, PRBool *_retval) = 0;
102
103 /**
104 * Inform the user there are problems with the trust of a certificate,
105 * and request a decision from the user.
106 * The certificate presented by the server is no longer valid because
107 * the validity period has expired.
108 *
109 * @param socketInfo A network communication context that can be used to obta in more information
110 * about the active connection.
111 * @param cert The certificate that was presented by the server.
112 *
113 * @return true if the user decided to connect anyway, false if the user deci ded to not connect
114 */
115 /* boolean confirmCertExpired (in nsIInterfaceRequestor socketInfo, in nsIX509 Cert cert); */
116 NS_IMETHOD ConfirmCertExpired(nsIInterfaceRequestor *socketInfo, nsIX509Cert * cert, PRBool *_retval) = 0;
117
118 /**
119 * Inform the user there are problems with the trust of a certificate,
120 * and request a decision from the user.
121 * The Certificate Authority (CA) that issued the server's certificate has is sued a
122 * Certificate Revocation List (CRL).
123 * However, the application does not have a current version of the CA's CRL.
124 * Due to the application configuration, the application disallows the connec tion
125 * to the remote site.
126 *
127 * @param socketInfo A network communication context that can be used to obta in more information
128 * about the active connection.
129 * @param targetURL The URL that was used to open the current connection.
130 * @param cert The certificate that was presented by the server.
131 */
132 /* void notifyCrlNextupdate (in nsIInterfaceRequestor socketInfo, in AUTF8Stri ng targetURL, in nsIX509Cert cert); */
133 NS_IMETHOD NotifyCrlNextupdate(nsIInterfaceRequestor *socketInfo, const nsACSt ring & targetURL, nsIX509Cert *cert) = 0;
134
135 };
136
137 /* Use this macro when declaring classes that implement this interface. */
138 #define NS_DECL_NSIBADCERTLISTENER \
139 NS_IMETHOD ConfirmUnknownIssuer(nsIInterfaceRequestor *socketInfo, nsIX509Cert *cert, PRInt16 *certAddType, PRBool *_retval); \
140 NS_IMETHOD ConfirmMismatchDomain(nsIInterfaceRequestor *socketInfo, const nsAC String & targetURL, nsIX509Cert *cert, PRBool *_retval); \
141 NS_IMETHOD ConfirmCertExpired(nsIInterfaceRequestor *socketInfo, nsIX509Cert * cert, PRBool *_retval); \
142 NS_IMETHOD NotifyCrlNextupdate(nsIInterfaceRequestor *socketInfo, const nsACSt ring & targetURL, nsIX509Cert *cert);
143
144 /* Use this macro to declare functions that forward the behavior of this interfa ce to another object. */
145 #define NS_FORWARD_NSIBADCERTLISTENER(_to) \
146 NS_IMETHOD ConfirmUnknownIssuer(nsIInterfaceRequestor *socketInfo, nsIX509Cert *cert, PRInt16 *certAddType, PRBool *_retval) { return _to ConfirmUnknownIssuer (socketInfo, cert, certAddType, _retval); } \
147 NS_IMETHOD ConfirmMismatchDomain(nsIInterfaceRequestor *socketInfo, const nsAC String & targetURL, nsIX509Cert *cert, PRBool *_retval) { return _to ConfirmMism atchDomain(socketInfo, targetURL, cert, _retval); } \
148 NS_IMETHOD ConfirmCertExpired(nsIInterfaceRequestor *socketInfo, nsIX509Cert * cert, PRBool *_retval) { return _to ConfirmCertExpired(socketInfo, cert, _retval ); } \
149 NS_IMETHOD NotifyCrlNextupdate(nsIInterfaceRequestor *socketInfo, const nsACSt ring & targetURL, nsIX509Cert *cert) { return _to NotifyCrlNextupdate(socketInfo , targetURL, cert); }
150
151 /* Use this macro to declare functions that forward the behavior of this interfa ce to another object in a safe way. */
152 #define NS_FORWARD_SAFE_NSIBADCERTLISTENER(_to) \
153 NS_IMETHOD ConfirmUnknownIssuer(nsIInterfaceRequestor *socketInfo, nsIX509Cert *cert, PRInt16 *certAddType, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POI NTER : _to->ConfirmUnknownIssuer(socketInfo, cert, certAddType, _retval); } \
154 NS_IMETHOD ConfirmMismatchDomain(nsIInterfaceRequestor *socketInfo, const nsAC String & targetURL, nsIX509Cert *cert, PRBool *_retval) { return !_to ? NS_ERROR _NULL_POINTER : _to->ConfirmMismatchDomain(socketInfo, targetURL, cert, _retval) ; } \
155 NS_IMETHOD ConfirmCertExpired(nsIInterfaceRequestor *socketInfo, nsIX509Cert * cert, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ConfirmCertE xpired(socketInfo, cert, _retval); } \
156 NS_IMETHOD NotifyCrlNextupdate(nsIInterfaceRequestor *socketInfo, const nsACSt ring & targetURL, nsIX509Cert *cert) { return !_to ? NS_ERROR_NULL_POINTER : _to ->NotifyCrlNextupdate(socketInfo, targetURL, cert); }
157
158 #if 0
159 /* Use the code below as a template for the implementation class for this interf ace. */
160
161 /* Header file */
162 class nsBadCertListener : public nsIBadCertListener
163 {
164 public:
165 NS_DECL_ISUPPORTS
166 NS_DECL_NSIBADCERTLISTENER
167
168 nsBadCertListener();
169
170 private:
171 ~nsBadCertListener();
172
173 protected:
174 /* additional members */
175 };
176
177 /* Implementation file */
178 NS_IMPL_ISUPPORTS1(nsBadCertListener, nsIBadCertListener)
179
180 nsBadCertListener::nsBadCertListener()
181 {
182 /* member initializers and constructor code */
183 }
184
185 nsBadCertListener::~nsBadCertListener()
186 {
187 /* destructor code */
188 }
189
190 /* boolean confirmUnknownIssuer (in nsIInterfaceRequestor socketInfo, in nsIX509 Cert cert, out short certAddType); */
191 NS_IMETHODIMP nsBadCertListener::ConfirmUnknownIssuer(nsIInterfaceRequestor *soc ketInfo, nsIX509Cert *cert, PRInt16 *certAddType, PRBool *_retval)
192 {
193 return NS_ERROR_NOT_IMPLEMENTED;
194 }
195
196 /* boolean confirmMismatchDomain (in nsIInterfaceRequestor socketInfo, in AUTF8S tring targetURL, in nsIX509Cert cert); */
197 NS_IMETHODIMP nsBadCertListener::ConfirmMismatchDomain(nsIInterfaceRequestor *so cketInfo, const nsACString & targetURL, nsIX509Cert *cert, PRBool *_retval)
198 {
199 return NS_ERROR_NOT_IMPLEMENTED;
200 }
201
202 /* boolean confirmCertExpired (in nsIInterfaceRequestor socketInfo, in nsIX509Ce rt cert); */
203 NS_IMETHODIMP nsBadCertListener::ConfirmCertExpired(nsIInterfaceRequestor *socke tInfo, nsIX509Cert *cert, PRBool *_retval)
204 {
205 return NS_ERROR_NOT_IMPLEMENTED;
206 }
207
208 /* void notifyCrlNextupdate (in nsIInterfaceRequestor socketInfo, in AUTF8String targetURL, in nsIX509Cert cert); */
209 NS_IMETHODIMP nsBadCertListener::NotifyCrlNextupdate(nsIInterfaceRequestor *sock etInfo, const nsACString & targetURL, nsIX509Cert *cert)
210 {
211 return NS_ERROR_NOT_IMPLEMENTED;
212 }
213
214 /* End of implementation class template. */
215 #endif
216
217 #define NS_BADCERTLISTENER_CONTRACTID "@mozilla.org/nsBadCertListener;1"
218
219 #endif /* __gen_nsIBadCertListener_h__ */
OLDNEW
« no previous file with comments | « gecko-sdk/include/nsIASN1Sequence.h ('k') | gecko-sdk/include/nsICRLInfo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698