diff options
author | Rasmus Dahlberg <rasmus.dahlberg@kau.se> | 2021-06-06 15:59:35 +0200 |
---|---|---|
committer | Rasmus Dahlberg <rasmus.dahlberg@kau.se> | 2021-06-06 15:59:35 +0200 |
commit | 47bacfd5c5d22470340e0823c4ad37b45914b68e (patch) | |
tree | 0984b55ced1e537e8d1d681c77157f1a47e47cdc /client/cmd/submit/main.go | |
parent | 0285454c34b0b3003bc8ede3e304b843ad949be8 (diff) |
started using the refactored packages in siglog server
Diffstat (limited to 'client/cmd/submit/main.go')
-rw-r--r-- | client/cmd/submit/main.go | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/client/cmd/submit/main.go b/client/cmd/submit/main.go deleted file mode 100644 index 36c7271..0000000 --- a/client/cmd/submit/main.go +++ /dev/null @@ -1,28 +0,0 @@ -package main - -// go run . | bash - -import ( - "crypto/ed25519" - "crypto/rand" - "fmt" - "github.com/system-transparency/stfe/types" -) - -func main() { - checksum := [32]byte{} - msg := types.Message{ - ShardHint: 0, - Checksum: &checksum, - } - - vk, sk, err := ed25519.GenerateKey(rand.Reader) - if err != nil { - fmt.Printf("ed25519.GenerateKey: %v\n", err) - return - } - sig := ed25519.Sign(sk, msg.Marshal()) - //fmt.Printf("sk: %x\nvk: %x\n", sk[:], vk[:]) - - fmt.Printf("echo \"shard_hint=%d\nchecksum=%x\nsignature_over_message=%x\nverification_key=%x\ndomain_hint=%s\" | curl --data-binary @- localhost:6965/st/v0/add-leaf\n", msg.ShardHint, msg.Checksum[:], sig, vk[:], "example.com") -} |