tordam

A library for peer discovery inside the Tor network
git clone https://git.parazyd.org/tordam
Log | Files | Refs | README | LICENSE

commit c44b13691b51fd58949f7c3bf60137045edc4150
parent 9b22c43c76f6b74a58f06bdc6544977e6d77e582
Author: parazyd <parazyd@dyne.org>
Date:   Thu,  7 Dec 2017 20:21:21 +0100

Be more informative with some helper functions.

Diffstat:
Mgo/lib/helpers.go | 7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/go/lib/helpers.go b/go/lib/helpers.go @@ -42,7 +42,10 @@ func FetchHSPubkey(addr string) string { CheckError(err) err = cmd.Wait() - CheckError(err) + if err != nil { + log.Println("Could not fetch descriptor. Retrying...") + return "" + } return outb.String() } @@ -63,7 +66,7 @@ func ValidateReq(req map[string]string) bool { // Address is valid, we try to fetch its pubkey from a HSDir var pubkey string - log.Println("Onion seems valid") + log.Println(req["address"], "seems valid") for { // We try until we have it. if strings.HasPrefix(pubkey, "-----BEGIN RSA PUBLIC KEY-----") && strings.HasSuffix(pubkey, "-----END RSA PUBLIC KEY-----") {