Lines Matching refs:identity_file
67 char identity_file[1024]; variable
120 snprintf(identity_file, sizeof(identity_file), "%s/%s", pw->pw_dir, name); in ask_filename()
121 fprintf(stderr, "%s (%s): ", gettext(prompt), identity_file); in ask_filename()
127 strlcpy(identity_file, buf, sizeof(identity_file)); in ask_filename()
166 if (stat(identity_file, &st) < 0) { in do_convert_to_ssh2()
167 perror(identity_file); in do_convert_to_ssh2()
170 if ((k = key_load_public(identity_file, NULL)) == NULL) { in do_convert_to_ssh2()
171 if ((k = load_identity(identity_file)) == NULL) { in do_convert_to_ssh2()
344 if (stat(identity_file, &st) < 0) { in do_convert_from_ssh2()
345 perror(identity_file); in do_convert_from_ssh2()
348 fp = fopen(identity_file, "r"); in do_convert_from_ssh2()
350 perror(identity_file); in do_convert_from_ssh2()
416 if (stat(identity_file, &st) < 0) { in do_print_public()
417 perror(identity_file); in do_print_public()
420 prv = load_identity(identity_file); in do_print_public()
448 if (stat(identity_file, &st) < 0) { in do_fingerprint()
449 perror(identity_file); in do_fingerprint()
452 public = key_load_public(identity_file, &comment); in do_fingerprint()
466 f = fopen(identity_file, "r"); in do_fingerprint()
525 identity_file); in do_fingerprint()
553 if (strlcpy(identity_file, cp, sizeof(identity_file)) >= in do_known_hosts()
554 sizeof(identity_file)) in do_known_hosts()
559 if ((in = fopen(identity_file, "r")) == NULL) in do_known_hosts()
567 if (strlcpy(tmp, identity_file, sizeof(tmp)) >= sizeof(tmp) || in do_known_hosts()
569 strlcpy(old, identity_file, sizeof(old)) >= sizeof(old) || in do_known_hosts()
685 identity_file); in do_known_hosts()
701 if (link(identity_file, old) == -1) in do_known_hosts()
702 fatal("link %.100s to %.100s: %s", identity_file, old, in do_known_hosts()
705 if (rename(tmp, identity_file) == -1) { in do_known_hosts()
706 error("rename\"%s\" to \"%s\": %s", tmp, identity_file, in do_known_hosts()
713 fprintf(stderr, gettext("%s updated.\n"), identity_file); in do_known_hosts()
740 if (stat(identity_file, &st) < 0) { in do_change_passphrase()
741 perror(identity_file); in do_change_passphrase()
745 private = key_load_private(identity_file, "", &comment); in do_change_passphrase()
753 private = key_load_private(identity_file, old_passphrase, in do_change_passphrase()
791 if (!key_save_private(private, identity_file, passphrase1, comment)) { in do_change_passphrase()
792 printf(gettext("Saving the key failed: %s.\n"), identity_file); in do_change_passphrase()
825 if (stat(identity_file, &st) < 0) { in do_change_comment()
826 perror(identity_file); in do_change_comment()
829 private = key_load_private(identity_file, "", &comment); in do_change_comment()
840 private = key_load_private(identity_file, passphrase, &comment); in do_change_comment()
873 if (!key_save_private(private, identity_file, passphrase, new_comment)) { in do_change_comment()
874 printf(gettext("Saving the key failed: %s.\n"), identity_file); in do_change_comment()
886 strlcat(identity_file, ".pub", sizeof(identity_file)); in do_change_comment()
887 fd = open(identity_file, O_WRONLY | O_CREAT | O_TRUNC, 0644); in do_change_comment()
890 identity_file); in do_change_comment()
895 printf(gettext("fdopen %s failed"), identity_file); in do_change_comment()
1012 strlcpy(identity_file, optarg, sizeof(identity_file)); in main()
1104 if (strstr(identity_file, dotsshdir) != NULL && in main()
1112 if (stat(identity_file, &st) >= 0) { in main()
1114 printf(gettext("%s already exists.\n"), identity_file); in main()
1161 if (!key_save_private(private, identity_file, passphrase1, comment)) { in main()
1162 printf(gettext("Saving the key failed: %s.\n"), identity_file); in main()
1177 identity_file); in main()
1179 strlcat(identity_file, ".pub", sizeof(identity_file)); in main()
1180 fd = open(identity_file, O_WRONLY | O_CREAT | O_TRUNC, 0644); in main()
1183 identity_file); in main()
1188 printf(gettext("fdopen %s failed"), identity_file); in main()
1199 identity_file); in main()