From b8af9fe60f27353bdd5933ed37508b30d4290046 Mon Sep 17 00:00:00 2001 From: Niall Sheridan Date: Sun, 5 Jun 2016 22:18:24 +0100 Subject: Add AWS S3 and Google GCS virtual filesystems. This allows the signing key to be read directly from S3 using a path like /s3// or /gcs//. --- server/signer/signer.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'server/signer') diff --git a/server/signer/signer.go b/server/signer/signer.go index 8be5cad..1be6d75 100644 --- a/server/signer/signer.go +++ b/server/signer/signer.go @@ -4,11 +4,13 @@ import ( "crypto/md5" "crypto/rand" "fmt" - "io/ioutil" "log" "strings" "time" + "go4.org/wkfs" + _ "go4.org/wkfs/gcs" // Register "/gcs/" as a wkfs. + "github.com/nsheridan/cashier/lib" "github.com/nsheridan/cashier/server/config" "golang.org/x/crypto/ssh" @@ -71,7 +73,7 @@ func makeperms(perms []string) map[string]string { // New creates a new KeySigner from the supplied configuration. func New(conf config.SSH) (*KeySigner, error) { - data, err := ioutil.ReadFile(conf.SigningKey) + data, err := wkfs.ReadFile(conf.SigningKey) if err != nil { return nil, fmt.Errorf("unable to read CA key %s: %v", conf.SigningKey, err) } -- cgit v1.2.3