Re: [PATCH 1/3] config code changes and basic puppetminions class to have func get it's host inventory and paths from puppet

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Tue, 23 Feb 2010, Seth Vidal wrote:

+
+    def _return_revoked_serials(self, crlfile):
+        call = '/usr/bin/openssl crl -text -noout -in %s' % crlfile
+        call = shlex.split(call)
+        serials = []
+        (res,err) = subprocess.Popen(call, stdout=subprocess.PIPE).communicate()
+        for line in res.split('\n'):
+            if line.find('Serial Number:') == -1:
+                continue
+            (crap, serial) = line.split(':')
+            serial = serial.strip()
+            serial = int(serial, 16)
+            serials.append(serial)
+        return serials

I agree that the above is ugly. If anyone has a better idea on how to read a crl from python, I'm all ears.

-sv

_______________________________________________
Func-list mailing list
Func-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/func-list

[Index of Archives]     [Fedora Users]     [Linux Networking]     [Fedora Legacy List]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux