2017-04-17 18:08:24 -04:00
|
|
|
// +build !pkcs11
|
|
|
|
|
|
|
|
package client
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
|
|
|
|
"github.com/docker/notary"
|
|
|
|
"github.com/docker/notary/trustmanager"
|
|
|
|
)
|
|
|
|
|
2017-08-24 18:40:24 -04:00
|
|
|
func getKeyStores(baseDir string, retriever notary.PassRetriever) ([]trustmanager.KeyStore, error) {
|
2017-04-17 18:08:24 -04:00
|
|
|
fileKeyStore, err := trustmanager.NewKeyFileStore(baseDir, retriever)
|
|
|
|
if err != nil {
|
|
|
|
return nil, fmt.Errorf("failed to create private key store in directory: %s", baseDir)
|
|
|
|
}
|
2017-08-24 18:40:24 -04:00
|
|
|
return []trustmanager.KeyStore{fileKeyStore}, nil
|
2017-04-17 18:08:24 -04:00
|
|
|
}
|