I'll add documentation about GCRYCTL_SET_ALLOW_WEAK_KEY which was missing from be original commit.
- Queries
- All Stories
- Search
- Advanced Search
- Transactions
- Transaction Logs
All Stories
Apr 17 2023
tests/basic now actually fail because setkey not returning GPG_ERR_WEAK_KEY for weak keys with GCRYCTL_SET_ALLOW_WEAK_KEY.
That's right. With GCRYCTL_SET_ALLOW_WEAK_KEY, setkey still returns GPG_ERR_WEAK_KEY when weak key is detected. However, cipher handle can still be used as if setkey succeeded.
To minimize the impact of the change, I updated:
diff --git a/g10/import.c b/g10/import.c index 1ed40a63c..345e8cc75 100644 --- a/g10/import.c +++ b/g10/import.c @@ -2955,9 +2955,23 @@ do_transfer (ctrl_t ctrl, kbnode_t keyblock, PKT_public_key *pk, { gpg_error_t err; struct import_stats_s subkey_stats = {0}; + int force = 0; + int already_exist = agent_probe_secret_key (ctrl, pk); + +#ifndef OK_TO_CHANGE_ERROR_BEHAVIOR + if (already_exist == 1) + return gpg_error (GPG_ERR_EEXIST); +#endif + if (already_exist == 2) + { + if (!opt.quiet) + log_info (_("key %s: card reference is overridden by key material\n"), + keystr_from_pk (pk)); + force = 1; + }
Reading the commit rC5beadf201312: Add gcry_cipher_ctl command to allow weak keys in testing use-cases,
The test code in basic.c assumes that it is an application responsibility to confirm&ignore GPG_ERR_WEAK_KEY error when using GCRYCTL_SET_ALLOW_WEAK_KEY.
Apr 16 2023
Thanks for the report. Fix is easy. I only wonder why you want to use a weak DES key.
Apr 15 2023
Apr 14 2023
works
Changes may be something like:
diff --git a/g10/import.c b/g10/import.c index 1ed40a63c..91ff0c8ec 100644 --- a/g10/import.c +++ b/g10/import.c @@ -2706,6 +2706,20 @@ transfer_secret_keys (ctrl_t ctrl, struct import_stats_s *stats, goto leave; }
Apr 13 2023
gpg_encrypt (engine-gpg.c) passes --output - to gpg, i.e. it reads the result of gpg --encrypt from stdout unless I misread this. Not sure, why this seems to work on Windows. The real problem is probably something completely different.
isn't T3456 the same issue?
my Yubikey works, too, if I disable PIV. With enabled PIV:
On Windows we always use --status-fd=1 but with gpg it is not a problem because we use a differenrt fd for output.
Fixed by rGfcbb849c26e9: speedo: Fix regression due to switching from gcc 8.3 to 10.2 for zlib build.
Fixed in 1.10.2.
Fixed in 1.10.2.
Fixed in 1.10.2.
Fixed in 1.10.2.
Fixed in 1.10.2.
Fixed in 1.10.2.
Fixed in 1.10.2.
Fixed in 1.10.2.
Fixed in 1.10.2.
Fixed in 1.10.2.
Fixed in 1.10.2.
Fixed in 1.10.2.
Fixed in 1.10.2.
Fixed in 1.10.2.
Fixed in 1.10.2.
Fixed in 1.10.2.
Fixed in 1.10.2.
Fixed in 1.10.2.
Fixed in 1.10.2.
Fixed in 1.19.0.
Fixed in 1.19.0.
Fixed in 1.19.0.
Apr 12 2023
This problem was introduced by commit cf10c74bd9d5aa80798f1c0e23a9126f381b26b3. Perhaps that change should be backed out in the interim so that a portable fix can be considered for the original issue?