Lines Matching refs:cert
31 .x509.pem files. Defaults to "vendor,build". Where cert files
33 printed as the cert name, otherwise a hash of the cert plus its
95 def GetCertSubject(cert):
99 out, err = p.communicate(cert)
101 return "(error reading cert subject)"
106 return "(unknown cert subject)"
113 def Add(self, cert, name=None):
114 if cert in self.certs:
116 self.certs[cert] = self.certs[cert] + "," + name
119 name = "unknown cert %s (%s)" % (common.sha1(cert).hexdigest()[:12],
120 GetCertSubject(cert))
121 self.certs[cert] = name
123 def Get(self, cert):
124 """Return the name for a given cert."""
125 return self.certs.get(cert, None)
138 cert = common.ParseCertificate(f.read())
142 self.Add(cert, name)
148 """Read the cert out of a PKCS#7-format file (which is what is
160 AddProblem("error reading cert:\n" + err)
163 cert = common.ParseCertificate(out)
164 if not cert:
165 AddProblem("error parsing cert output")
167 return cert
192 cert = CertFromPKCS7(pkcs7, info.filename)
193 out.add(cert)
194 ALL_CERTS.Add(cert)
275 AddProblem("different cert sets for packages with uid %s" % (uid,))
277 print "uid %s is shared by packages with different cert sets:" % (uid,)
280 for cert in apk.certs:
281 print " ", ALL_CERTS.Get(cert)
292 name = ALL_CERTS.Get(apk.cert)
295 AddProblem("hasn't been signed with EXTERNAL cert")
299 """Display a table of packages grouped by cert."""
302 for cert in apk.certs:
303 by_cert.setdefault(cert, []).append((apk.package, apk))
308 for _, cert in order:
309 print "%s:" % (ALL_CERTS.Get(cert),)
310 apks = by_cert[cert]