func getKeystore() *keystore.Keystore { if globalFlags.InsecureFlags.SkipImageCheck() { return nil } config := keystore.NewConfig(globalFlags.SystemConfigDir, globalFlags.LocalConfigDir) return keystore.New(config) }
func getKeystore() *keystore.Keystore { if globalFlags.InsecureSkipVerify { return nil } config := keystore.NewConfig(globalFlags.SystemConfigDir, globalFlags.LocalConfigDir) return keystore.New(config) }
// addPubKey adds a key to the keystore func addPubKey(prefix string, key *os.File) (err error) { ks := keystore.New(nil) var path string if prefix == "" { path, err = ks.StoreTrustedKeyRoot(key) stdout("Added root key at %q", path) } else { path, err = ks.StoreTrustedKeyPrefix(prefix, key) stdout("Added key for prefix %q at %q", prefix, path) } return }