created pluto and scepclient now use libstrongswan-lite

This commit is contained in:
Andreas Steffen
2009-04-18 14:50:31 +00:00
parent 815510e637
commit a6e3ec1389
20 changed files with 216 additions and 141 deletions
-30
View File
@@ -143,36 +143,6 @@ write_chunk(const char *filename, const char *label, chunk_t ch
}
}
/* Names of the months */
static const char* months[] = {
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
};
/*
* Display a date either in local or UTC time
*/
char*
timetoa(const time_t *time, bool utc)
{
static char buf[TIMETOA_BUF];
if (*time == UNDEFINED_TIME)
sprintf(buf, "--- -- --:--:--%s----", (utc)?" UTC ":" ");
else
{
struct tm *t = (utc)? gmtime(time) : localtime(time);
sprintf(buf, "%s %02d %02d:%02d:%02d%s%04d",
months[t->tm_mon], t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec,
(utc)?" UTC ":" ", t->tm_year + 1900
);
}
return buf;
}
/* checks if the expiration date has been reached and
* warns during the warning_interval of the imminent
* expiry. strict=TRUE declares a fatal error,