commit 3e2950074a26a8e4536ac02759b5e85c4e8f20b8
parent 4a23199db42dbac77d8b5fd443b053829bb97382
Author: parazyd <parazyd@dyne.org>
Date: Thu, 7 Dec 2017 18:53:31 +0100
Disable signature validation until #23032 is resolved.
Diffstat:
2 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/go/lib/crypto.go b/go/lib/crypto.go
@@ -102,7 +102,7 @@ func VerifyMsg(message []byte, signature []byte, pubkey []byte) (bool, error) {
return false, errors.New("failed to parse PEM block containing the key")
}
- // This is a bug in golang. Reported at: https://github.com/golang/go/issues/23032
+ // FIXME: Golang bug. Reported at: https://github.com/golang/go/issues/23032
pkey, err := x509.ParsePKIXPublicKey(block.Bytes)
CheckError(err)
diff --git a/go/lib/helpers.go b/go/lib/helpers.go
@@ -73,15 +73,19 @@ func ValidateReq(req map[string]string) bool {
//log.Println(pubkey)
}
+ // FIXME: commented until bug 23032 is resolved.
+ // https://github.com/golang/go/issues/23032
// Validate signature.
- msg := []byte(req["message"])
- sig := []byte(req["signature"])
- pub := []byte(pubkey)
- val, err := VerifyMsg(msg, sig, pub)
- CheckError(err)
- if val != true {
- return false
- }
+ /*
+ msg := []byte(req["message"])
+ sig := []byte(req["signature"])
+ pub := []byte(pubkey)
+ val, err := VerifyMsg(msg, sig, pub)
+ CheckError(err)
+ if val != true {
+ return false
+ }
+ */
return true
}