diff --git a/secret_service/secret_service.go b/secret_service/secret_service.go index 2037e40..38fef31 100644 --- a/secret_service/secret_service.go +++ b/secret_service/secret_service.go @@ -2,6 +2,7 @@ package ss import ( "fmt" + "strings" "errors" @@ -65,7 +66,14 @@ func (s *SecretService) OpenSession() (dbus.BusObject, error) { var sessionPath dbus.ObjectPath err := s.object.Call(serviceInterface+".OpenSession", 0, "plain", dbus.MakeVariant("")).Store(&disregard, &sessionPath) if err != nil { - return nil, err + if strings.Contains(err.Error(), "Algorithm plain is not supported") { + err := s.object.Call(serviceInterface+".OpenSession", 0, "dh-ietf1024-sha256-aes128-cbc-pkcs7", dbus.MakeVariant("")).Store(&disregard, &sessionPath) + if err != nil { + return nil, err + } + } else { + return nil, err + } } return s.Object(serviceName, sessionPath), nil