From 297a8fd4aca359ad555a795023ec9a4dc00db23f Mon Sep 17 00:00:00 2001 From: Michal Bozon Date: Wed, 12 Nov 2014 15:59:04 +0000 Subject: [PATCH] Correct timestamp output when clock_precision_digits > 0 PR#3535 Reviewed-by: Stephen Henson --- crypto/ts/ts_rsp_sign.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/ts/ts_rsp_sign.c b/crypto/ts/ts_rsp_sign.c index df09e17834..3c48352366 100644 --- a/crypto/ts/ts_rsp_sign.c +++ b/crypto/ts/ts_rsp_sign.c @@ -971,7 +971,7 @@ TS_RESP_set_genTime_with_precision(ASN1_GENERALIZEDTIME *asn1_time, if (precision > 0) { /* Add fraction of seconds (leave space for dot and null). */ - BIO_snprintf(p, 2 + precision, ".%ld", usec); + BIO_snprintf(p, 2 + precision, ".%06ld", usec); /* We cannot use the snprintf return value, because it might have been truncated. */ p += strlen(p); -- 2.25.1