Allow reading pin from kms string

This commit is contained in:
Gary Belvin 2021-06-15 12:30:28 +01:00
parent 8d7c3d2f08
commit 063a09a521

View file

@ -119,7 +119,12 @@ func main() {
fatal(err) fatal(err)
} }
if u.Pin() == "" && c.Pin == "" { kmsPin := u.Pin()
if c.Pin == "" && kmsPin != "" {
c.Pin = kmsPin
}
if c.Pin == "" {
pin, err := ui.PromptPassword("What is the PKCS#11 PIN?") pin, err := ui.PromptPassword("What is the PKCS#11 PIN?")
if err != nil { if err != nil {
fatal(err) fatal(err)