91 parent = QTreeWidgetItem(self.serversCertificatesTree, [organisation]) |
91 parent = QTreeWidgetItem(self.serversCertificatesTree, [organisation]) |
92 else: |
92 else: |
93 parent = items[0] |
93 parent = items[0] |
94 |
94 |
95 itm = QTreeWidgetItem(parent, [commonName, server, expiryDate]) |
95 itm = QTreeWidgetItem(parent, [commonName, server, expiryDate]) |
96 itm.setData(0, self.CertRole, cert) |
96 itm.setData(0, self.CertRole, cert.toPem()) |
97 |
97 |
98 @pyqtSlot(QTreeWidgetItem, QTreeWidgetItem) |
98 @pyqtSlot(QTreeWidgetItem, QTreeWidgetItem) |
99 def on_serversCertificatesTree_currentItemChanged(self, current, previous): |
99 def on_serversCertificatesTree_currentItemChanged(self, current, previous): |
100 """ |
100 """ |
101 Private slot handling a change of the current item in the |
101 Private slot handling a change of the current item in the |
112 @pyqtSlot() |
112 @pyqtSlot() |
113 def on_serversViewButton_clicked(self): |
113 def on_serversViewButton_clicked(self): |
114 """ |
114 """ |
115 Private slot to show data of the selected server certificate. |
115 Private slot to show data of the selected server certificate. |
116 """ |
116 """ |
117 cert = self.serversCertificatesTree.currentItem().data(0, self.CertRole) |
117 cert = QSslCertificate.fromData( |
|
118 self.serversCertificatesTree.currentItem().data(0, self.CertRole))[0] |
118 dlg = SslInfoDialog(cert, self) |
119 dlg = SslInfoDialog(cert, self) |
119 dlg.exec_() |
120 dlg.exec_() |
120 |
121 |
121 @pyqtSlot() |
122 @pyqtSlot() |
122 def on_serversDeleteButton_clicked(self): |
123 def on_serversDeleteButton_clicked(self): |
283 parent = QTreeWidgetItem(self.caCertificatesTree, [organisation]) |
284 parent = QTreeWidgetItem(self.caCertificatesTree, [organisation]) |
284 else: |
285 else: |
285 parent = items[0] |
286 parent = items[0] |
286 |
287 |
287 itm = QTreeWidgetItem(parent, [commonName, expiryDate]) |
288 itm = QTreeWidgetItem(parent, [commonName, expiryDate]) |
288 itm.setData(0, self.CertRole, cert) |
289 itm.setData(0, self.CertRole, cert.toPem()) |
289 |
290 |
290 @pyqtSlot(QTreeWidgetItem, QTreeWidgetItem) |
291 @pyqtSlot(QTreeWidgetItem, QTreeWidgetItem) |
291 def on_caCertificatesTree_currentItemChanged(self, current, previous): |
292 def on_caCertificatesTree_currentItemChanged(self, current, previous): |
292 """ |
293 """ |
293 Private slot handling a change of the current item |
294 Private slot handling a change of the current item |
304 @pyqtSlot() |
305 @pyqtSlot() |
305 def on_caViewButton_clicked(self): |
306 def on_caViewButton_clicked(self): |
306 """ |
307 """ |
307 Private slot to show data of the selected CA certificate. |
308 Private slot to show data of the selected CA certificate. |
308 """ |
309 """ |
309 cert = self.caCertificatesTree.currentItem().data(0, self.CertRole) |
310 cert = QSslCertificate.fromData( |
|
311 self.caCertificatesTree.currentItem().data(0, self.CertRole))[0] |
310 dlg = SslInfoDialog(cert, self) |
312 dlg = SslInfoDialog(cert, self) |
311 dlg.exec_() |
313 dlg.exec_() |
312 |
314 |
313 @pyqtSlot() |
315 @pyqtSlot() |
314 def on_caDeleteButton_clicked(self): |
316 def on_caDeleteButton_clicked(self): |