Lines Matching defs:filename

57 sshkey_save_private_blob(struct sshbuf *keybuf, const char *filename)
61 if ((fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0600)) < 0)
67 unlink(filename);
76 sshkey_save_private(struct sshkey *key, const char *filename,
88 if ((r = sshkey_save_private_blob(keyblob, filename)) != 0)
169 sshkey_perm_ok(int fd, const char *filename)
181 if (check_ntsec(filename))
188 (u_int)st.st_mode & 0777, filename);
198 sshkey_load_private_type(int type, const char *filename, const char *passphrase,
207 if ((fd = open(filename, O_RDONLY)) < 0) {
212 if (sshkey_perm_ok(fd, filename) != 0) {
252 sshkey_load_private(const char *filename, const char *passphrase,
262 if ((fd = open(filename, O_RDONLY)) < 0)
264 if (sshkey_perm_ok(fd, filename) != 0) {
285 sshkey_try_load_public(struct sshkey *k, const char *filename, char **commentp)
295 if ((f = fopen(filename, "r")) == NULL)
297 while (read_keyfile_line(f, filename, line, sizeof(line),
318 cp : filename);
333 sshkey_load_public(const char *filename, struct sshkey **keyp, char **commentp)
346 if ((fd = open(filename, O_RDONLY)) < 0)
367 if ((r = sshkey_try_load_public(pub, filename, commentp)) == 0) {
378 if ((r = sshkey_try_load_public(pub, filename, commentp)) == 0) {
391 if ((strlcpy(file, filename, sizeof file) < sizeof(file)) &&
405 sshkey_load_cert(const char *filename, struct sshkey **keyp)
413 if (asprintf(&file, "%s-cert.pub", filename) == -1)
434 sshkey_load_private_cert(int type, const char *filename, const char *passphrase,
455 if ((r = sshkey_load_private_type(type, filename,
457 (r = sshkey_load_cert(filename, &cert)) != 0)
479 * Returns success if the specified "key" is listed in the file "filename",
487 sshkey_in_file(struct sshkey *key, const char *filename, int strict_type,
499 if ((f = fopen(filename, "r")) == NULL)
502 while (read_keyfile_line(f, filename, line, sizeof(line),