|
Lines 1727-1732
main(int ac, char **av)
Link Here
|
| 1727 |
&pubkey, NULL)) != 0 && r != SSH_ERR_SYSTEM_ERROR) |
1727 |
&pubkey, NULL)) != 0 && r != SSH_ERR_SYSTEM_ERROR) |
| 1728 |
do_log2(ll, "Unable to load host key \"%s\": %s", |
1728 |
do_log2(ll, "Unable to load host key \"%s\": %s", |
| 1729 |
options.host_key_files[i], ssh_err(r)); |
1729 |
options.host_key_files[i], ssh_err(r)); |
|
|
1730 |
if (pubkey == NULL && key != NULL) { |
| 1731 |
fatal("loaded private key %s but not public", |
| 1732 |
options.host_key_files[i]); |
| 1733 |
} |
| 1730 |
if (pubkey != NULL && key != NULL) { |
1734 |
if (pubkey != NULL && key != NULL) { |
| 1731 |
if (!sshkey_equal(pubkey, key)) { |
1735 |
if (!sshkey_equal(pubkey, key)) { |
| 1732 |
error("Public key for %s does not match " |
1736 |
error("Public key for %s does not match " |
|
Lines 1734-1744
main(int ac, char **av)
Link Here
|
| 1734 |
sshkey_free(pubkey); |
1738 |
sshkey_free(pubkey); |
| 1735 |
pubkey = NULL; |
1739 |
pubkey = NULL; |
| 1736 |
} |
1740 |
} |
| 1737 |
} |
|
|
| 1738 |
if (pubkey == NULL && key != NULL) { |
| 1739 |
if ((r = sshkey_from_private(key, &pubkey)) != 0) |
| 1740 |
fatal("Could not demote key: \"%s\": %s", |
| 1741 |
options.host_key_files[i], ssh_err(r)); |
| 1742 |
} |
1741 |
} |
| 1743 |
sensitive_data.host_keys[i] = key; |
1742 |
sensitive_data.host_keys[i] = key; |
| 1744 |
sensitive_data.host_pubkeys[i] = pubkey; |
1743 |
sensitive_data.host_pubkeys[i] = pubkey; |