aboutsummaryrefslogtreecommitdiffstats
path: root/src/scepclient/scepclient.c
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2009-08-31 17:59:00 +0200
committerMartin Willi <martin@strongswan.org>2009-08-31 18:00:28 +0200
commit6180a55852afaf7fee4086a45dccbff9d7f7dfa8 (patch)
tree61968edccb4b5b5e39a045b16067299f1e5cda02 /src/scepclient/scepclient.c
parentde5784452b31af3c7342269127a12d352edc0b4e (diff)
downloadstrongswan-6180a55852afaf7fee4086a45dccbff9d7f7dfa8.tar.bz2
strongswan-6180a55852afaf7fee4086a45dccbff9d7f7dfa8.tar.xz
use time_monotonic() instead of time() for statistics and time difference calculations
Diffstat (limited to 'src/scepclient/scepclient.c')
-rw-r--r--src/scepclient/scepclient.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/scepclient/scepclient.c b/src/scepclient/scepclient.c
index ca6b07065..e01997ce6 100644
--- a/src/scepclient/scepclient.c
+++ b/src/scepclient/scepclient.c
@@ -1006,7 +1006,7 @@ int main(int argc, char **argv)
{
char *path = concatenate_paths(CA_CERT_PATH, file_in_cacert_sig);
cert_t cert;
- time_t poll_start;
+ time_t poll_start = 0;
x509cert_t *certs = NULL;
chunk_t envelopedData = chunk_empty;
@@ -1035,7 +1035,7 @@ int main(int argc, char **argv)
{
plog(" scep request pending, polling every %d seconds"
, poll_interval);
- time(&poll_start);
+ poll_start = time_monotonic(NULL);
issuerAndSubject = asn1_wrap(ASN1_SEQUENCE, "cc"
, x509_ca_sig->subject
, subject);
@@ -1043,7 +1043,7 @@ int main(int argc, char **argv)
while (attrs.pkiStatus == SCEP_PENDING)
{
if (max_poll_time > 0
- && (time(NULL) - poll_start >= max_poll_time))
+ && (time_monotonic(NULL) - poll_start >= max_poll_time))
{
exit_scepclient("maximum poll time reached: %d seconds"
, max_poll_time);