From 74e84270a189c683833e054804dab437cc8afe17 Mon Sep 17 00:00:00 2001 From: Eduardo Date: Wed, 11 Mar 2020 11:47:10 -0300 Subject: [PATCH] fixing p11lib detection on reset-pkcs11-keys --- cmd/reset-pkcs11-keys.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/reset-pkcs11-keys.go b/cmd/reset-pkcs11-keys.go index 6c20ea5..8813730 100644 --- a/cmd/reset-pkcs11-keys.go +++ b/cmd/reset-pkcs11-keys.go @@ -24,7 +24,7 @@ func resetPKCS11Keys(cmd *cobra.Command, args []string) error { if err := viper.BindPFlags(cmd.Flags()); err != nil { return err } - p11lib, _ := cmd.Flags().GetString("p11lib") + p11lib := viper.GetString("p11lib") if len(p11lib) == 0 { return fmt.Errorf("p11lib not specified") } @@ -49,4 +49,4 @@ func resetPKCS11Keys(cmd *cobra.Command, args []string) error { } Log.Printf("All keys destroyed.") return nil -} \ No newline at end of file +}