- Queries
- All Stories
- Search
- Advanced Search
- Transactions
- Transaction Logs
Advanced Search
May 16 2024
Thank you. Applied by : rM87061c0260bb: gpgme.m4: Set $host correctly always.
May 15 2024
May 14 2024
In general, asking an application change is not good. Migrating to pkg-config should be an option (not requirement).
However, it's usually recommended to use libgpg-error when an application is used with libgcrypt/libksba/libassuan.
May 13 2024
Thank you for testing. Now, I can see the exact reason by your npth log.
Pushed another change: rPTH75c68399ef3b: Fix previous commit.
May 8 2024
Fixed in gpgme 1.21.0.
Fixed in pinentry 1.3.0.
Fixed in 2.4.4.
If it is intentional change by musl (requiring some changes by an application), we can use __ino64_t_defined and __off64_t_defined macro to see if those types are defined or not.
May 7 2024
Could you show us the build log of nPth, please?
May 6 2024
Apr 26 2024
Apr 25 2024
Apr 24 2024
Apr 23 2024
Apr 22 2024
Please continue on T7041. This ticket is going to be closed (as the problem described was fixed already).
Applied to 2.4 branch.
Applied to 2.4 branch.
Here is current version:
diff --git a/src/misc.c b/src/misc.c index 4db2d9a4..bf50b00b 100644 --- a/src/misc.c +++ b/src/misc.c @@ -577,3 +577,61 @@ _gcry_divide_by_zero (void) gpg_err_set_errno (EDOM); _gcry_fatal_error (gpg_err_code_from_errno (errno), "divide by zero"); } + +#ifdef HAVE_CLOCK_GETTIME +#include <time.h> +# if defined(CLOCK_THREAD_CPUTIME_ID) && defined(CLOCK_TAI) +struct gcry_timedwait +{ + clockid_t id; + struct timespec ts; +}; + +typedef struct gcry_timedwait *gcry_timedwait_t; + +gcry_err_code_t +_gcry_timedwait_init (gcry_timedwait_t tw, unsigned int flags) +{ + /* Possibly, it would be good to be able to select the wall clock. + * For now, it's CPU time by the thread. */ + if (flags != 0) + return GPG_ERR_INV_ARG; + + tw->id = CLOCK_THREAD_CPUTIME_ID; + if (clock_gettime (tw->id, &tw->ts) < 0) + return gpg_err_code_from_syserror (); + + return 0; +} + +gcry_err_code_t +_gcry_timedwait_finish (gcry_timedwait_t tw, struct timespec ts_r) +{ + struct timespec ts; + u32 negative; + + if (clock_gettime (tw->id, &ts) < 0) + return gpg_err_code_from_syserror (); + + ts.tv_sec -= tw->ts.tv_sec; + ts.tv_nsec -= tw->ts.tv_nsec; + negative = ((u32)ts.tv_nsec) >> 31; + ts.tv_sec -= negative; + ts.tv_nsec += (1000000000 * negative); + + ts_r.tv_sec -= ts.tv_sec; + ts_r.tv_nsec -= ts.tv_nsec; + negative = ((u32)ts_r.tv_nsec) >> 31; + ts_r.tv_sec -= negative; + ts_r.tv_nsec += (1000000000 * negative); + + if (ts_r.tv_sec < 0) + return GPG_ERR_TIME_CONFLICT; + + if (clock_nanosleep (CLOCK_TAI, 0, &ts_r, &ts_r)) + return gpg_err_code_from_syserror (); + + return 0; +} +# endif +#endif
Apr 19 2024
Apr 18 2024
Apr 17 2024
Apr 16 2024
Are you using PC/SC shared mode? If so, it may be the case of T7041.
Apr 15 2024
@mwalle Thank you for your testing.
Applied to master.
After testing, I'll also apply to 2.4 branch.
Apr 12 2024
I'm considering applying the following patch. With this change, scdaemon will works well with a card implementation which consider F9 (wrongly) as primitive data object, as well as correct card implementation.
diff --git a/scd/app-openpgp.c b/scd/app-openpgp.c index 26ac91ea2..09223ce33 100644 --- a/scd/app-openpgp.c +++ b/scd/app-openpgp.c @@ -410,6 +410,10 @@ get_cached_data (app_t app, int tag, size_t len; struct cache_s *c; int exmode; + int do_constructed = 0; + + if ((tag < 0x0100 && (tag & 0x20)) || (tag >= 0x0100 && (tag & 0x2000))) + do_constructed = 1;
API which does not require allocation internally would be better. In this case, it is allocated on stack by the caller.
I mean, something like this (for GNU/Linux):
diff --git a/src/misc.c b/src/misc.c index 4db2d9a4..74864334 100644 --- a/src/misc.c +++ b/src/misc.c @@ -577,3 +577,80 @@ _gcry_divide_by_zero (void) gpg_err_set_errno (EDOM); _gcry_fatal_error (gpg_err_code_from_errno (errno), "divide by zero"); } + +#ifdef HAVE_CLOCK_GETTIME +#include <time.h> +# if defined(CLOCK_THREAD_CPUTIME_ID) && defined(CLOCK_TAI) +struct gcry_timedwait +{ + struct timespec ts; +}; + +typedef struct gcry_timedwait *gcry_timedwait_t; + +gcry_err_code_t +_gcry_timedwait_new (gcry_timedwait_t *r_tw, unsigned int flags) +{ + gcry_err_code_t err; + gcry_timedwait_t tw; + + *r_tw = NULL; + + /* Possibly, it would be good to be able to select the wall clock. + * For now, it's CPU time by the thread. */ + if (flags != 0) + return GPG_ERR_INV_ARG; + + tw = xtrymalloc (sizeof (gcry_timedwait_t)); + if (!tw) + return gpg_err_code_from_syserror (); + + if (clock_gettime (CLOCK_THREAD_CPUTIME_ID, &tw->ts) < 0) + { + err = gpg_err_code_from_syserror (); + xfree (tw); + return err; + } + + *r_tw = tw; + return 0; +} + +gcry_err_code_t +_gcry_timedwait_release (gcry_timedwait_t tw, struct timespec ts_r) +{ + gcry_err_code_t err; + struct timespec ts; + u32 negative; + + if (clock_gettime (CLOCK_THREAD_CPUTIME_ID, &ts) < 0) + { + err = gpg_err_code_from_syserror (); + xfree (tw); + return err; + } + + ts.tv_sec -= tw->ts.tv_sec; + ts.tv_nsec -= tw->ts.tv_nsec; + negative = ((u32)ts.tv_nsec) >> 31; + ts.tv_sec -= negative; + ts.tv_nsec += (1000000000 * negative); + + xfree (tw); + + ts_r.tv_sec -= ts.tv_sec; + ts_r.tv_nsec -= ts.tv_nsec; + negative = ((u32)ts_r.tv_nsec) >> 31; + ts_r.tv_sec -= negative; + ts_r.tv_nsec += (1000000000 * negative); + + if (ts_r.tv_sec < 0) + return GPG_ERR_TIME_CONFLICT; + + if (clock_nanosleep (CLOCK_TAI, 0, &ts_r, &ts_r)) + return gpg_err_code_from_syserror (); + + return 0; +} +# endif +#endif
Apr 11 2024
I had wrong interpretation about symmetric cipher algorithm identifier in the draft. It specifies symmetric cipher for the following Symmetrically Encrypted Data Packet (I was wrongly interpret as if it were specifying algo for AES keywrap).
Apr 10 2024
I merged the change by Werner to get the value from frontend.
Apr 9 2024
In the current code, just for testing against the test vector in m https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-pqc-02, there are specific value in the key combiner KDF.
Namely, the value 105 for fixedInfo is defined in the draft (and it will be changed).
Applied to master. If no problem will be found, I'll apply to 2.4 branch too.
Let's see.
Apr 8 2024
Apr 5 2024
The following patch works.
I use this for testing:
Apr 4 2024
Apr 3 2024
Apr 1 2024
Mar 29 2024
Mar 28 2024
Mar 27 2024
Given the situation where GnuPG works well with existing OpenPGP card implementations, what we should do here is, perhaps:
There are multiple problems described in your report. Let us handle one by one.
Thank you for your quick testing.
Mar 26 2024
The patches looks too large to merge (than actually needed), and not enough/clean like not having detection of the system.
Mar 25 2024
On March 11 and 18, the private key file DE1AB1D22899CEC7DBB1A7863F34E6E92BFB7756.key was wrong.
I updated on March 25. Now, the endian is GnuPG (d is big endian).
Thank you for the reminder. I will update the version in configure.ac for AM_GNU_GETTEXT_VERSION, when I will confirm other developers' emvironment.
Mar 19 2024
There are two locks here; (1) rw_lock for card_top (list of cards) access and (2) individual card lock.
It looks for me that:
- don't know how/what the thread 7208.2 does
- the thread 7208.3: KEYINFO, then PKSIGN (gets read lock for card_top, then, individual card lock)
- the thread 7208.4: SERIALNO --all (and wait for write lock for card_top)