Add function to import a cert from a file
authorSimo Sorce <simo@redhat.com>
Mon, 19 Jan 2015 20:14:43 +0000 (15:14 -0500)
committerPatrick Uiterwijk <puiterwijk@redhat.com>
Thu, 29 Jan 2015 19:06:31 +0000 (20:06 +0100)
Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
ipsilon/tools/certs.py

index d11ee54..ee07c74 100644 (file)
@@ -42,6 +42,10 @@ class Certificate(object):
         proc = Popen(command)
         proc.wait()
 
         proc = Popen(command)
         proc.wait()
 
+    def import_cert(self, certfile, keyfile):
+        self.cert = certfile
+        self.key = keyfile
+
     def get_cert(self):
         if not self.cert:
             raise ValueError('Certificate unavailable')
     def get_cert(self):
         if not self.cert:
             raise ValueError('Certificate unavailable')