Handle the somewhat common fixed case of time value 0 more efficiently
authorKen Raeburn <raeburn@mit.edu>
Sat, 24 Apr 2004 22:38:30 +0000 (22:38 +0000)
committerKen Raeburn <raeburn@mit.edu>
Sat, 24 Apr 2004 22:38:30 +0000 (22:38 +0000)
commit17c8862153e4602dabdc21d622e2301477e79605
tree6b2bfcfe4660a2f867c825842ef3a3328f234206
parent3c51a8b0615193d36cff2de1af7c70d982dfaf66
Handle the somewhat common fixed case of time value 0 more efficiently

* asn1_decode.c (asn1_decode_generaltime): If the input string is the magic
UNIX time zero, bypass all the arithmetic and return 0.
* asn1_encode.c (asn1_encode_generaltime): If the input time value is the UNIX
epoch, use a hardcoded string instead of doing the math.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16272 dc483132-0cff-0310-8789-dd5450dbe970
src/lib/krb5/asn.1/ChangeLog
src/lib/krb5/asn.1/asn1_decode.c
src/lib/krb5/asn.1/asn1_encode.c