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
89 def GetCertSubject(cert):
93 out, err = p.communicate(cert)
95 return "(error reading cert subject)"
100 return "(unknown cert subject)"
107 def Add(self, cert, name=None):
108 if cert in self.certs:
110 self.certs[cert] = self.certs[cert] + "," + name
113 name = "unknown cert %s (%s)" % (common.sha1(cert).hexdigest()[:12],
114 GetCertSubject(cert))
115 self.certs[cert] = name
117 def Get(self, cert):
118 """Return the name for a given cert."""
119 return self.certs.get(cert, None)
132 cert = common.ParseCertificate(f.read())
136 self.Add(cert, name)
142 """Read the cert out of a PKCS#7-format file (which is what is
154 AddProblem("error reading cert:\n" + err)
157 cert = common.ParseCertificate(out)
158 if not cert:
159 AddProblem("error parsing cert output")
161 return cert
190 cert = CertFromPKCS7(pkcs7, info.filename)
191 out.add(cert)
192 ALL_CERTS.Add(cert)
276 AddProblem("different cert sets for packages with uid %s" % (uid,))
278 print "uid %s is shared by packages with different cert sets:" % (uid,)
281 for cert in apk.certs:
282 print " ", ALL_CERTS.Get(cert)
293 name = ALL_CERTS.Get(apk.cert)
296 AddProblem("hasn't been signed with EXTERNAL cert")
300 """Display a table of packages grouped by cert."""
303 for cert in apk.certs:
304 by_cert.setdefault(cert, []).append((apk.package, apk))
309 for _, cert in order:
310 print "%s:" % (ALL_CERTS.Get(cert),)
311 apks = by_cert[cert]