-#!/usr/bin/python
-#
# Copyright (C) 2014 Simo Sorce <simo@redhat.com>
#
# see file 'COPYING' for use and warranty information
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')
with open(self.cert, 'r') as f:
cert = f.readlines()
- #poor man stripping of BEGIN/END lines
+ # poor man stripping of BEGIN/END lines
if cert[0] == '-----BEGIN CERTIFICATE-----\n':
cert = cert[1:]
if cert[-1] == '-----END CERTIFICATE-----\n':