tDisable signature validation until #23032 is resolved. - tordam - A library for peer discovery inside the Tor network
 (HTM) git clone https://git.parazyd.org/tordam
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 3e2950074a26a8e4536ac02759b5e85c4e8f20b8
 (DIR) parent 4a23199db42dbac77d8b5fd443b053829bb97382
 (HTM) Author: parazyd <parazyd@dyne.org>
       Date:   Thu,  7 Dec 2017 18:53:31 +0100
       
       Disable signature validation until #23032 is resolved.
       
       Diffstat:
         M go/lib/crypto.go                    |       2 +-
         M go/lib/helpers.go                   |      20 ++++++++++++--------
       
       2 files changed, 13 insertions(+), 9 deletions(-)
       ---
 (DIR) diff --git a/go/lib/crypto.go b/go/lib/crypto.go
       t@@ -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)
        
 (DIR) diff --git a/go/lib/helpers.go b/go/lib/helpers.go
       t@@ -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
        }