summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/krb5/asn.1/ChangeLog14
-rw-r--r--src/lib/krb5/asn.1/asn1_encode.c12
2 files changed, 18 insertions, 8 deletions
diff --git a/src/lib/krb5/asn.1/ChangeLog b/src/lib/krb5/asn.1/ChangeLog
index 8dace6e09..eb76b60fb 100644
--- a/src/lib/krb5/asn.1/ChangeLog
+++ b/src/lib/krb5/asn.1/ChangeLog
@@ -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.
diff --git a/src/lib/krb5/asn.1/asn1_encode.c b/src/lib/krb5/asn.1/asn1_encode.c
index 69d94f410..4ad3a7e64 100644
--- a/src/lib/krb5/asn.1/asn1_encode.c
+++ b/src/lib/krb5/asn.1/asn1_encode.c
@@ -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);
/*