Skip to content
Snippets Groups Projects
Commit 0570f02b authored by Jean-Paul Calderone's avatar Jean-Paul Calderone
Browse files

Accept some configuration for the issuer

Let us pick Ristretto and supply a key if we like.
parent 961fc8d0
No related branches found
No related tags found
1 merge request!10End-to-end with ristretto
......@@ -14,6 +14,23 @@ in {
The package to use for the ZKAP issuer.
'';
};
services.private-storage-issuer.issuer = lib.mkOption {
default = "Ristretto";
type = lib.types.str;
example = lib.literalExample "Trivial";
description = ''
The issuer algorithm to use. Either Trivial for a fake no-crypto
algorithm or Ristretto for Ristretto-flavored PrivacyPass.
'';
};
services.private-storage-issuer.ristrettoSigningKey = lib.mkOption {
default = null;
type = lib.types.str;
description = ''
The Ristretto signing key to use. Required if the issuer is
``Ristretto``.
'';
};
};
config = let
......@@ -27,7 +44,14 @@ in {
after = [ "network.target" ];
serviceConfig = {
ExecStart = "${cfg.package}/bin/PaymentServer-exe";
ExecStart =
let
args =
if cfg.issuer == "Trivial"
then "--issuer Trivial"
else "--issuer Ristretto --signing-key ${cfg.ristrettoSigningKey}";
in
"${cfg.package}/bin/PaymentServer-exe ${args}";
Type = "simple";
Restart = "always";
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment