code: def get_certificate_der(self, filename):
          
          pkcs7message = self.get_file(filename)
  
          pkcs7obj = cms.ContentInfo.load(pkcs7message)
          cert = pkcs7obj['content']['certificates'][0].chosen.dump()
          return cert
docs: Return the DER coded X.509 certificate from the signature file.
  
          :param filename: Signature filename in APK
          :returns: DER coded X.509 certificate as binary