Enable regular pinentry

This commit is contained in:
Bernd Schoolmann 2024-02-09 15:03:42 +01:00
parent 219a8cb849
commit 75982ad322
No known key found for this signature in database

View file

@ -33,29 +33,29 @@ func SetExternalPinentry(pinentry Pinentry) error {
} }
func GetPassword(title string, description string) (string, error) { func GetPassword(title string, description string) (string, error) {
// password, err := getPassword(title, description) password, err := getPassword(title, description)
// if err == nil { if err == nil {
// return password, nil return password, nil
// } }
if externalPinentry.GetPassword != nil { if externalPinentry.GetPassword != nil {
return externalPinentry.GetPassword(title, description) return externalPinentry.GetPassword(title, description)
} }
return "", errors.New("Not implemented") // return "", errors.New("Not implemented")
// return password, nil return password, nil
} }
func GetApproval(title string, description string) (bool, error) { func GetApproval(title string, description string) (bool, error) {
// approval, err := getApproval(title, description) approval, err := getApproval(title, description)
// if err == nil { if err == nil {
// return approval, nil return approval, nil
// } }
if externalPinentry.GetApproval != nil { if externalPinentry.GetApproval != nil {
return externalPinentry.GetApproval(title, description) return externalPinentry.GetApproval(title, description)
} }
// return approval, nil // return true, errors.New("Not implemented")
return true, errors.New("Not implemented") return approval, nil
} }