diff options
author | Rasmus Dahlberg <rasmus@mullvad.net> | 2022-04-29 23:00:26 +0200 |
---|---|---|
committer | Rasmus Dahlberg <rasmus@mullvad.net> | 2022-04-29 23:00:26 +0200 |
commit | 7661965ed955bc3b8fcbc544a346020e15678c02 (patch) | |
tree | d382464d2775d5417659daaeeb56c839cb91a676 /cmd/tmp/dns/main.go | |
parent | 203e2144f67269e879716e6406bb78e8e3728938 (diff) |
remove programs that sigsum-debug replaced
Diffstat (limited to 'cmd/tmp/dns/main.go')
-rw-r--r-- | cmd/tmp/dns/main.go | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/cmd/tmp/dns/main.go b/cmd/tmp/dns/main.go deleted file mode 100644 index ea0a4e5..0000000 --- a/cmd/tmp/dns/main.go +++ /dev/null @@ -1,42 +0,0 @@ -package main - -import ( - "context" - "flag" - "fmt" - "log" - - "git.sigsum.org/sigsum-go/pkg/hex" - "git.sigsum.org/sigsum-go/pkg/types" - "git.sigsum.org/log-go/pkg/dns" -) - -var ( - vk = flag.String("vk", "5aed7ffc3bc088221f6579567b2e6e3c4ac3579bd5e77670755179052c68d5d3", "public key (hex)") - domain_hint = flag.String("domain_hint", "example.com", "domain name that is aware of public key hash in hex") -) - -func main() { - flag.Parse() - - var key types.PublicKey - mustDecodeHex(*vk, key[:]) - - vf := dns.NewDefaultResolver() - if err := vf.Verify(context.Background(), *domain_hint, &key); err != nil { - log.Fatal(err) - } - - fmt.Println("Success!") -} - -func mustDecodeHex(s string, buf []byte) { - b, err := hex.Deserialize(s) - if err != nil { - log.Fatal(err) - } - if len(b) != len(buf) { - log.Fatal("bad flag: invalid buffer length") - } - copy(buf, b) -} |