Lines Matching defs:file
4 * you may not use this file except in compliance with the License.
41 bool GenerateKey(const char *file)
173 bool GenerateKey(const char *file)
184 WRITE_LOG(LOG_DEBUG, "generate_key '%s'\n", file);
195 fKey = Base::Fopen(file, "w");
197 WRITE_LOG(LOG_DEBUG, "Failed to open '%s'\n", file);
206 if (!WritePublicKeyfile(rsa, file)) {
221 bool ReadKey(const char *file, list<void *> *listPrivateKey)
226 if (file == nullptr || listPrivateKey == nullptr) {
227 WRITE_LOG(LOG_FATAL, "file or listPrivateKey is null");
231 if (!(f = fopen(file, "r"))) {
264 path += Base::GetPathSep(); // bugfix for unix platform create key file not in dir.
378 void ReadDaemonKeys(const char *file, list<void *> *listPublicKey)
383 FILE *f = Base::Fopen(file, "re");
385 WRITE_LOG(LOG_DEBUG, "Can't open '%s'", file);
399 WRITE_LOG(LOG_DEBUG, "%s: Invalid base64 data ret=%d", file, ret);
405 WRITE_LOG(LOG_DEBUG, "%s: Invalid key len %d\n", file, key->wordModulusSize);
577 WRITE_LOG(LOG_FATAL, "write public key file failed");
606 WRITE_LOG(LOG_FATAL, "open file %s failed", pubkey_filename.c_str());
631 WRITE_LOG(LOG_INFO, "load pubkey from file(%s) success", pubkey_filename.c_str());
724 WRITE_LOG(LOG_FATAL, "open file %s failed", prikey_filename.c_str());
854 WRITE_LOG(LOG_FATAL, "load prikey from file(%s) failed", prikeyFileName.c_str());