...

Source file src/github.com/theupdateframework/go-tuf/cmd/tuf/change_passphrase.go

Documentation: github.com/theupdateframework/go-tuf/cmd/tuf

     1  package main
     2  
     3  import (
     4  	"github.com/flynn/go-docopt"
     5  	"github.com/theupdateframework/go-tuf"
     6  )
     7  
     8  func init() {
     9  	register("change-passphrase", cmdChangePassphrase, `
    10  usage: tuf change-passphrase <role>
    11  
    12  Changes the passphrase for given role keys file.
    13  
    14  Alternatively, passphrases can be passed via environment variables in the
    15  form of TUF_{{ROLE}}_PASSPHRASE for existing ones and
    16  TUF_NEW_{{ROLE}}_PASSPHRASE for setting new ones.
    17  `)
    18  }
    19  
    20  func cmdChangePassphrase(args *docopt.Args, repo *tuf.Repo) error {
    21  	return repo.ChangePassphrase(args.String["<role>"])
    22  }
    23  

View as plain text