def _index(self, metadata):
        for cert_pem in metadata.trustedCertificates:
            if isinstance(cert_pem, text_type):
                cert_pem = cert_pem.encode('ascii')
            cert = x509.load_pem_x509_certificate(cert_pem, default_backend())
            subject = cert.subject.get_attributes_for_oid(NameOID.COMMON_NAME)[0].value
            if subject not in self._certs:
                self._certs[subject] = []
            self._certs[subject].append(cert)
            self._metadata[cert] = metadata
dataset/ETHPy150Open Yubico/python-u2flib-server/u2flib_server/attestation/resolvers.py/MetadataResolver._index/original