Add function to import a cert from a file
[cascardo/ipsilon.git] / ipsilon / tools / certs.py
old mode 100755 (executable)
new mode 100644 (file)
index 2ff63f1..ee07c74
@@ -1,5 +1,3 @@
-#!/usr/bin/python
-#
 # Copyright (C) 2014  Simo Sorce <simo@redhat.com>
 #
 # see file 'COPYING' for use and warranty information
@@ -44,6 +42,10 @@ class Certificate(object):
         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')