7 BUNDLE_URL="https://www.emulab.net/genica.bundle"
10 u = urllib2.urlopen(BUNDLE_URL)
11 upath = urllib2.urlparse.urlsplit(u.url)[2]
12 bundle_fname = os.path.basename(upath)
13 open(bundle_fname, 'w').write(u.read())
14 print "Downloaded:", bundle_fname
18 p = subprocess.Popen(['openssl', 'x509', '-issuer'], stdin=subprocess.PIPE, stdout=subprocess.PIPE)
20 m = re.search("(CN=)(.*)([\/ ])", p.stdout.readline())
28 open(fname, 'w').write(cert)
32 bundle = open(fname, 'r')
36 if line.startswith("-----BEGIN CERTIFICATE-----"):
38 elif line.startswith("-----END CERTIFICATE-----"):
47 if __name__ == "__main__":