From e3f608a229af68502aeac1fadaee5091a0a5464f Mon Sep 17 00:00:00 2001 From: Edoardo Putti Date: Sat, 29 Oct 2016 15:36:30 +0200 Subject: [PATCH] draft for authority getter --- lookup.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lookup.py b/lookup.py index 298f418..05dc7bc 100755 --- a/lookup.py +++ b/lookup.py @@ -38,9 +38,16 @@ class CALookup(object): def __getitem__(self, ca_id): + if SSHAuthority(ca_id): + return SSHAuthority(ca_id) + elif SSLAuthority(ca_id): + return SSLAuthority(ca_id) + + else: + raise IndexError('Unknown CA "%s"' % ca_id) """ """