63
63
def __init__(self, repository):
65
66
self.repository = repository
67
68
super(SignatureTab, self).__init__(False, 6)
145
146
def show_signature(self, crypttext):
146
147
key = crypt.verify(crypttext)
148
if not key.is_available():
149
if key.is_available():
151
if key.get_display_name() == self.revision.committer:
152
self.signature_image.set_from_file(icon_path("sign-ok.png"))
153
self.signature_label.set_markup("<b>Authenticity confirmed</b>\n" +
154
"This revision has been signed with " +
157
self.signature_image.set_from_file(icon_path("sign-bad.png"))
158
self.signature_label.set_markup("<b>Authenticity cannot be confirmed</b>\n" +
159
"Revision committer is not the same as signer.")
161
self.signature_image.set_from_file(icon_path("sign-bad.png"))
162
self.signature_label.set_markup("<b>Authenticity cannot be confirmed</b>\n" +
163
"This revision has been signed, but the " +
164
"key is not trusted.")
149
166
self.show_no_signature()
150
167
self.signature_image.set_from_file(icon_path("sign-bad.png"))
151
168
self.signature_label.set_markup("<b>Authenticity cannot be confirmed</b>\n" +
152
169
"Signature key not available.")
156
self.signature_image.set_from_file(icon_path("sign-ok.png"))
157
self.signature_label.set_markup("<b>Authenticity confirmed</b>\n" +
158
"This revision has been signed with " +
161
self.signature_image.set_from_file(icon_path("sign-bad.png"))
162
self.signature_label.set_markup("<b>Authenticity cannot be confirmed</b>\n" +
163
"This revision has been signed, but the " +
164
"key is not trusted.")
166
172
trust = key.get_trust()
168
174
if trust <= crypt.TRUST_NEVER: