From b0e8c692796daeda2455c438efeca1678212ac2d Mon Sep 17 00:00:00 2001 From: Edoardo Putti Date: Sat, 29 Oct 2016 00:29:57 +0200 Subject: [PATCH] draft for certificate descriptor --- lookup.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/lookup.py b/lookup.py index 595886f..0c0dba2 100755 --- a/lookup.py +++ b/lookup.py @@ -136,3 +136,25 @@ class RequestLookup(object): @property def ssl(self): pass + +class CertificateLookup(object): + """ + Proxy to interact with certificates + """ + def __iter__(self): + self.cert_dir = OUTPUT_PATH + + def __getitem__(self, certificate_id): + """ + Get a specific certificate from disk + """ + if not Certificate(certificate_id): + raise IndexError + + return Certificate(certificate_id) + + def __iter__(self): + """ + Iterate over all certificate request in OUTPUT_PATH + """ + pass