66 self.tr("The certificate contains a weak key."), |
66 self.tr("The certificate contains a weak key."), |
67 QWebEngineCertificateError.Error |
67 QWebEngineCertificateError.Error |
68 .CertificateNameConstraintViolation: |
68 .CertificateNameConstraintViolation: |
69 self.tr("The certificate claimed DNS names that are in" |
69 self.tr("The certificate claimed DNS names that are in" |
70 " violation of name constraints."), |
70 " violation of name constraints."), |
|
71 QWebEngineCertificateError.Error.CertificateValidityTooLong: |
|
72 self.tr("The certificate has a validity period that is" |
|
73 " too long."), |
|
74 QWebEngineCertificateError.Error.CertificateTransparencyRequired: |
|
75 self.tr("Certificate Transparency was required for this" |
|
76 " connection, but the server did not provide" |
|
77 " information that complied with the policy."), |
71 } |
78 } |
72 try: |
|
73 self.__errorDescriptions[ |
|
74 QWebEngineCertificateError.Error.CertificateValidityTooLong |
|
75 ] = self.tr( |
|
76 "The certificate has a validity period that is too long." |
|
77 ) |
|
78 except AttributeError: |
|
79 # the value was added in Qt 5.7 |
|
80 pass |
|
81 try: |
|
82 self.__errorDescriptions[ |
|
83 QWebEngineCertificateError.Error |
|
84 .CertificateTransparencyRequired |
|
85 ] = self.tr( |
|
86 "Certificate Transparency was required for this" |
|
87 " connection, but the server did not provide" |
|
88 " information that complied with the policy." |
|
89 ) |
|
90 except AttributeError: |
|
91 # the value was added in Qt 5.8 |
|
92 pass |
|
93 |
79 |
94 for host, errors in errorsDict.items(): |
80 for host, errors in errorsDict.items(): |
95 itm = QTreeWidgetItem(self.errorsTree, [host]) |
81 itm = QTreeWidgetItem(self.errorsTree, [host]) |
96 self.errorsTree.setFirstItemColumnSpanned(itm, True) |
82 self.errorsTree.setFirstItemColumnSpanned(itm, True) |
97 for error in errors: |
83 for error in errors: |