Re: New LifeTime(DateTime) ctor: UTC or not?
- From: "William Stacey [MVP]" <staceywREMOVE@xxxxxxxx>
- Date: Fri, 13 May 2005 11:35:41 -0400
Hi SA. LifeTime expects a local time as internally it uses DateTime.Now for compares. So, IIRC, the SCTNew returns a UTC string that is then converted to local time before creating the LifeTime object and storing in the new SCT on the client. Looking at the code again, it seems as that is what I did on the client and server methods. Both client and server use local time in LifeTime. But transfers the XMLSCT in a Zulu string to the client, which the client converts before creating LifeTime. So you may have modified the code in such a way as to pass a UTC time in the LifeTime constructor or there is some funky date issue going on here (i.e. something I missed). I hope it is the first case as that should be easy to fix. If the latter, you may need to add some debug outputs on both side so we can see the UTC and the local DateTimes on both sides that are being created/passed. Please let me know. IMO, things like LifeTime should have been UTC based and IsCurrent and IsExpired could just do the right thing. Cheers.
-- William Stacey, MVP http://mvp.support.microsoft.com
"SA" <informatica@xxxxxxxxxxx> wrote in message news:O6c9qEZUFHA.3716@xxxxxxxxxxxxxxxxxxxxxxx
Hi all,
Related to William's implementation of a secure context token issuer.
When you are assigning a lifetime object to the SecureContextToken's LifeTime property like this
Sct.LifeTime = New LifeTime(aDateTimeObject)
Should the datetime be in UTC or local time? I use UTC, but run into
problems. It works for me (on the west side of the prime meridian), but not
for Europeans, which is why I think it is expecting local time.
MSFT: The docs should be more clear on this...
--
Sven.
.
- References:
- Prev by Date: Who there is no security menu on WSE 2.0 X509 Cert tool
- Next by Date: Re: DataSet Serialization Not Working with VS.NET Beta2
- Previous by thread: New LifeTime(DateTime) ctor: UTC or not?
- Next by thread: <cryptography><encryptionFormatters> in sp2/sp3
- Index(es):
Relevant Pages
|