|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric6.E5Network.E5SslErrorHandler</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><a NAME="top" ID="top"></a> |
|
22 <h1>eric6.E5Network.E5SslErrorHandler</h1> |
|
23 <p> |
|
24 Module implementing a SSL error handler. |
|
25 </p> |
|
26 <h3>Global Attributes</h3> |
|
27 <table> |
|
28 <tr><td>None</td></tr> |
|
29 </table> |
|
30 <h3>Classes</h3> |
|
31 <table> |
|
32 <tr> |
|
33 <td><a href="#E5SslErrorHandler">E5SslErrorHandler</a></td> |
|
34 <td>Class implementing a handler for SSL errors.</td> |
|
35 </tr> |
|
36 </table> |
|
37 <h3>Functions</h3> |
|
38 <table> |
|
39 <tr><td>None</td></tr> |
|
40 </table> |
|
41 <hr /><hr /> |
|
42 <a NAME="E5SslErrorHandler" ID="E5SslErrorHandler"></a> |
|
43 <h2>E5SslErrorHandler</h2> |
|
44 <p> |
|
45 Class implementing a handler for SSL errors. |
|
46 </p><p> |
|
47 It also initializes the default SSL configuration with certificates |
|
48 permanently accepted by the user already. |
|
49 </p> |
|
50 <h3>Derived from</h3> |
|
51 QObject |
|
52 <h3>Class Attributes</h3> |
|
53 <table> |
|
54 <tr><td>NotIgnored</td></tr><tr><td>SystemIgnored</td></tr><tr><td>UserIgnored</td></tr> |
|
55 </table> |
|
56 <h3>Class Methods</h3> |
|
57 <table> |
|
58 <tr><td>None</td></tr> |
|
59 </table> |
|
60 <h3>Methods</h3> |
|
61 <table> |
|
62 <tr> |
|
63 <td><a href="#E5SslErrorHandler.__init__">E5SslErrorHandler</a></td> |
|
64 <td>Constructor</td> |
|
65 </tr><tr> |
|
66 <td><a href="#E5SslErrorHandler.__certToString">__certToString</a></td> |
|
67 <td>Private method to convert a certificate to a formatted string.</td> |
|
68 </tr><tr> |
|
69 <td><a href="#E5SslErrorHandler.__getSystemCaCertificates">__getSystemCaCertificates</a></td> |
|
70 <td>Private method to get the list of system certificates.</td> |
|
71 </tr><tr> |
|
72 <td><a href="#E5SslErrorHandler.sslErrors">sslErrors</a></td> |
|
73 <td>Public method to handle SSL errors.</td> |
|
74 </tr><tr> |
|
75 <td><a href="#E5SslErrorHandler.sslErrorsReply">sslErrorsReply</a></td> |
|
76 <td>Public slot to handle SSL errors for a network reply.</td> |
|
77 </tr><tr> |
|
78 <td><a href="#E5SslErrorHandler.sslErrorsReplySlot">sslErrorsReplySlot</a></td> |
|
79 <td>Public slot to handle SSL errors for a network reply.</td> |
|
80 </tr> |
|
81 </table> |
|
82 <h3>Static Methods</h3> |
|
83 <table> |
|
84 <tr><td>None</td></tr> |
|
85 </table> |
|
86 <a NAME="E5SslErrorHandler.__init__" ID="E5SslErrorHandler.__init__"></a> |
|
87 <h4>E5SslErrorHandler (Constructor)</h4> |
|
88 <b>E5SslErrorHandler</b>(<i>parent=None</i>) |
|
89 <p> |
|
90 Constructor |
|
91 </p><dl> |
|
92 <dt><i>parent</i></dt> |
|
93 <dd> |
|
94 reference to the parent object (QObject) |
|
95 </dd> |
|
96 </dl><a NAME="E5SslErrorHandler.__certToString" ID="E5SslErrorHandler.__certToString"></a> |
|
97 <h4>E5SslErrorHandler.__certToString</h4> |
|
98 <b>__certToString</b>(<i>cert</i>) |
|
99 <p> |
|
100 Private method to convert a certificate to a formatted string. |
|
101 </p><dl> |
|
102 <dt><i>cert</i></dt> |
|
103 <dd> |
|
104 certificate to convert (QSslCertificate) |
|
105 </dd> |
|
106 </dl><dl> |
|
107 <dt>Returns:</dt> |
|
108 <dd> |
|
109 formatted string (string) |
|
110 </dd> |
|
111 </dl><a NAME="E5SslErrorHandler.__getSystemCaCertificates" ID="E5SslErrorHandler.__getSystemCaCertificates"></a> |
|
112 <h4>E5SslErrorHandler.__getSystemCaCertificates</h4> |
|
113 <b>__getSystemCaCertificates</b>(<i></i>) |
|
114 <p> |
|
115 Private method to get the list of system certificates. |
|
116 </p><dl> |
|
117 <dt>Returns:</dt> |
|
118 <dd> |
|
119 list of system certificates (list of QSslCertificate) |
|
120 </dd> |
|
121 </dl><a NAME="E5SslErrorHandler.sslErrors" ID="E5SslErrorHandler.sslErrors"></a> |
|
122 <h4>E5SslErrorHandler.sslErrors</h4> |
|
123 <b>sslErrors</b>(<i>errors, server, port=-1</i>) |
|
124 <p> |
|
125 Public method to handle SSL errors. |
|
126 </p><dl> |
|
127 <dt><i>errors</i></dt> |
|
128 <dd> |
|
129 list of SSL errors (list of QSslError) |
|
130 </dd><dt><i>server</i></dt> |
|
131 <dd> |
|
132 name of the server (string) |
|
133 </dd><dt><i>port=</i></dt> |
|
134 <dd> |
|
135 value of the port (integer) |
|
136 </dd> |
|
137 </dl><dl> |
|
138 <dt>Returns:</dt> |
|
139 <dd> |
|
140 tuple indicating to ignore the SSL errors (one of NotIgnored, |
|
141 SystemIgnored or UserIgnored) and indicating a change of the |
|
142 default SSL configuration (boolean) |
|
143 </dd> |
|
144 </dl><a NAME="E5SslErrorHandler.sslErrorsReply" ID="E5SslErrorHandler.sslErrorsReply"></a> |
|
145 <h4>E5SslErrorHandler.sslErrorsReply</h4> |
|
146 <b>sslErrorsReply</b>(<i>reply, errors</i>) |
|
147 <p> |
|
148 Public slot to handle SSL errors for a network reply. |
|
149 </p><dl> |
|
150 <dt><i>reply</i></dt> |
|
151 <dd> |
|
152 reference to the reply object (QNetworkReply) |
|
153 </dd><dt><i>errors</i></dt> |
|
154 <dd> |
|
155 list of SSL errors (list of QSslError) |
|
156 </dd> |
|
157 </dl><dl> |
|
158 <dt>Returns:</dt> |
|
159 <dd> |
|
160 tuple indicating to ignore the SSL errors (one of NotIgnored, |
|
161 SystemIgnored or UserIgnored) and indicating a change of the |
|
162 default SSL configuration (boolean) |
|
163 </dd> |
|
164 </dl><a NAME="E5SslErrorHandler.sslErrorsReplySlot" ID="E5SslErrorHandler.sslErrorsReplySlot"></a> |
|
165 <h4>E5SslErrorHandler.sslErrorsReplySlot</h4> |
|
166 <b>sslErrorsReplySlot</b>(<i>reply, errors</i>) |
|
167 <p> |
|
168 Public slot to handle SSL errors for a network reply. |
|
169 </p><dl> |
|
170 <dt><i>reply</i></dt> |
|
171 <dd> |
|
172 reference to the reply object (QNetworkReply) |
|
173 </dd><dt><i>errors</i></dt> |
|
174 <dd> |
|
175 list of SSL errors (list of QSslError) |
|
176 </dd> |
|
177 </dl> |
|
178 <div align="right"><a href="#top">Up</a></div> |
|
179 <hr /> |
|
180 </body></html> |