From 820b0759e36203ae4c39248963453a9b6d5c28c4 Mon Sep 17 00:00:00 2001 From: Jean-Paul Calderone <exarkun@twistedmatrix.com> Date: Thu, 26 Sep 2019 15:41:07 -0400 Subject: [PATCH] write the necessary client configuration to use our plugin --- nixos/modules/tests/run-client.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/nixos/modules/tests/run-client.py b/nixos/modules/tests/run-client.py index cdf8ffeb..4b667da7 100755 --- a/nixos/modules/tests/run-client.py +++ b/nixos/modules/tests/run-client.py @@ -4,6 +4,7 @@ from os import environ from sys import argv from shutil import which from subprocess import check_output +from configparser import ConfigParser def main(): (introducerFURL,) = argv[1:] @@ -22,6 +23,18 @@ def main(): "/tmp/client", ]) + # Add necessary ZKAPAuthorizer configuration bits. + config = ConfigParser() + with open("/tmp/client/tahoe.cfg") as cfg: + config.read_file(cfg) + + config.set(u"client", u"storage.plugins", u"privatestorageio-zkapauthz-v1") + config.add_section(u"storageclient.plugins.privatestorageio-zkapauthz-v1") + config.set(u"storageclient.plugins.privatestorageio-zkapauthz-v1", u"redeemer", u"ristretto") + + with open("/tmp/client/tahoe.cfg", "wt") as cfg: + config.write(cfg) + run([ "daemonize", "-o", "/tmp/stdout", -- GitLab