def policy(content, path=None): # pylint: disable=unused-argument """Simplestreams policy function. @param content: signed content @param path: not used @return: policy for simplestreams """ return s_util.read_signed(content, keyring=keyring)
def policy(content, path): if path.endswith('sjson'): return read_signed(content, keyring=KEYRING) else: return content
def policy(content, path): return s_util.read_signed(content, keyring=img_conf['keyring'])
def test_read_signed(self): path = os.path.join(EXAMPLES_DIR, 'foocloud/streams/v1/index.sjson') with open(path) as fileobj: util.read_signed(fileobj.read())
def test_no_check(self): streams = os.path.join(EXAMPLES_DIR, 'foocloud/streams/v1') path = os.path.join(streams, 'index.sjson') with open(path) as fileobj: util.read_signed(fileobj.read(), checked=False)
def policy(content, path): # pylint: disable=W0613 """Read signed content with the defined keyring.""" return s_util.read_signed(content, keyring=self.keyring_path)
def policy(content, path): # pylint: disable=W0613 """TODO.""" return s_util.read_signed(content, keyring=self.keyring_path)
def verify_signature(content, path): """Policy callback for Simplestreams: verify index signature.""" return util.read_signed(content, keyring=args.keyring)
def policy(content, path): # pylint: disable=W0613 if initial_path.endswith('sjson'): return sutil.read_signed(content, keyring=keyring) else: return content