Lines Matching refs:cacheFile
155 FILE *cacheFile; in InitializeKeyCache() local
159 if(fopen_s(&cacheFile, fn, "w+b") != 0) in InitializeKeyCache()
161 cacheFile = fopen(fn, "w+b"); in InitializeKeyCache()
162 if(NULL == cacheFile) in InitializeKeyCache()
169 fseek(cacheFile, 0, SEEK_SET); in InitializeKeyCache()
170 if(fwrite(s_rsaKeyCache, 1, sizeof(s_rsaKeyCache), cacheFile) in InitializeKeyCache()
176 if(cacheFile) in InitializeKeyCache()
177 fclose(cacheFile); in InitializeKeyCache()
199 FILE *cacheFile; in KeyCacheLoaded() local
202 if(fopen_s(&cacheFile, fn, "r+b") == 0) in KeyCacheLoaded()
204 cacheFile = fopen(fn, "r+b"); in KeyCacheLoaded()
205 if(NULL != cacheFile) in KeyCacheLoaded()
208 fseek(cacheFile, 0L, SEEK_END); in KeyCacheLoaded()
209 if(ftell(cacheFile) == sizeof(s_rsaKeyCache)) in KeyCacheLoaded()
211 fseek(cacheFile, 0L, SEEK_SET); in KeyCacheLoaded()
213 fread(&s_rsaKeyCache, 1, sizeof(s_rsaKeyCache), cacheFile) in KeyCacheLoaded()
216 fclose(cacheFile); in KeyCacheLoaded()