Lines Matching refs:filename
57 sshkey_save_private_blob(struct sshbuf *keybuf, const char *filename) in sshkey_save_private_blob() argument
61 if ((fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0600)) < 0) in sshkey_save_private_blob()
67 unlink(filename); in sshkey_save_private_blob()
76 sshkey_save_private(struct sshkey *key, const char *filename, in sshkey_save_private() argument
88 if ((r = sshkey_save_private_blob(keyblob, filename)) != 0) in sshkey_save_private()
169 sshkey_perm_ok(int fd, const char *filename) in sshkey_perm_ok() argument
181 if (check_ntsec(filename)) in sshkey_perm_ok()
188 (u_int)st.st_mode & 0777, filename); in sshkey_perm_ok()
198 sshkey_load_private_type(int type, const char *filename, const char *passphrase, in sshkey_load_private_type() argument
207 if ((fd = open(filename, O_RDONLY)) < 0) { in sshkey_load_private_type()
212 if (sshkey_perm_ok(fd, filename) != 0) { in sshkey_load_private_type()
253 sshkey_load_private(const char *filename, const char *passphrase, in sshkey_load_private() argument
263 if ((fd = open(filename, O_RDONLY)) < 0) in sshkey_load_private()
265 if (sshkey_perm_ok(fd, filename) != 0) { in sshkey_load_private()
275 (r = sshkey_parse_private_fileblob(buffer, passphrase, filename, in sshkey_load_private()
287 sshkey_try_load_public(struct sshkey *k, const char *filename, char **commentp) in sshkey_try_load_public() argument
297 if ((f = fopen(filename, "r")) == NULL) in sshkey_try_load_public()
299 while (read_keyfile_line(f, filename, line, sizeof(line), in sshkey_try_load_public()
320 cp : filename); in sshkey_try_load_public()
335 sshkey_load_public(const char *filename, struct sshkey **keyp, char **commentp) in sshkey_load_public() argument
348 if ((fd = open(filename, O_RDONLY)) < 0) in sshkey_load_public()
367 if ((r = sshkey_try_load_public(pub, filename, commentp)) == 0) { in sshkey_load_public()
378 if ((r = sshkey_try_load_public(pub, filename, commentp)) == 0) { in sshkey_load_public()
391 if ((strlcpy(file, filename, sizeof file) < sizeof(file)) && in sshkey_load_public()
405 sshkey_load_cert(const char *filename, struct sshkey **keyp) in sshkey_load_cert() argument
413 if (asprintf(&file, "%s-cert.pub", filename) == -1) in sshkey_load_cert()
436 sshkey_load_private_cert(int type, const char *filename, const char *passphrase, in sshkey_load_private_cert() argument
457 if ((r = sshkey_load_private_type(type, filename, in sshkey_load_private_cert()
459 (r = sshkey_load_cert(filename, &cert)) != 0) in sshkey_load_private_cert()
491 sshkey_in_file(struct sshkey *key, const char *filename, int strict_type, in sshkey_in_file() argument
503 if ((f = fopen(filename, "r")) == NULL) in sshkey_in_file()
506 while (read_keyfile_line(f, filename, line, sizeof(line), in sshkey_in_file()