|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.EricNetwork.EricSslErrorHandler</title> |
|
4 <meta charset="UTF-8"> |
|
5 <style> |
|
6 body { |
|
7 background: #EDECE6; |
|
8 margin: 0em 1em 10em 1em; |
|
9 color: black; |
|
10 } |
|
11 |
|
12 h1 { color: white; background: #85774A; } |
|
13 h2 { color: white; background: #85774A; } |
|
14 h3 { color: white; background: #9D936E; } |
|
15 h4 { color: white; background: #9D936E; } |
|
16 |
|
17 a { color: #BA6D36; } |
|
18 |
|
19 </style> |
|
20 </head> |
|
21 <body> |
|
22 <a NAME="top" ID="top"></a> |
|
23 <h1>eric7.EricNetwork.EricSslErrorHandler</h1> |
|
24 |
|
25 <p> |
|
26 Module implementing a SSL error handler. |
|
27 </p> |
|
28 <h3>Global Attributes</h3> |
|
29 |
|
30 <table> |
|
31 <tr><td>None</td></tr> |
|
32 </table> |
|
33 <h3>Classes</h3> |
|
34 |
|
35 <table> |
|
36 |
|
37 <tr> |
|
38 <td><a href="#EricSslErrorHandler">EricSslErrorHandler</a></td> |
|
39 <td>Class implementing a handler for SSL errors.</td> |
|
40 </tr> |
|
41 <tr> |
|
42 <td><a href="#EricSslErrorState">EricSslErrorState</a></td> |
|
43 <td>Class defining the SSL error handling states.</td> |
|
44 </tr> |
|
45 </table> |
|
46 <h3>Functions</h3> |
|
47 |
|
48 <table> |
|
49 <tr><td>None</td></tr> |
|
50 </table> |
|
51 <hr /> |
|
52 <hr /> |
|
53 <a NAME="EricSslErrorHandler" ID="EricSslErrorHandler"></a> |
|
54 <h2>EricSslErrorHandler</h2> |
|
55 |
|
56 <p> |
|
57 Class implementing a handler for SSL errors. |
|
58 </p> |
|
59 <p> |
|
60 It also initializes the default SSL configuration with certificates |
|
61 permanently accepted by the user already. |
|
62 </p> |
|
63 <h3>Derived from</h3> |
|
64 QObject |
|
65 <h3>Class Attributes</h3> |
|
66 |
|
67 <table> |
|
68 <tr><td>None</td></tr> |
|
69 </table> |
|
70 <h3>Class Methods</h3> |
|
71 |
|
72 <table> |
|
73 <tr><td>None</td></tr> |
|
74 </table> |
|
75 <h3>Methods</h3> |
|
76 |
|
77 <table> |
|
78 |
|
79 <tr> |
|
80 <td><a href="#EricSslErrorHandler.__init__">EricSslErrorHandler</a></td> |
|
81 <td>Constructor</td> |
|
82 </tr> |
|
83 <tr> |
|
84 <td><a href="#EricSslErrorHandler.__certToString">__certToString</a></td> |
|
85 <td>Private method to convert a certificate to a formatted string.</td> |
|
86 </tr> |
|
87 <tr> |
|
88 <td><a href="#EricSslErrorHandler.__getSystemCaCertificates">__getSystemCaCertificates</a></td> |
|
89 <td>Private method to get the list of system certificates.</td> |
|
90 </tr> |
|
91 <tr> |
|
92 <td><a href="#EricSslErrorHandler.sslErrors">sslErrors</a></td> |
|
93 <td>Public method to handle SSL errors.</td> |
|
94 </tr> |
|
95 <tr> |
|
96 <td><a href="#EricSslErrorHandler.sslErrorsReply">sslErrorsReply</a></td> |
|
97 <td>Public slot to handle SSL errors for a network reply.</td> |
|
98 </tr> |
|
99 <tr> |
|
100 <td><a href="#EricSslErrorHandler.sslErrorsReplySlot">sslErrorsReplySlot</a></td> |
|
101 <td>Public slot to handle SSL errors for a network reply.</td> |
|
102 </tr> |
|
103 </table> |
|
104 <h3>Static Methods</h3> |
|
105 |
|
106 <table> |
|
107 <tr><td>None</td></tr> |
|
108 </table> |
|
109 |
|
110 <a NAME="EricSslErrorHandler.__init__" ID="EricSslErrorHandler.__init__"></a> |
|
111 <h4>EricSslErrorHandler (Constructor)</h4> |
|
112 <b>EricSslErrorHandler</b>(<i>parent=None</i>) |
|
113 |
|
114 <p> |
|
115 Constructor |
|
116 </p> |
|
117 <dl> |
|
118 |
|
119 <dt><i>parent</i></dt> |
|
120 <dd> |
|
121 reference to the parent object (QObject) |
|
122 </dd> |
|
123 </dl> |
|
124 <a NAME="EricSslErrorHandler.__certToString" ID="EricSslErrorHandler.__certToString"></a> |
|
125 <h4>EricSslErrorHandler.__certToString</h4> |
|
126 <b>__certToString</b>(<i>cert</i>) |
|
127 |
|
128 <p> |
|
129 Private method to convert a certificate to a formatted string. |
|
130 </p> |
|
131 <dl> |
|
132 |
|
133 <dt><i>cert</i></dt> |
|
134 <dd> |
|
135 certificate to convert (QSslCertificate) |
|
136 </dd> |
|
137 </dl> |
|
138 <dl> |
|
139 <dt>Return:</dt> |
|
140 <dd> |
|
141 formatted string (string) |
|
142 </dd> |
|
143 </dl> |
|
144 <a NAME="EricSslErrorHandler.__getSystemCaCertificates" ID="EricSslErrorHandler.__getSystemCaCertificates"></a> |
|
145 <h4>EricSslErrorHandler.__getSystemCaCertificates</h4> |
|
146 <b>__getSystemCaCertificates</b>(<i></i>) |
|
147 |
|
148 <p> |
|
149 Private method to get the list of system certificates. |
|
150 </p> |
|
151 <dl> |
|
152 <dt>Return:</dt> |
|
153 <dd> |
|
154 list of system certificates (list of QSslCertificate) |
|
155 </dd> |
|
156 </dl> |
|
157 <a NAME="EricSslErrorHandler.sslErrors" ID="EricSslErrorHandler.sslErrors"></a> |
|
158 <h4>EricSslErrorHandler.sslErrors</h4> |
|
159 <b>sslErrors</b>(<i>errors, server, port=-1</i>) |
|
160 |
|
161 <p> |
|
162 Public method to handle SSL errors. |
|
163 </p> |
|
164 <dl> |
|
165 |
|
166 <dt><i>errors</i> (list of QSslError)</dt> |
|
167 <dd> |
|
168 list of SSL errors |
|
169 </dd> |
|
170 <dt><i>server</i> (str)</dt> |
|
171 <dd> |
|
172 name of the server |
|
173 </dd> |
|
174 <dt><i>port</i> (int)</dt> |
|
175 <dd> |
|
176 value of the port |
|
177 </dd> |
|
178 </dl> |
|
179 <dl> |
|
180 <dt>Return:</dt> |
|
181 <dd> |
|
182 tuple indicating to ignore the SSL errors and indicating a |
|
183 change of the default SSL configuration |
|
184 </dd> |
|
185 </dl> |
|
186 <dl> |
|
187 <dt>Return Type:</dt> |
|
188 <dd> |
|
189 tuple of (EricSslErrorState, bool) |
|
190 </dd> |
|
191 </dl> |
|
192 <a NAME="EricSslErrorHandler.sslErrorsReply" ID="EricSslErrorHandler.sslErrorsReply"></a> |
|
193 <h4>EricSslErrorHandler.sslErrorsReply</h4> |
|
194 <b>sslErrorsReply</b>(<i>reply, errors</i>) |
|
195 |
|
196 <p> |
|
197 Public slot to handle SSL errors for a network reply. |
|
198 </p> |
|
199 <dl> |
|
200 |
|
201 <dt><i>reply</i></dt> |
|
202 <dd> |
|
203 reference to the reply object (QNetworkReply) |
|
204 </dd> |
|
205 <dt><i>errors</i></dt> |
|
206 <dd> |
|
207 list of SSL errors (list of QSslError) |
|
208 </dd> |
|
209 </dl> |
|
210 <dl> |
|
211 <dt>Return:</dt> |
|
212 <dd> |
|
213 tuple indicating to ignore the SSL errors (one of NotIgnored, |
|
214 SystemIgnored or UserIgnored) and indicating a change of the |
|
215 default SSL configuration (boolean) |
|
216 </dd> |
|
217 </dl> |
|
218 <a NAME="EricSslErrorHandler.sslErrorsReplySlot" ID="EricSslErrorHandler.sslErrorsReplySlot"></a> |
|
219 <h4>EricSslErrorHandler.sslErrorsReplySlot</h4> |
|
220 <b>sslErrorsReplySlot</b>(<i>reply, errors</i>) |
|
221 |
|
222 <p> |
|
223 Public slot to handle SSL errors for a network reply. |
|
224 </p> |
|
225 <dl> |
|
226 |
|
227 <dt><i>reply</i></dt> |
|
228 <dd> |
|
229 reference to the reply object (QNetworkReply) |
|
230 </dd> |
|
231 <dt><i>errors</i></dt> |
|
232 <dd> |
|
233 list of SSL errors (list of QSslError) |
|
234 </dd> |
|
235 </dl> |
|
236 <div align="right"><a href="#top">Up</a></div> |
|
237 <hr /> |
|
238 <hr /> |
|
239 <a NAME="EricSslErrorState" ID="EricSslErrorState"></a> |
|
240 <h2>EricSslErrorState</h2> |
|
241 |
|
242 <p> |
|
243 Class defining the SSL error handling states. |
|
244 </p> |
|
245 <h3>Derived from</h3> |
|
246 enum.Enum |
|
247 <h3>Class Attributes</h3> |
|
248 |
|
249 <table> |
|
250 <tr><td>NOT_IGNORED</td></tr><tr><td>SYSTEM_IGNORED</td></tr><tr><td>USER_IGNORED</td></tr> |
|
251 </table> |
|
252 <h3>Class Methods</h3> |
|
253 |
|
254 <table> |
|
255 <tr><td>None</td></tr> |
|
256 </table> |
|
257 <h3>Methods</h3> |
|
258 |
|
259 <table> |
|
260 <tr><td>None</td></tr> |
|
261 </table> |
|
262 <h3>Static Methods</h3> |
|
263 |
|
264 <table> |
|
265 <tr><td>None</td></tr> |
|
266 </table> |
|
267 |
|
268 <div align="right"><a href="#top">Up</a></div> |
|
269 <hr /> |
|
270 </body></html> |