Permalink
Browse files

s/key-transparency/keytransparency

  • Loading branch information...
1 parent 5722417 commit 38193b595f84ccfc649187c3d55afbf399558883 @cesarghali cesarghali committed Jan 18, 2017
View
@@ -13,7 +13,7 @@ CTLOG="http://107.178.246.112"
SIGN_PERIOD_SEC=5
GOOGLE_APPLICATION_CREDENTIALS="service_key.json"
DOMAIN="example.com"
-DB="genfiles/key-transparency-db.sqlite3"
+DB="genfiles/keytransparency-db.sqlite3"
LISTEN_IP="localhost" # To listen on all IPs, use empty string.
KEY="genfiles/server.key"
CERT="genfiles/server.crt"
View
@@ -3,11 +3,11 @@
*~
vendor/*/
-key-transparency-server
-key-transparency-signer
-key-transparency-client
+keytransparency-server
+keytransparency-signer
+keytransparency-client
infra*.etcd
genfiles/*
-.key-transparency-scts.dat
+.keytransparency-scts.dat
.keystore
File renamed without changes.
View
@@ -22,15 +22,15 @@
# TODO: Makefile will be deleted once the repo is public. Check issue #411.
main: client
- go build ./cmd/key-transparency-server
- go build ./cmd/key-transparency-signer
+ go build ./cmd/keytransparency-server
+ go build ./cmd/keytransparency-signer
mysql: client
- go build -tags mysql ./cmd/key-transparency-server
- go build -tags mysql ./cmd/key-transparency-signer
+ go build -tags mysql ./cmd/keytransparency-server
+ go build -tags mysql ./cmd/keytransparency-signer
client:
- go build ./cmd/key-transparency-client
+ go build ./cmd/keytransparency-client
# The list of returned packages might not be unique. Fortunately go test gets
# rid of duplicates.
@@ -55,5 +55,5 @@ proto:
go generate ./...
clean:
- rm -f srv key-transparency-server key-transparency-signer key-transparency-client
+ rm -f srv keytransparency-server keytransparency-signer keytransparency-client
rm -rf infra*
View
@@ -15,5 +15,5 @@
etcd1: etcd --name infra1 --listen-client-urls $LISTEN1 --advertise-client-urls $LISTEN1 --listen-peer-urls $PEER1 --initial-advertise-peer-urls $PEER1 --enable-pprof
etcd2: etcd --name infra2 --listen-client-urls $LISTEN2 --advertise-client-urls $LISTEN2 --listen-peer-urls $PEER2 --initial-advertise-peer-urls $PEER2 --enable-pprof
etcd3: etcd --name infra3 --listen-client-urls $LISTEN3 --advertise-client-urls $LISTEN3 --listen-peer-urls $PEER3 --initial-advertise-peer-urls $PEER3 --enable-pprof
-frontend: ./key-transparency-server --addr=$LISTEN_IP:$PORT --key=$KEY --cert=$CERT --domain=$DOMAIN --db=$DB --maplog=$CTLOG --etcd=$LISTEN --vrf=$VRF_PRIV
-backend: ./key-transparency-signer --domain=$DOMAIN --db=$DB --maplog=$CTLOG --etcd=$LISTEN --period=$SIGN_PERIOD_SEC --key=$SIGN_KEY
+frontend: ./keytransparency-server --addr=$LISTEN_IP:$PORT --key=$KEY --cert=$CERT --domain=$DOMAIN --db=$DB --maplog=$CTLOG --etcd=$LISTEN --vrf=$VRF_PRIV
+backend: ./keytransparency-signer --domain=$DOMAIN --db=$DB --maplog=$CTLOG --etcd=$LISTEN --period=$SIGN_PERIOD_SEC --key=$SIGN_KEY
View
@@ -54,18 +54,18 @@ Set `$GOPATH` variable to point to your Go workspace directory and add `$GOPATH/
5. Set/Update a user's keys.
```sh
- ./key-transparency-client authorized-keys add --generate --type=ecdsa --activate
- ./key-transparency-client post <email> -d '{"app1": "dGVzdA=="}' --config=./.key-transparency.yaml
+ ./keytransparency-client authorized-keys add --generate --type=ecdsa --activate
+ ./keytransparency-client post <email> -d '{"app1": "dGVzdA=="}' --config=./.keytransparency.yaml
{Keys:map[app1:[116 101 115 116]}
```
Key material is base64 encoded.
- Note: Use `./key-transparency-client authorized-keys --help` for more information about authorized key managements.
+ Note: Use `./keytransparency-client authorized-keys --help` for more information about authorized key managements.
6. Fetch and verify a user's keys:
```
- ./key-transparency-client get <email> --config=.key-transparency.yaml --verbose
+ ./keytransparency-client get <email> --config=.keytransparency.yaml --verbose
✓ Commitment verified.
✓ VRF verified.
✓ Sparse tree proof verified.
@@ -79,7 +79,7 @@ Set `$GOPATH` variable to point to your Go workspace directory and add `$GOPATH/
```
```
- ./key-transparency-client history <email> --config=.key-transparency.yaml
+ ./keytransparency-client history <email> --config=.keytransparency.yaml
Epoch |Timestamp |Profile
4 |Mon Sep 12 22:23:54 UTC 2016 |keys:<key:"app1" value:"test" >
```
@@ -78,9 +78,9 @@ var addCmd = &cobra.Command{
Short: "Add a key to the list of authorized keys",
Long: `Provide a pair of public and private keys, already existing on disk, to be added to the list of authorized keys. The --generate flag can be used to generate a random key pair.
-./key-transparency-client authorized-keys add --pubkey=/path/to/PEM/pubkey --description=[comment]
-./key-transparency-client authorized-keys add --privkey=/path/to/PEM/privkey --activate --description=[comment]
-./key-transparency-client authorized-keys add --generate --type=[key_type] --activate --description=[comment]
+./keytransparency-client authorized-keys add --pubkey=/path/to/PEM/pubkey --description=[comment]
+./keytransparency-client authorized-keys add --privkey=/path/to/PEM/privkey --activate --description=[comment]
+./keytransparency-client authorized-keys add --generate --type=[key_type] --activate --description=[comment]
`,
RunE: func(cmd *cobra.Command, args []string) error {
// Validate input.
@@ -142,7 +142,7 @@ var removeCmd = &cobra.Command{
Short: "Remove a key from the list of authorized keys",
Long: `Remove a key based on its key ID from the list of authorized keys. e.g.:
-./key-transparency-client authorized-keys remove [keyid]
+./keytransparency-client authorized-keys remove [keyid]
If the list contains a single key, it cannot be removed.
`,
@@ -171,7 +171,7 @@ var activateCmd = &cobra.Command{
Short: "Activate a key in the list of authorized keys",
Long: `Activate a key based on its key ID in the list of authorized keys. e.g.:
-./key-transparency-client authorized-keys activate [keyid]
+./keytransparency-client authorized-keys activate [keyid]
`,
RunE: func(cmd *cobra.Command, args []string) error {
// Validate input.
@@ -192,7 +192,7 @@ var listCmd = &cobra.Command{
Short: "List all authorized keys",
Long: `List metadata about all authorized keys. e.g.:
-./key-transparency-client authorized-keys list
+./keytransparency-client authorized-keys list
The actual keys are not listed, only their corresponding metadata.
`,
@@ -40,7 +40,7 @@ var postCmd = &cobra.Command{
Long: `Post replaces the current key-set with the provided key-set,
and verifies that both the previous and current key-sets are accurate. eg:
-./key-transparency-client post foobar@example.com -d '{"app1": "dGVzdA==", "app2": "dGVzdA=="}'
+./keytransparency-client post foobar@example.com -d '{"app1": "dGVzdA==", "app2": "dGVzdA=="}'
User email MUST match the OAuth account used to authorize the update.
`,
@@ -22,7 +22,7 @@ import (
"os"
"time"
- "github.com/google/keytransparency/cmd/key-transparency-client/grpcc"
+ "github.com/google/keytransparency/cmd/keytransparency-client/grpcc"
"github.com/google/keytransparency/core/client/ctlog"
"github.com/google/keytransparency/core/client/kt"
"github.com/google/keytransparency/core/signatures"
@@ -50,7 +50,7 @@ var (
// RootCmd represents the base command when called without any subcommands
var RootCmd = &cobra.Command{
- Use: "key-transparency-client",
+ Use: "keytransparency-client",
Short: "A client for interacting with the key transparency server",
Long: `The key transparency client retrieves and sets keys in the
key transparency server. The client verifies all cryptographic proofs the
@@ -80,11 +80,11 @@ func Execute() {
func init() {
cobra.OnInitialize(initConfig)
- RootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.key-transparency.yaml)")
+ RootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.keytransparency.yaml)")
RootCmd.PersistentFlags().String("vrf", "testdata/vrf-pubkey.pem", "path to vrf public key")
RootCmd.PersistentFlags().String("ct-url", "", "URL of Certificate Transparency server")
RootCmd.PersistentFlags().String("ct-key", "testdata/ct-server-key-public.pem", "Path to public key PEM for Certificate Transparency server")
- RootCmd.PersistentFlags().String("ct-scts", ".key-transparency-scts.dat", "Path to load/save unverified SCT state from")
+ RootCmd.PersistentFlags().String("ct-scts", ".keytransparency-scts.dat", "Path to load/save unverified SCT state from")
RootCmd.PersistentFlags().String("domain", "example.com", "Map ID of the Key Transparency server")
RootCmd.PersistentFlags().String("kt-url", "", "URL of Key Transparency server")
RootCmd.PersistentFlags().String("kt-key", "testdata/server.crt", "Path to public key for Key Transparency")
@@ -109,7 +109,7 @@ func initConfig() {
log.Fatalf("Failed reading config file: %v: %v", viper.ConfigFileUsed(), err)
}
} else {
- viper.SetConfigName(".key-transparency")
+ viper.SetConfigName(".keytransparency")
viper.AddConfigPath("$HOME")
if err := viper.ReadInConfig(); err == nil {
fmt.Println("Using config file:", viper.ConfigFileUsed())
@@ -14,7 +14,7 @@
package main
-import "github.com/google/keytransparency/cmd/key-transparency-client/cmd"
+import "github.com/google/keytransparency/cmd/keytransparency-client/cmd"
func main() {
cmd.Execute()
@@ -21,7 +21,7 @@ import (
"sort"
"testing"
- "github.com/google/keytransparency/cmd/key-transparency-client/grpcc"
+ "github.com/google/keytransparency/cmd/keytransparency-client/grpcc"
"github.com/google/keytransparency/core/authentication"
"github.com/google/keytransparency/core/signatures"
"github.com/google/keytransparency/core/signatures/factory"
@@ -20,7 +20,7 @@ import (
"net/http/httptest"
"testing"
- "github.com/google/keytransparency/cmd/key-transparency-client/grpcc"
+ "github.com/google/keytransparency/cmd/keytransparency-client/grpcc"
"github.com/google/keytransparency/core/authentication"
"github.com/google/keytransparency/core/keyserver"
"github.com/google/keytransparency/core/mutator/entry"
@@ -65,9 +65,9 @@ read -p "Path to client secret file: " CLIENTSECRET
cd "${GOPATH}/src/github.com/google/keytransparency"
# Building binaries.
-go build ./cmd/key-transparency-client
+go build ./cmd/keytransparency-client
-# Generate .key-transparency.yaml file.
+# Generate .keytransparency.yaml file.
KTYAML="ct-key: \"../certificate-transparency/test/testdata/ct-server-key-public.pem\"
ct-url: \"http://107.178.246.112\"
vrf: \"${VRF}\"
@@ -77,4 +77,4 @@ domain: \"${DOMAIN}\"
kt-url: \"${KTURL}\"
client-secret: \"${CLIENTSECRET}\""
-printf "%s\n" "${KTYAML}" > .key-transparency.yaml
+printf "%s\n" "${KTYAML}" > .keytransparency.yaml
@@ -112,11 +112,11 @@ cd "${GOPATH}/src/github.com/google/keytransparency"
# Building binaries.
if ((DBENGINE == 1)); then
- go build ./cmd/key-transparency-server
- go build ./cmd/key-transparency-signer
+ go build ./cmd/keytransparency-server
+ go build ./cmd/keytransparency-signer
else
- go build -tags mysql ./cmd/key-transparency-server
- go build -tags mysql ./cmd/key-transparency-signer
+ go build -tags mysql ./cmd/keytransparency-server
+ go build -tags mysql ./cmd/keytransparency-signer
fi
# Create keys.
@@ -154,7 +154,7 @@ fi
if ((DBENGINE == 1)); then
ENV="${ENV}
-DB=\"genfiles/key-transparency-db.sqlite3\""
+DB=\"genfiles/keytransparency-db.sqlite3\""
else
ENV="${ENV}
DB=\"${DSN}\""
@@ -207,12 +207,12 @@ fi
if ((FRONTEND == 1)); then
PROCFILE="${PROCFILE}
-frontend: ./key-transparency-server --addr=\$LISTEN_IP:\$PORT --key=\$KEY --cert=\$CERT --domain=\$DOMAIN --db=\$DB --maplog=\$CTLOG --etcd=\$LISTEN --vrf=\$VRF_PRIV"
+frontend: ./keytransparency-server --addr=\$LISTEN_IP:\$PORT --key=\$KEY --cert=\$CERT --domain=\$DOMAIN --db=\$DB --maplog=\$CTLOG --etcd=\$LISTEN --vrf=\$VRF_PRIV"
fi
if ((BACKEND == 1)); then
PROCFILE="${PROCFILE}
-backend: ./key-transparency-signer --domain=\$DOMAIN --db=\$DB --maplog=\$CTLOG --etcd=\$LISTEN --period=\$SIGN_PERIOD_SEC --key=\$SIGN_KEY"
+backend: ./keytransparency-signer --domain=\$DOMAIN --db=\$DB --maplog=\$CTLOG --etcd=\$LISTEN --period=\$SIGN_PERIOD_SEC --key=\$SIGN_KEY"
fi
printf "%s\n" "${PROCFILE}" > Procfile

0 comments on commit 38193b5

Please sign in to comment.