Skip to content

Commit 27059ab

Browse files
committed
prlx: add parallax pub key for vulnerabilities check
1 parent f759e90 commit 27059ab

File tree

3 files changed

+9
-13
lines changed

3 files changed

+9
-13
lines changed

cmd/prlx/misccmd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ var (
3333
VersionCheckUrlFlag = cli.StringFlag{
3434
Name: "check.url",
3535
Usage: "URL to use when checking vulnerabilities",
36-
Value: "https://geth.ethereum.org/docs/vulnerabilities/vulnerabilities.json",
36+
Value: "https://parallaxchain.org/vulnerabilities/vulnerabilities.json",
3737
}
3838
VersionCheckVersionFlag = cli.StringFlag{
3939
Name: "check.version",

cmd/prlx/version_check.go

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,9 @@ import (
3131
"gopkg.in/urfave/cli.v1"
3232
)
3333

34-
var gethPubKeys []string = []string{
35-
//@holiman, minisign public key FB1D084D39BAEC24
36-
"RWQk7Lo5TQgd+wxBNZM+Zoy+7UhhMHaWKzqoes9tvSbFLJYZhNTbrIjx",
37-
// minisign public key 138B1CA303E51687
38-
"RWSHFuUDoxyLEzjszuWZI1xStS66QTyXFFZG18uDfO26CuCsbckX1e9J",
39-
// minisign public key FD9813B2D2098484
40-
"RWSEhAnSshOY/b+GmaiDkObbCWefsAoavjoLcPjBo1xn71yuOH5I+Lts",
34+
var parallaxPubKeys []string = []string{
35+
//@andrepatta, minisign public key 468C0DE0AD772F26
36+
"RWQmL3et4A2MRgYYRfxXBqwHO3InwjsWbMeazmSnRryI9YF5Z/CKMTDb",
4137
}
4238

4339
type vulnJson struct {
@@ -73,7 +69,7 @@ func checkCurrent(url, current string) error {
7369
if sig, err = fetch(fmt.Sprintf("%v.minisig", url)); err != nil {
7470
return fmt.Errorf("could not retrieve signature: %w", err)
7571
}
76-
if err = verifySignature(gethPubKeys, data, sig); err != nil {
72+
if err = verifySignature(parallaxPubKeys, data, sig); err != nil {
7773
return err
7874
}
7975
var vulns []vulnJson

cmd/prlx/version_check_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ func TestMatching(t *testing.T) {
131131
}
132132

133133
func TestGethPubKeysParseable(t *testing.T) {
134-
for _, pubkey := range gethPubKeys {
134+
for _, pubkey := range parallaxPubKeys {
135135
_, err := minisign.NewPublicKey(pubkey)
136136
if err != nil {
137137
t.Errorf("Should be parseable")
@@ -148,9 +148,9 @@ func TestKeyID(t *testing.T) {
148148
args args
149149
want string
150150
}{
151-
{"@holiman key", args{id: extractKeyId(gethPubKeys[0])}, "FB1D084D39BAEC24"},
152-
{"second key", args{id: extractKeyId(gethPubKeys[1])}, "138B1CA303E51687"},
153-
{"third key", args{id: extractKeyId(gethPubKeys[2])}, "FD9813B2D2098484"},
151+
{"@holiman key", args{id: extractKeyId(parallaxPubKeys[0])}, "FB1D084D39BAEC24"},
152+
{"second key", args{id: extractKeyId(parallaxPubKeys[1])}, "138B1CA303E51687"},
153+
{"third key", args{id: extractKeyId(parallaxPubKeys[2])}, "FD9813B2D2098484"},
154154
}
155155
for _, tt := range tests {
156156
t.Run(tt.name, func(t *testing.T) {

0 commit comments

Comments
 (0)