From 75982ad3229c6b0dd001b289c204a67c3204fd3c Mon Sep 17 00:00:00 2001 From: Bernd Schoolmann Date: Fri, 9 Feb 2024 15:03:42 +0100 Subject: [PATCH] Enable regular pinentry --- agent/systemauth/pinentry/pinentry.go | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/agent/systemauth/pinentry/pinentry.go b/agent/systemauth/pinentry/pinentry.go index 8b0951f..24c3ec1 100644 --- a/agent/systemauth/pinentry/pinentry.go +++ b/agent/systemauth/pinentry/pinentry.go @@ -33,29 +33,29 @@ func SetExternalPinentry(pinentry Pinentry) error { } func GetPassword(title string, description string) (string, error) { - // password, err := getPassword(title, description) - // if err == nil { - // return password, nil - // } + password, err := getPassword(title, description) + if err == nil { + return password, nil + } if externalPinentry.GetPassword != nil { return externalPinentry.GetPassword(title, description) } - return "", errors.New("Not implemented") - // return password, nil + // return "", errors.New("Not implemented") + return password, nil } func GetApproval(title string, description string) (bool, error) { - // approval, err := getApproval(title, description) - // if err == nil { - // return approval, nil - // } + approval, err := getApproval(title, description) + if err == nil { + return approval, nil + } if externalPinentry.GetApproval != nil { return externalPinentry.GetApproval(title, description) } - // return approval, nil - return true, errors.New("Not implemented") + // return true, errors.New("Not implemented") + return approval, nil }