Exemple #1
0
func getKeystore() *keystore.Keystore {
	if globalFlags.InsecureFlags.SkipImageCheck() {
		return nil
	}
	config := keystore.NewConfig(globalFlags.SystemConfigDir, globalFlags.LocalConfigDir)
	return keystore.New(config)
}
Exemple #2
0
Fichier : rkt.go Projet : NeilW/rkt
func getKeystore() *keystore.Keystore {
	if globalFlags.InsecureSkipVerify {
		return nil
	}
	config := keystore.NewConfig(globalFlags.SystemConfigDir, globalFlags.LocalConfigDir)
	return keystore.New(config)
}
Exemple #3
0
// 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
}