mirror of
https://github.com/docker/docs.git
synced 2026-03-31 00:08:55 +07:00
hold unlocked signer on repository
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
This commit is contained in:
committed by
Diogo Monica
parent
c3e49afe1a
commit
ebbb30b56c
@@ -188,7 +188,7 @@ func (r *NotaryRepository) Initialize(rootKey *data.PublicKey) error {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := r.saveMetadata(uSigner.signer); err != nil {
|
||||
if err := r.saveMetadata(r.rootSigner.signer); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -295,7 +295,7 @@ func (r *NotaryRepository) Publish() error {
|
||||
return err
|
||||
}
|
||||
|
||||
root, err := r.tufRepo.SignRoot(data.DefaultExpires("root"), r.rootSigner)
|
||||
root, err := r.tufRepo.SignRoot(data.DefaultExpires("root"), r.rootSigner.signer)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ func tufAdd(cmd *cobra.Command, args []string) {
|
||||
targetPath := args[2]
|
||||
|
||||
t := &http.Transport{}
|
||||
repo, err := nClient.GetRepository(gun, "", t)
|
||||
repo, err := nClient.GetRepository(gun, "", t, nil)
|
||||
if err != nil {
|
||||
fatalf(err.Error())
|
||||
}
|
||||
@@ -125,7 +125,7 @@ func tufList(cmd *cobra.Command, args []string) {
|
||||
gun := args[0]
|
||||
|
||||
t := &http.Transport{}
|
||||
repo, err := nClient.GetRepository(gun, "", t)
|
||||
repo, err := nClient.GetRepository(gun, "", t, nil)
|
||||
if err != nil {
|
||||
fatalf(err.Error())
|
||||
}
|
||||
@@ -151,7 +151,7 @@ func tufLookup(cmd *cobra.Command, args []string) {
|
||||
targetName := args[1]
|
||||
|
||||
t := &http.Transport{}
|
||||
repo, err := nClient.GetRepository(gun, "", t)
|
||||
repo, err := nClient.GetRepository(gun, "", t, nil)
|
||||
if err != nil {
|
||||
fatalf(err.Error())
|
||||
}
|
||||
@@ -176,7 +176,7 @@ func tufPublish(cmd *cobra.Command, args []string) {
|
||||
fmt.Println("Pushing changes to ", gun, ".")
|
||||
|
||||
t := &http.Transport{}
|
||||
repo, err := nClient.GetRepository(gun, "", t)
|
||||
repo, err := nClient.GetRepository(gun, "", t, nil)
|
||||
if err != nil {
|
||||
fatalf(err.Error())
|
||||
}
|
||||
@@ -222,7 +222,7 @@ func verify(cmd *cobra.Command, args []string) {
|
||||
gun := args[0]
|
||||
targetName := args[1]
|
||||
t := &http.Transport{}
|
||||
repo, err := nClient.GetRepository(gun, "", t)
|
||||
repo, err := nClient.GetRepository(gun, "", t, nil)
|
||||
if err != nil {
|
||||
fatalf(err.Error())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user