javacommons/security/src/midpauthenticationmoduleimpl.cpp
branchRCL_3
changeset 46 4376525cdefb
parent 19 04becd199f91
child 48 e0d6e9bd3ca7
child 60 6c158198356e
--- a/javacommons/security/src/midpauthenticationmoduleimpl.cpp	Wed Jun 09 09:34:07 2010 +0300
+++ b/javacommons/security/src/midpauthenticationmoduleimpl.cpp	Mon Jun 21 15:32:50 2010 +0300
@@ -22,6 +22,7 @@
 #include "midpauthenticationmoduleimpl.h"
 #include "storagehandler.h"
 #include "securityutils.h"
+#include "telutils.h"
 #include "javacertstorehandler.h"
 #include "securitycommsmessagedefs.h"
 #include "javastorage.h"
@@ -38,7 +39,6 @@
 #include <openssl/err.h>
 #include <openssl/rsa.h>
 #include <openssl/sha.h>
-#include <sys/time.h>
 #include <string.h>
 
 using namespace java::security;
@@ -455,9 +455,7 @@
             break;
         }
 
-        struct timeval tv;
-        int i = gettimeofday(&tv, NULL);
-        X509_STORE_CTX_set_time(x509_ctx, X509_V_FLAG_USE_CHECK_TIME, tv.tv_sec);
+        X509_STORE_CTX_set_time(x509_ctx, X509_V_FLAG_USE_CHECK_TIME, TelUtils::getSecureTime());
         // set the callback for validation - needed for the critical extension
         // used by developer certificates
         X509_STORE_CTX_set_verify_cb(x509_ctx, verify_callback);
@@ -475,7 +473,7 @@
         {
             bool extKeyUsageKnown = false;
             char EXT_KEY_USAGE_OID[80];
-            for (i = 0; i < sk_ASN1_OBJECT_num(extKeyUsage); i++)
+            for (int i = 0; i < sk_ASN1_OBJECT_num(extKeyUsage); i++)
             {
                 ASN1_OBJECT *usage = sk_ASN1_OBJECT_value(extKeyUsage,i);
                 OBJ_obj2txt(EXT_KEY_USAGE_OID,