gpg: Make function mk_datestr public.
authorWerner Koch <wk@gnupg.org>
Thu, 20 Jul 2017 11:36:44 +0000 (13:36 +0200)
committerWerner Koch <wk@gnupg.org>
Thu, 20 Jul 2017 16:13:40 +0000 (18:13 +0200)
commit3ee314dde16d1d69ddf840cdb8b5aa186c592262
tree9391f51b4aa10adf90a3367a0f287f12207598ee
parent9998b162b47931fb8a8ed961d53418d505358888
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>
g10/keydb.h
g10/keyid.c