mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-20 14:37:08 +01:00
dirmngr,w32: Replace functions not available under Windows.
* dirmngr/ks-engine-ldap.c (extract_attributes): Replace isoptime and gmtime_r.
This commit is contained in:
parent
5d60c7f7e0
commit
0fb224c2c5
@ -1748,12 +1748,13 @@ extract_attributes (LDAPMod ***modlist, char *line)
|
|||||||
Check that first and then if it fails, then try
|
Check that first and then if it fails, then try
|
||||||
parse_timestamp. */
|
parse_timestamp. */
|
||||||
|
|
||||||
if (strptime (create_time, "%Y-%m-%d", &tm))
|
if (!isodate_human_to_tm (create_time, &tm))
|
||||||
create_time = tm2ldaptime (&tm);
|
create_time = tm2ldaptime (&tm);
|
||||||
else if ((t = parse_timestamp (create_time, &end)) != (time_t) -1
|
else if ((t = parse_timestamp (create_time, &end)) != (time_t) -1
|
||||||
&& *end == '\0')
|
&& *end == '\0')
|
||||||
{
|
{
|
||||||
if (! gmtime_r (&t, &tm))
|
|
||||||
|
if (!gnupg_gmtime (&t, &tm))
|
||||||
create_time = NULL;
|
create_time = NULL;
|
||||||
else
|
else
|
||||||
create_time = tm2ldaptime (&tm);
|
create_time = tm2ldaptime (&tm);
|
||||||
@ -1795,12 +1796,12 @@ extract_attributes (LDAPMod ***modlist, char *line)
|
|||||||
Check that first and then if it fails, then try
|
Check that first and then if it fails, then try
|
||||||
parse_timestamp. */
|
parse_timestamp. */
|
||||||
|
|
||||||
if (strptime (expire_time, "%Y-%m-%d", &tm))
|
if (!isodate_human_to_tm (expire_time, &tm))
|
||||||
expire_time = tm2ldaptime (&tm);
|
expire_time = tm2ldaptime (&tm);
|
||||||
else if ((t = parse_timestamp (expire_time, &end)) != (time_t) -1
|
else if ((t = parse_timestamp (expire_time, &end)) != (time_t) -1
|
||||||
&& *end == '\0')
|
&& *end == '\0')
|
||||||
{
|
{
|
||||||
if (! gmtime_r (&t, &tm))
|
if (!gnupg_gmtime (&t, &tm))
|
||||||
expire_time = NULL;
|
expire_time = NULL;
|
||||||
else
|
else
|
||||||
expire_time = tm2ldaptime (&tm);
|
expire_time = tm2ldaptime (&tm);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user