code: def process_pkcs7(self, data, name):
          
          from cryptography.hazmat.backends.openssl.backend import backend
          from cryptography.hazmat.backends.openssl.x509 import _Certificate
  
          # DER conversion
          is_pem = startswith(data, '-----')
          if self.re_match(r'^[a-zA-Z0-9-\s+=/]+$', data):
              is_pem = True
  
          try:
              der = data
              if is_pem:
                  data = data.decode('utf8')
                  data = re.sub(r'\s*-----\s*BEGIN\s+PKCS7\s*-----', '', data)
                  data = re.sub(r'\s*-----\s*END\s+PKCS7\s*-----', '', data)
                  der = base64.b64decode(data)
  
              bio = backend._bytes_to_bio(der)
              pkcs7 = backend._lib.d2i_PKCS7_bio(bio.bio, backend._ffi.NULL)
              backend.openssl_assert(pkcs7 != backend._ffi.NULL)
              signers = backend._lib.PKCS7_get0_signers(pkcs7, backend._ffi.NULL, 0)
              backend.openssl_assert(signers != backend._ffi.NULL)
              backend.openssl_assert(backend._lib.sk_X509_num(signers) > 0)
              x509_ptr = backend._lib.sk_X509_value(signers, 0)
              backend.openssl_assert(x509_ptr != backend._ffi.NULL)
              x509_ptr = backend._ffi.gc(x509_ptr, backend._lib.X509_free)
              x509 = _Certificate(backend, x509_ptr)
  
              self.num_pkcs7_cert += 1
  
              return [self.process_x509(x509, name=name, pem=False, source='pkcs7-cert', aux='')]
  
          except Exception as e:
              logger.debug('Error in PKCS7 processing %s: %s' % (name, e))
              self.trace_logger.log(e)
docs: Process PKCS7 signature with certificate in it.
          :param data:
          :param name:
          :return: