diff options
| author | Tom Yu <tlyu@mit.edu> | 2002-06-24 19:48:40 +0000 |
|---|---|---|
| committer | Tom Yu <tlyu@mit.edu> | 2002-06-24 19:48:40 +0000 |
| commit | 5022e4b5da83cd9f2feed48d1888b29854b9369b (patch) | |
| tree | 88bcd3119eaf5177214e62e3498858e00919154b /src | |
| parent | 5bab480155fa5dfc016c1a8e9829df449c9ea0a5 (diff) | |
| download | krb5-5022e4b5da83cd9f2feed48d1888b29854b9369b.tar.gz krb5-5022e4b5da83cd9f2feed48d1888b29854b9369b.tar.xz krb5-5022e4b5da83cd9f2feed48d1888b29854b9369b.zip | |
* asn1_encode.c: Removed unused Mac OS 9 code
* 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
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/krb5/asn.1/ChangeLog | 14 | ||||
| -rw-r--r-- | src/lib/krb5/asn.1/asn1_encode.c | 12 |
2 files changed, 18 insertions, 8 deletions
diff --git a/src/lib/krb5/asn.1/ChangeLog b/src/lib/krb5/asn.1/ChangeLog index 8dace6e09f..eb76b60fb4 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 69d94f4107..4ad3a7e64b 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); /* |
