diff --git a/src/pluto/asn1.c b/src/pluto/asn1.c index fa0b4e74f..b7605395e 100644 --- a/src/pluto/asn1.c +++ b/src/pluto/asn1.c @@ -475,7 +475,7 @@ timetoasn1(const time_t *time, asn1_t type) { int offset; const char *format; - char buf[TIMETOA_BUF]; + char buf[BUF_LEN]; chunk_t formatted_time; struct tm *t = gmtime(time); diff --git a/src/pluto/defs.h b/src/pluto/defs.h index 1ad1de0fa..5cb84ef72 100644 --- a/src/pluto/defs.h +++ b/src/pluto/defs.h @@ -83,9 +83,6 @@ typedef struct { int fd; } prompt_pass_t; -/* size of timetoa string buffer */ -#define TIMETOA_BUF 30 - /* filter eliminating the directory entries '.' and '..' */ typedef struct dirent dirent_t; extern int file_select(const dirent_t *entry); diff --git a/src/pluto/ocsp.c b/src/pluto/ocsp.c index ce6df896d..ef270cd6c 100644 --- a/src/pluto/ocsp.c +++ b/src/pluto/ocsp.c @@ -613,9 +613,9 @@ list_ocsp_locations(ocsp_location_t *location, bool requests, bool utc } while (certinfo != NULL) { - char thisUpdate[TIMETOA_BUF]; + char thisUpdate[BUF_LEN]; - snprintf(thisUpdate, TIMETOA_BUF, "%T", &certinfo->thisUpdate, utc); + snprintf(thisUpdate, BUF_LEN, "%T", &certinfo->thisUpdate, utc); if (requests) {