summaryrefslogtreecommitdiffstats
path: root/lib/libssl/src
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2014-04-16 17:46:23 +0000
committerguenther <guenther@openbsd.org>2014-04-16 17:46:23 +0000
commitcf1dc5e9f3f029625ff4329e48efc49d5f56e15d (patch)
treebfe01252059b32b6dacfc0a0eef8f71d9967b0d7 /lib/libssl/src
parentInitial KNF. (diff)
downloadwireguard-openbsd-cf1dc5e9f3f029625ff4329e48efc49d5f56e15d.tar.xz
wireguard-openbsd-cf1dc5e9f3f029625ff4329e48efc49d5f56e15d.zip
Zero-pad usec format to handle values less than 100,000 correctly
ok matthew@ tedu@
Diffstat (limited to 'lib/libssl/src')
-rw-r--r--lib/libssl/src/crypto/ts/ts_rsp_sign.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libssl/src/crypto/ts/ts_rsp_sign.c b/lib/libssl/src/crypto/ts/ts_rsp_sign.c
index 235c0a8476c..e7186a8ce01 100644
--- a/lib/libssl/src/crypto/ts/ts_rsp_sign.c
+++ b/lib/libssl/src/crypto/ts/ts_rsp_sign.c
@@ -983,7 +983,7 @@ TS_RESP_set_genTime_with_precision(ASN1_GENERALIZEDTIME *asn1_time,
if the elements correspond to 0, they MUST be wholly
omitted, and the decimal point element also MUST be
omitted." */
- (void)snprintf(usecstr, sizeof(usecstr), ".%ld", usec);
+ (void)snprintf(usecstr, sizeof(usecstr), ".%06ld", usec);
/* truncate and trim trailing 0 */
usecstr[precision + 1] = '\0';
p = usecstr + strlen(usecstr) - 1;