* asn1_encode.c: Removed unused Mac OS 9 code
authorTom Yu <tlyu@mit.edu>
Mon, 24 Jun 2002 19:48:40 +0000 (19:48 +0000)
committerTom Yu <tlyu@mit.edu>
Mon, 24 Jun 2002 19:48:40 +0000 (19:48 +0000)
* asn1_encode.c (asn1_encode_generaltime): Fixed the Mac code to
use the correct epoch.

* asn1_encode.c: Updated Utilities.h #include

[pullups from 1-2-2-branch]

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14561 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/asn.1/ChangeLog
src/lib/krb5/asn.1/asn1_encode.c

index 8dace6e09f8a3f66810df7d4a7a060448abd7e10..eb76b60fb4682153741539f0c7fe5438c7bde5ef 100644 (file)
@@ -1,3 +1,17 @@
+2002-06-24 Alexandra Ellwood <lxs@mit.edu>
+
+       * asn1_encode.c: Removed unused Mac OS 9 code
+       [pullup from 1-2-2-branch]
+
+2000-06-24  Miro Jurisic  <meeroh@mit.edu>
+
+       * asn1_encode.c (asn1_encode_generaltime): Fixed the Mac code to
+       use the correct epoch.
+
+       * asn1_encode.c: Updated Utilities.h #include
+
+       [pullups from 1-2-2-branch]
+
 2002-06-24  Tom Yu  <tlyu@mit.edu>
 
        * asn1_get.c (asn1_get_length): Check for negative length.
index 69d94f410772d9c52a115960363f3d6b9f35ddae..4ad3a7e64b131b7d9115176685d33c1051aff002 100644 (file)
@@ -188,12 +188,6 @@ asn1_error_code asn1_encode_ia5string(buf, len, val, retlen)
   return 0;
 }
 
-#ifdef macintosh
-#define EPOCH ((70 * 365 * 24 * 60 * 60) + (17 *  24 * 60 * 60) + (getTimeZoneOffset() * 60 * 60))
-#else
-#define EPOCH (0)
-#endif
-
 asn1_error_code asn1_encode_generaltime(buf, val, retlen)
      asn1buf * buf;
      const time_t val;
@@ -203,9 +197,11 @@ asn1_error_code asn1_encode_generaltime(buf, val, retlen)
   struct tm *gtime;
   char s[16];
   unsigned int length, sum=0;
-  time_t gmt_time;
+  time_t gmt_time = val;
 
-  gmt_time = val + EPOCH;
+#ifdef macintosh
+  unix_time_to_msl_time (&gmt_time);
+#endif
   gtime = gmtime(&gmt_time);
 
   /*