Home GnuPG
Diffusion GnuPG 3ee314dde16d

gpg: Make function mk_datestr public.

Description

gpg: Make function mk_datestr public.

* g10/keydb.h (MK_DATESTR_SIZE): New.
* g10/keyid.c (mk_datestr): Make public.  Add arg bufsize and use
snprintf.  Change arg atime to u32.
(datestr_from_pk): Simplify.
(datestr_from_sig): Ditto.
(expirestr_from_pk): Ditto.
(expirestr_from_sig): Ditto.
(revokestr_from_pk): Ditto.

Note that this also reduces the size of the static buffers from 16 to
11 which is sufficient for the string. In the past we added the 5
extra bytes to cope for bugs in gmtime which is now handles by
snprintf.

  • Signed-off-by: Werner Koch <wk@gnupg.org>

Details

Provenance
wernerAuthored on Jul 20 2017, 1:36 PM
Parents
rG9998b162b479: g10: Return proper error when gpg-agent fails to start during probe.
Branches
Unknown
Tags
Unknown