plattfot / pinentry-rofi

Rofi frontend to pinentry
43 stars 5 forks source link

Ask again on wrong entered password #3

Closed d-vb closed 4 years ago

d-vb commented 4 years ago

pinentry-qt asks up to 3 times when you enter a wrong password. Would it be possible to implement this behavior also for pinentry-rofi?

Thank you very much!

plattfot commented 4 years ago

I'll look into it.

plattfot commented 4 years ago

Ok, been poking at this for a bit now. But not gotten any closer. I can catch the SETERROR Bad Passphrase (try 2 of 3) but after that it just dies, no idea why.

Leaning towards using the libassuan library, by just creating a wrapper around it. Would be a good exercise on how to the FFI works in guile and would make this more robust.

In either case this will not be a quick fix. Will continue working on it and keep this thread updated.

plattfot commented 4 years ago

Sigh Was just me being stupid, I had missed a ! on my set-pinentry-error! so it was silently failing when running as it was calling a function that didn't exist. Good thing it was just that simple. As moving this to libassuan would be quite a lot of work, given that guile's FFI is really low level.

Anyway, I added support to ask for the password again if it's wrong in 0.5.0. Please give it a try and see if it works.

A side note, if you are using rofi-pass I noticed that it will still act as if the password is correct even though it failed to decrypt it. Which is a bit confusing. First I thought it was a bug in this code.

d-vb commented 4 years ago

Great, it works. Thanks a lot! :)

Yes, you are right with rofi-pass, but at least only after you entered a wrong password for 3 times. That is why I was hoping for this feature. \o/

plattfot commented 4 years ago

Yeah, at least now you'll know if you typed in the password wrong the first two times. :smiley:

Closing this.