From: Simo Sorce Date: Mon, 19 Jan 2015 20:14:43 +0000 (-0500) Subject: Add function to import a cert from a file X-Git-Tag: v0.4.0~41 X-Git-Url: http://git.cascardo.eti.br/?p=cascardo%2Fipsilon.git;a=commitdiff_plain;h=184c3d6c292de297d0055655516651da2767e38d Add function to import a cert from a file Signed-off-by: Simo Sorce Reviewed-by: Patrick Uiterwijk --- diff --git a/ipsilon/tools/certs.py b/ipsilon/tools/certs.py index d11ee54..ee07c74 100644 --- a/ipsilon/tools/certs.py +++ b/ipsilon/tools/certs.py @@ -42,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')