freebsd-ports/security/openscep/files/patch-scepd_sceplist.c
Jean-Yves Lefort 9e01a15a9e Add openscep.
OpenSCEP is an open source implementation of the SCEP protocol used by Cisco
routers for certificate enrollment to build VPNs. It implements most of the
draft specification.

OpenSCEP includes a client and a server implementation, as well as some CGI
programs to simplify certificate and revocation list management.

WWW: http://openscep.othello.ch/

PR:		ports/81264
Submitted by:	Vsevolod Stakhov <vsevolod@highsecure.ru>
2005-05-23 22:21:25 +00:00

32 lines
790 B
C

--- scepd/sceplist.c.orig Thu May 19 16:59:02 2005
+++ scepd/sceplist.c Thu May 19 17:02:22 2005
@@ -96,7 +96,6 @@
/*
* convert ASN1 time string to a struct tm
*/
-extern time_t timezone; /* compiler does not like it inside func */
#ifdef HAVE_ALTZONE
extern time_t altzone;
#endif /* HAVE_ALTZONE */
@@ -124,19 +123,15 @@
rtm.tm_year = atoi(work);
if (rtm.tm_year < 70)
rtm.tm_year += 100;
+ rtm.tm_zone = 0;
- /* set the time zone to GMT, as mktime uses the local time zone */
- timezone = 0;
#ifdef HAVE_ALTZONE
altzone = 0;
#endif /* HAVE_ALTZONE */
/* use mktime to normalize the structure and t convert to a */
/* time_t value */
- rt = mktime(&rtm);
-
- /* reset the time zone to local settings */
- tzset();
+ rt = timegm(&rtm);
return rt;
}