Lines Matching refs:identity_file

97 static char identity_file[PATH_MAX];  variable
301 snprintf(identity_file, sizeof(identity_file), in ask_filename()
303 printf("%s (%s): ", prompt, identity_file); in ask_filename()
309 strlcpy(identity_file, buf, sizeof(identity_file)); in ask_filename()
441 if (stat(identity_file, &st) == -1) in do_convert_to()
442 fatal("%s: %s: %s", __progname, identity_file, strerror(errno)); in do_convert_to()
443 if ((r = sshkey_load_public(identity_file, &k, NULL)) != 0) in do_convert_to()
444 k = load_identity(identity_file, NULL); in do_convert_to()
676 if ((fp = fopen(identity_file, "r")) == NULL) in do_convert_from_ssh2()
677 fatal("%s: %s: %s", __progname, identity_file, strerror(errno)); in do_convert_from_ssh2()
722 if ((fp = fopen(identity_file, "r")) == NULL) in do_convert_from_pkcs8()
723 fatal("%s: %s: %s", __progname, identity_file, strerror(errno)); in do_convert_from_pkcs8()
726 identity_file); in do_convert_from_pkcs8()
770 if ((fp = fopen(identity_file, "r")) == NULL) in do_convert_from_pem()
771 fatal("%s: %s: %s", __progname, identity_file, strerror(errno)); in do_convert_from_pem()
796 if (stat(identity_file, &st) == -1) in do_convert_from()
797 fatal("%s: %s: %s", __progname, identity_file, strerror(errno)); in do_convert_from()
860 if (stat(identity_file, &st) == -1) in do_print_public()
861 fatal("%s: %s", identity_file, strerror(errno)); in do_print_public()
862 prv = load_identity(identity_file, &comment); in do_print_public()
968 if (stat(identity_file, &st) == -1) in fingerprint_private()
1000 path = identity_file; in do_fingerprint()
1002 if (strcmp(identity_file, "-") == 0) { in do_fingerprint()
1027 if (lnum == 1 && strcmp(identity_file, "-") != 0 && in do_fingerprint()
1117 identity_file, key_types[i].path); in do_gen_all_hostkeys()
1134 identity_file, key_types[i].path); in do_gen_all_hostkeys()
1136 identity_file, key_types[i].path); in do_gen_all_hostkeys()
1138 identity_file, key_types[i].path); in do_gen_all_hostkeys()
1178 identity_file); in do_gen_all_hostkeys()
1349 if (strlcpy(identity_file, cp, sizeof(identity_file)) >= in do_known_hosts()
1350 sizeof(identity_file)) in do_known_hosts()
1355 if (stat(identity_file, &sb) != 0) in do_known_hosts()
1356 fatal("Cannot stat %s: %s", identity_file, strerror(errno)); in do_known_hosts()
1370 if (strlcpy(tmp, identity_file, sizeof(tmp)) >= sizeof(tmp) || in do_known_hosts()
1372 strlcpy(old, identity_file, sizeof(old)) >= sizeof(old) || in do_known_hosts()
1389 if ((r = hostkeys_foreach(identity_file, (find_host || !hash_hosts) ? in do_known_hosts()
1401 error("%s is not a valid known_hosts file.", identity_file); in do_known_hosts()
1409 logit("Host %s not found in %s", name, identity_file); in do_known_hosts()
1416 if (link(identity_file, old) == -1) in do_known_hosts()
1417 fatal("link %.100s to %.100s: %s", identity_file, old, in do_known_hosts()
1420 if (rename(tmp, identity_file) == -1) { in do_known_hosts()
1421 error("rename\"%s\" to \"%s\": %s", tmp, identity_file, in do_known_hosts()
1428 printf("%s updated.\n", identity_file); in do_known_hosts()
1455 if (stat(identity_file, &st) == -1) in do_change_passphrase()
1456 fatal("%s: %s", identity_file, strerror(errno)); in do_change_passphrase()
1458 r = sshkey_load_private(identity_file, "", &private, &comment); in do_change_passphrase()
1466 r = sshkey_load_private(identity_file, old_passphrase, in do_change_passphrase()
1473 fatal_r(r, "Failed to load key %s", identity_file); in do_change_passphrase()
1503 if ((r = sshkey_save_private(private, identity_file, passphrase1, in do_change_passphrase()
1505 error_r(r, "Saving key \"%s\" failed", identity_file); in do_change_passphrase()
1571 if (stat(identity_file, &st) == -1) in do_change_comment()
1572 fatal("%s: %s", identity_file, strerror(errno)); in do_change_comment()
1573 if ((r = sshkey_load_private(identity_file, "", in do_change_comment()
1577 fatal_r(r, "Cannot load private key \"%s\"", identity_file); in do_change_comment()
1587 if ((r = sshkey_load_private(identity_file, passphrase, in do_change_comment()
1591 identity_file); in do_change_comment()
1629 if ((r = sshkey_save_private(private, identity_file, passphrase, in do_change_comment()
1632 error_r(r, "Saving key \"%s\" failed", identity_file); in do_change_comment()
1643 strlcat(identity_file, ".pub", sizeof(identity_file)); in do_change_comment()
1644 if ((r = sshkey_save_public(public, identity_file, new_comment)) != 0) in do_change_comment()
1645 fatal_r(r, "Unable to save public key to %s", identity_file); in do_change_comment()
1929 identity_file); in do_ca_sign()
2215 if (strcmp(identity_file, "-") != 0 && stat(identity_file, &st) == -1) in do_show_cert()
2216 fatal("%s: %s: %s", __progname, identity_file, strerror(errno)); in do_show_cert()
2218 path = identity_file; in do_show_cert()
2223 } else if ((f = fopen(identity_file, "r")) == NULL) in do_show_cert()
2224 fatal("fopen %s: %s", identity_file, strerror(errno)); in do_show_cert()
2474 if (*identity_file == '\0') in do_gen_krl()
2476 if (stat(identity_file, &sb) == -1) { in do_gen_krl()
2479 identity_file, strerror(errno)); in do_gen_krl()
2481 fatal("KRL \"%s\" does not exist", identity_file); in do_gen_krl()
2495 load_krl(identity_file, &krl); in do_gen_krl()
2511 if ((r = sshbuf_write_file(identity_file, kbuf)) != 0) in do_gen_krl()
2512 fatal("write %s: %s", identity_file, strerror(errno)); in do_gen_krl()
2526 if (*identity_file == '\0') in do_check_krl()
2528 load_krl(identity_file, &krl); in do_check_krl()
3088 if (have_identity && strcmp(identity_file, "-") != 0) { in do_moduli_screen()
3089 if ((in = fopen(identity_file, "r")) == NULL) { in do_moduli_screen()
3091 "file \"%s\": %s", identity_file, in do_moduli_screen()
3497 if (strlcpy(identity_file, optarg, in main()
3498 sizeof(identity_file)) >= sizeof(identity_file)) in main()
3642 return sig_find_principals(ca_key_path, identity_file, in main()
3655 return sig_match_principals(identity_file, cert_key_id, in main()
3670 return sig_sign(identity_file, cert_principals, in main()
3711 cert_key_id, identity_file, rr_hostname, in main()
3794 n = do_print_resource_record(pw, identity_file, in main()
3797 fatal("%s: %s", identity_file, strerror(errno)); in main()
3942 hostfile_create_user_ssh_dir(identity_file, !quiet); in main()
3945 if (!confirm_overwrite(identity_file)) in main()
3949 passphrase = private_key_passphrase(identity_file); in main()
3958 if ((r = sshkey_save_private(private, identity_file, passphrase, in main()
3960 error_r(r, "Saving key \"%s\" failed", identity_file); in main()
3969 identity_file); in main()
3972 strlcat(identity_file, ".pub", sizeof(identity_file)); in main()
3973 if ((r = sshkey_save_public(public, identity_file, comment)) != 0) in main()
3974 fatal_r(r, "Unable to save public key to %s", identity_file); in main()
3984 identity_file); in main()