From: Michal Bozon Date: Wed, 12 Nov 2014 15:59:04 +0000 (+0000) Subject: Correct timestamp output when clock_precision_digits > 0 X-Git-Tag: OpenSSL_1_0_0p~58 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=bd366159735a225e031b460d3a83defa9182aab7;p=oweals%2Fopenssl.git Correct timestamp output when clock_precision_digits > 0 PR#3535 Reviewed-by: Stephen Henson --- diff --git a/crypto/ts/ts_rsp_sign.c b/crypto/ts/ts_rsp_sign.c index b0f023c9d2..2c0e94edda 100644 --- a/crypto/ts/ts_rsp_sign.c +++ b/crypto/ts/ts_rsp_sign.c @@ -977,7 +977,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);