aboutsummaryrefslogtreecommitdiffstats
path: root/dirmngr
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2023-05-24 14:02:39 +0000
committerWerner Koch <[email protected]>2023-08-24 09:25:30 +0000
commit32c55603dfeb14c7e3a2fd44cdcb301280dc7f6d (patch)
tree8a2d5ef38d9313ac77c3f40414e8ecdc91fcf07a /dirmngr
parentbuild: Update libassuan.m4 to allow build with libassuan 3. (diff)
downloadgnupg-32c55603dfeb14c7e3a2fd44cdcb301280dc7f6d.tar.gz
gnupg-32c55603dfeb14c7e3a2fd44cdcb301280dc7f6d.zip
dirmngr: Fix LDAP time parser.
* dirmngr/ldap-misc.c (rfc4517toisotime): Correct index. -- Obviously the parser assumes the standard ISO format with the 'T' before the hour. That is not correct here. We need this parser for the modifyTimestamp thingy.
Diffstat (limited to 'dirmngr')
-rw-r--r--dirmngr/ldap-misc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/dirmngr/ldap-misc.c b/dirmngr/ldap-misc.c
index 6b0939a3b..c3a659d5c 100644
--- a/dirmngr/ldap-misc.c
+++ b/dirmngr/ldap-misc.c
@@ -380,13 +380,14 @@ rfc4517toisotime (gnupg_isotime_t timebuf, const char *string)
int year, month, day, hour, minu, sec;
const char *s;
+ /* Sample value: "20230823141623Z"; */
for (i=0, s=string; i < 10; i++, s++) /* Need yyyymmddhh */
if (!digitp (s))
return gpg_error (GPG_ERR_INV_TIME);
year = atoi_4 (string);
month = atoi_2 (string + 4);
day = atoi_2 (string + 6);
- hour = atoi_2 (string + 9);
+ hour = atoi_2 (string + 8);
minu = 0;
sec = 0;
if (digitp (s) && digitp (s+1))