Don't double read from u.Pin()

This commit is contained in:
Gary Belvin 2021-06-15 18:13:08 +01:00
parent 063a09a521
commit a63a1d6482

View File

@ -119,19 +119,6 @@ func main() {
fatal(err)
}
kmsPin := u.Pin()
if c.Pin == "" && kmsPin != "" {
c.Pin = kmsPin
}
if c.Pin == "" {
pin, err := ui.PromptPassword("What is the PKCS#11 PIN?")
if err != nil {
fatal(err)
}
c.Pin = string(pin)
}
k, err := kms.New(context.Background(), apiv1.Options{
Type: string(apiv1.PKCS11),
URI: c.KMS,