Add back UI check, but don't read file

This commit is contained in:
Gary Belvin 2021-06-15 18:18:29 +01:00
parent a63a1d6482
commit c6bb7aa199

View file

@ -119,6 +119,14 @@ func main() {
fatal(err) fatal(err)
} }
if c.Pin == "" && u.Get("pin-value") == "" && u.Get("pin-source") == "" {
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{ k, err := kms.New(context.Background(), apiv1.Options{
Type: string(apiv1.PKCS11), Type: string(apiv1.PKCS11),
URI: c.KMS, URI: c.KMS,