Change ts to only support one second precision.
authorbeck <beck@openbsd.org>
Tue, 26 Mar 2024 00:39:22 +0000 (00:39 +0000)
committerbeck <beck@openbsd.org>
Tue, 26 Mar 2024 00:39:22 +0000 (00:39 +0000)
commit695fd1d890ed3fe4d36432b7e810660abc4e6b9a
treef87e89187a64507aafaffd7fca858312ea49701f
parent96025fd0e067acbc37970da77640254bfbbb2738
Change ts to only support one second precision.

RFC 3631 allows for sub second ASN1 GENERALIZED times, if you
choose to support sub second time precison. It does not
indicate that an implementation must support them.

Supporting sub second timestamps is just silly and unrealistic,
so set our maximum to one second of precision. We then simplify
this code by removing some nasty eye-bleed that made artisinally
hand crafted strings and jammed them into an ASN1_GENERALIZEDTIME.

ok tb@, jsing@, with one second precision tested by kn@
lib/libcrypto/ts/ts.h
lib/libcrypto/ts/ts_conf.c
lib/libcrypto/ts/ts_rsp_sign.c