- Queries
- All Stories
- Search
- Advanced Search
- Transactions
- Transaction Logs
All Stories
Jul 25 2019
Adding the patch here.
I was afraid that there are wrong usage where HANDLE is passed where int for fd is expected (or opposite).
But it seems, there are only usage where it should be gnupg_fd_t ideally but using int.
I'd like to push your change to master, if possible with exact check.
Do you intend to put your comment to the master repo? Or, it's for discussion?
It's OK for your topic branch, but, I feel that it would be too long to be included to master repo.
I'm confusing if following API should use gnupg_fd_t or not:
- iobuf_fdopen, iobuf_fdopen_nc
- Perhaps, these are using int for fd, like es_fdopen
- set_attrib_fd ?
- read_passphrase_from_fd ?
- set_status_fd ?
- is_secured_file ?
As far as I know, usually, gpg/gpgsm can assume same version of gpg-agent.
I pushed a fix to master: rG858dc9564326: scd: Fix bBWI value.
Except w32_system function, it's done.
APIs which need revise (where we use pid_t):
API which uses int for fd:
GnuPG common:
- gnupg_create_pipe, gnupg_create_outbound_pipe, gnupg_create_inbound_pipe
- gnupg_spawn_process_fd
gpgrt:
- gpgrt_make_pipe (not yet exposed to public API)
- gpgrt_spawn_process_fd (not yet exposed to public API)
HANDLE type casting to long is wrong (it results masking the value to 32-bit, which is not needed).
I fixed:
I've just broken out my changes into two commits, one that makes gpg and gpgsm more robust. That should be applicable without any risk.
I see your point (I am also the one who implements reader/token). That's reasonable argument.
Thanks for your report, with helpful log.
Jul 24 2019
thanks for the report and trying to help with Gpg4win. The underlying problem is that our backend (GnuPG) does not provide proper error handling when changing the expiry date. We already had an issue for that so I've merged this task with T4395.
I've just posted rGb84feb0c82eb to the dkg-fix-T4652 branch, which solves the failure problems by making agent_pkdecrypt and gpgsm_agent_pkdecrypt more robust.
Jul 23 2019
fwiw, this patch appears to cause gpgsm to fail its test suite:
I've just pushed rG1ae16838660a to the dkg-fix-T4652 branch (i just adjusted it the commit message to include the GnuPG-bug-id)
I installed microsoft office 2016 on a brand new laptop and got the same problem described in the post listed above.
My solution was to uninstall the pre-configured app : "Microsoft Office Desktop Apps" and voila!!
Thanks aheinecke and dkg.
I havent been able to replicate the fault using the command line (using the exact same command and options that our program is calling)
however our R&D dept have,
The next time it fails and we can replicate it we will try the --homedir fix and see if thats it.
Its the same user in the program and command prompt so we dont think its a certificate issue.
when you double click a key and then click "Export" you get a copy & paste version of the key.
Thanks for the report. It is always good to have such issues documented.
This pretty much matches my test setup. As the crash is in GPGME it is out of Kleopatra's hand. So I'll try to write a test that repeats such a signing for lots of times. I think this is probably some random race condition.
I think that even if the reason is corrupted keys it would be good to handle this better, either in Kleopatra or in GnuPG. e.g. Kleopatra could detect if a keylisting takes too long and offer to do some cleanup programatically.
I don't think I can reproduce it, at least it didn't happen anymore after restarting and continuing the imports. AFAIR it happened after importing the "Master Key", during trying to import the "Release Key" from https://www.chiark.greenend.org.uk/~sgtatham/putty/keys.html
Ah and maybe one more hint: I have several keypairs, so the dialog for choosing the keypair to be used appears in the next step.
I'm also not sure how to classify this issue. I'm giving it low priority for now as we do not have the info to determine if this is a program error.
I think we had that issue in the past and solved it. It probably broke again. There is an external library we use for this dialog and that might have regressed in the latest update.
Mmh, the error log only tells me that it crashed in our GPGME library. So it is a bug in our software.
Hi Florian,
This report doesn't contain enough information to be able to tell you why the command is failing within your program, but not failing outside of it.
Jul 22 2019
Thanks for clarification.
However, CCID_CMD_TIMEOUT should be then based on BWT value reported by the card/reader, as bulk_in() function will still timeout if BWT is longer than 5 seconds.
Thanks for pointing me in the right direction. I was confused by the hard-coded timeout value and got it all wrong.
Hi everyone,
Backported.
I realized that it's a product of token. Then, I suggest that implementing time extension correctly, if some operation doesn't finish in BWT (block waiting time).
In general, if it requires more time, a reader can reply with time extension.
What's Trustica Cryptoucan?
In general, if it requires more time, a reader can reply with time extension.
FYI, we have "factory-reset" command in gpg --card-edit; It is not enough for a card to have admin locked state, but it requires normal user locked state, too.