You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: evoting/evoting-admin/app.go
+127-29
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@ import (
7
7
"encoding/json"
8
8
"flag"
9
9
"fmt"
10
+
"go.dedis.ch/cothority/v3/evoting/lib"
10
11
"os"
11
12
"strconv"
12
13
"strings"
@@ -23,56 +24,104 @@ import (
23
24
)
24
25
25
26
var (
26
-
argRoster=flag.String("roster", "", "path to roster toml file")
27
-
argAdmins=flag.String("admins", "", "list of admin users")
28
-
argPin=flag.String("pin", "", "service pin")
29
-
argKey=flag.String("key", "", "public key of authentication server")
30
-
argID=flag.String("id", "", "ID of the master chain to modify (optional)")
31
-
argUser=flag.Int("user", 0, "The SCIPER of an existing admin of this chain")
32
-
argSig=flag.String("sig", "", "A signature proving that you can login to Tequila with the given SCIPER.")
33
-
argShow=flag.Bool("show", false, "Show the current Master config")
34
-
argDumpVoters=flag.Bool("dumpvoters", false, "Dump a list of voters for election skipchain specified with -id (ballot de-duplication has already been taken into account, order is preserved)")
35
-
argDumpElection=flag.Bool("dumpelection", false, "Dump the current election config for the election specified with -id.")
36
-
argJSON=flag.Bool("json", false, "Dump in json mode.")
37
-
argLoad=flag.String("load", "", "Load the specified json file to modify the election specified with -id.")
27
+
argRoster=flag.String("roster", "", "path to roster toml file")
28
+
argAdmins=flag.String("admins", "", "list of admin users")
29
+
argPin=flag.String("pin", "", "service pin")
30
+
argKey=flag.String("key", "", "public key of authentication server")
31
+
argPrivate=flag.String("private", "", "private key of authentication server for voting")
32
+
argID=flag.String("id", "", "ID of the master chain to modify (optional)")
33
+
argUser=flag.Int("user", 0, "The SCIPER of an existing admin of this chain")
34
+
argSig=flag.String("sig", "", "A signature proving that you can login to Tequila with the given SCIPER.")
35
+
argShow=flag.Bool("show", false, "Show the current Master config")
36
+
argDumpVoters=flag.Bool("dumpvoters", false, "Dump a list of voters for election skipchain specified with -id (ballot de-duplication has already been taken into account, order is preserved)")
37
+
argDumpElection=flag.Bool("dumpelection", false, "Dump the current election config for the election specified with -id.")
38
+
argJSON=flag.Bool("json", false, "Dump in json mode.")
39
+
argLoad=flag.String("load", "", "Load the specified json file to modify the election specified with -id.")
40
+
argVoteCandidates=flag.String("voteCandidates", "", "Coma delimited list of SCIPERs to vote for")
41
+
argDebug=flag.Int("debug", 0, "Debugging level")
38
42
)
39
43
40
44
funcmain() {
41
45
flag.Parse()
42
46
47
+
if*argDebug>0 {
48
+
log.SetDebugVisible(*argDebug)
49
+
}
50
+
43
51
if*argRoster=="" {
44
52
log.Fatal("Roster argument (-roster) is required for create, update, or show.")
0 commit comments