def trustRootFromCertificates(certificates):
 certs = []
 for cert in certificates:
  if isinstance(cert, CertBase):
   cert = cert.original
  else:
   raise TypeError('certificates items must be twisted.internet.ssl.CertBase instances')
  certs.append(cert)
 return OpenSSLCertificateAuthorities(certs)

def trustRootFromCertificates ( certificates ) : certs = [ ] for cert in certificates : if isinstance ( cert , CertBase ) : cert = cert . original else : raise TypeError ( 'certificates items must be twisted.internet.ssl.CertBase instances' ) certs . append ( cert ) return OpenSSLCertificateAuthorities ( certs )
builds an object that trusts multiple root l{certificate}s .