aboutsummaryrefslogtreecommitdiff
path: root/pkcs11-helper.c
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2005-11-12 10:59:41 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2005-11-12 10:59:41 +0000
commit0475d17e1ce34e6b2471d17a102b7c2a2d1427c7 (patch)
tree33e9d066a65da9025ecabd2f42f1612c1fd11e7d /pkcs11-helper.c
parentFixed minor typos in --remote-cert-* documentation. (diff)
downloadopenvpn-0475d17e1ce34e6b2471d17a102b7c2a2d1427c7.tar.xz
Reduce sensitivity to system clock instability
and backtracks. git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@799 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'pkcs11-helper.c')
-rw-r--r--pkcs11-helper.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkcs11-helper.c b/pkcs11-helper.c
index 9eb074e..181c31f 100644
--- a/pkcs11-helper.c
+++ b/pkcs11-helper.c
@@ -870,7 +870,7 @@ _pkcs11h_getSession (
}
else {
(*session)->timePINExpire = (
- time (NULL) +
+ openvpn_time (NULL) +
(time_t)nPINCachePeriod
);
(*session)->nPINCachePeriod = nPINCachePeriod;
@@ -1095,7 +1095,7 @@ _pkcs11h_validateSession (
if (
session->timePINExpire != (time_t)0 &&
- session->timePINExpire < time (NULL)
+ session->timePINExpire < openvpn_time (NULL)
) {
_pkcs11h_logout (session);
}
@@ -1195,7 +1195,7 @@ _pkcs11h_login (
}
else {
session->timePINExpire = (
- time (NULL) +
+ openvpn_time (NULL) +
(time_t)session->nPINCachePeriod
);
}