forked from hyperledger/fabric
-
Notifications
You must be signed in to change notification settings - Fork 0
/
idemixgen.go
47 lines (39 loc) · 793 Bytes
/
idemixgen.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package commands
type CAKeyGen struct {
Output string
}
func (c CAKeyGen) SessionName() string {
return "idemixgen-ca-key-gen"
}
func (c CAKeyGen) Args() []string {
return []string{
"ca-keygen",
"--output", c.Output,
}
}
type SignerConfig struct {
CAInput string
Output string
OrgUnit string
Admin bool
EnrollmentID string
RevocationHandle string
}
func (c SignerConfig) SessionName() string {
return "idemixgen-signerconfig"
}
func (c SignerConfig) Args() []string {
return []string{
"signerconfig",
"--ca-input", c.CAInput,
"--output", c.Output,
"--admin",
"-u", c.OrgUnit,
"-e", c.EnrollmentID,
"-r", c.RevocationHandle,
}
}