Add SignatureVerification class to return verification results. Add support for specifing against which key to verify a signature. Add support to preload all keys before verifing a signature. All test for specific key verificatio and all key preloading.

This commit is contained in:
Roberto Rosario
2016-03-23 18:56:29 -04:00
parent 2f7c6ed0d9
commit 45774ccdcf
4 changed files with 65 additions and 13 deletions

View File

@@ -73,19 +73,16 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
SourceColumn(source=KeyStub, label=_('Key ID'), attribute='key_id')
SourceColumn(source=KeyStub, label=_('Type'), attribute='key_type')
SourceColumn(
source=KeyStub, label=_('Creation date'),
func=lambda context: datetime.fromtimestamp(
int(context['object'].date)
)
source=KeyStub, label=_('Creation date'), attribute='date'
)
SourceColumn(
source=KeyStub, label=_('Expiration date'),
func=lambda context: datetime.fromtimestamp(int(context['object'].expires)) if context['object'].expires else _('No expiration')
func=lambda context: context['object'].expires or _('No expiration')
)
SourceColumn(source=KeyStub, label=_('Length'), attribute='length')
SourceColumn(
source=KeyStub, label=_('User ID'),
func=lambda context: ', '.join(context['object'].uids)
func=lambda context: ', '.join(context['object'].user_id)
)
menu_object.bind_links(links=(link_key_detail,), sources=(Key,))