mirror of https://github.com/docker/docs.git
Changed cryptoservice and rufus interface
This commit is contained in:
parent
5b64c7b084
commit
1bef68654e
|
|
@ -27,7 +27,7 @@ func NewCryptoService(gun string) *cliCryptoService {
|
|||
}
|
||||
|
||||
// Create is used to generate keys for targets, snapshots and timestamps
|
||||
func (ccs *cliCryptoService) Create() (*data.PublicKey, error) {
|
||||
func (ccs *cliCryptoService) Create(role string) (*data.PublicKey, error) {
|
||||
_, cert, err := generateKeyAndCert(ccs.gun)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
|
|||
|
|
@ -262,7 +262,7 @@ func tufLookup(cmd *cobra.Command, args []string) {
|
|||
repo := tuf.NewTufRepo(kdb, nil)
|
||||
|
||||
remote, err := store.NewHTTPStore(
|
||||
"https://localhost:4443/v2"+gun+"/_trust/tuf/",
|
||||
"https://vetinari:4443/v2"+gun+"/_trust/tuf/",
|
||||
"",
|
||||
"json",
|
||||
"",
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ func (trust *RufusSigner) Sign(keyIDs []string, toSign []byte) ([]data.Signature
|
|||
}
|
||||
|
||||
// Create creates a remote key and returns the PublicKey associated with the remote private key
|
||||
func (trust *RufusSigner) Create() (*data.PublicKey, error) {
|
||||
func (trust *RufusSigner) Create(role string) (*data.PublicKey, error) {
|
||||
publicKey, err := trust.kmClient.CreateKey(context.Background(), &pb.Void{})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
|
|||
Loading…
Reference in New Issue