| 1934 |
UTIL_get_lang_msg("DLG_HOSTKEY_ROTATION_WARNING", pvar, |
UTIL_get_lang_msg("DLG_HOSTKEY_ROTATION_WARNING", pvar, |
| 1935 |
"Remote server \"%s\" sent the set of host keys which are absent in your list of known hosts. \n" |
"Remote server \"%s\" sent the set of host keys which are absent in your list of known hosts. \n" |
| 1936 |
"The machine you have contacted may be a hostile machine pretending to be the server, or legitimate server supporting host key rotation. \n\n" |
"The machine you have contacted may be a hostile machine pretending to be the server, or legitimate server supporting host key rotation. \n\n" |
| 1937 |
"If you approve to add %u latest keys and remove %u obsolete keys from this machine to the known hosts list and continue, then you will not receive this warning again.\n\n" |
"If you choose to add %u latest key(s) and remove %u obsolete key(s) from this machine to the known hosts list and continue, then you will not receive this warning again.\n\n" |
| 1938 |
|
"Do you want to update known hosts file with new key(s)?\n\n" |
| 1939 |
); |
); |
| 1940 |
_snprintf_s(msg, sizeof(msg), _TRUNCATE, |
_snprintf_s(msg, sizeof(msg), _TRUNCATE, |
| 1941 |
pvar->ts->UIMsg, host, ctx->nnew, ctx->nold |
pvar->ts->UIMsg, host, ctx->nnew, ctx->nold |
| 1942 |
); |
); |
| 1943 |
|
|
| 1944 |
if (ctx->nnew > 0) { |
if (ctx->nnew > 0) { |
| 1945 |
_snprintf_s(tmp, sizeof(tmp), _TRUNCATE, "%u latest keys:\n", ctx->nnew); |
_snprintf_s(tmp, sizeof(tmp), _TRUNCATE, "%u latest key(s):\n", ctx->nnew); |
| 1946 |
strcat_s(msg, sizeof(msg), tmp); |
strcat_s(msg, sizeof(msg), tmp); |
| 1947 |
for (i = 0; i < ctx->nkeys; i++) { |
for (i = 0; i < ctx->nkeys; i++) { |
| 1948 |
if (ctx->keys_seen[i]) |
if (ctx->keys_seen[i]) |
| 1952 |
strcat_s(msg, sizeof(msg), " "); |
strcat_s(msg, sizeof(msg), " "); |
| 1953 |
strcat_s(msg, sizeof(msg), fp); |
strcat_s(msg, sizeof(msg), fp); |
| 1954 |
strcat_s(msg, sizeof(msg), "\n"); |
strcat_s(msg, sizeof(msg), "\n"); |
| 1955 |
|
free(fp); |
| 1956 |
|
} |
| 1957 |
|
} |
| 1958 |
|
|
| 1959 |
|
if (ctx->nold > 0) { |
| 1960 |
|
strcat_s(msg, sizeof(msg), "\n"); |
| 1961 |
|
|
| 1962 |
|
_snprintf_s(tmp, sizeof(tmp), _TRUNCATE, "%u obsolete key(s):\n", ctx->nold); |
| 1963 |
|
strcat_s(msg, sizeof(msg), tmp); |
| 1964 |
|
for (i = 0; i < ctx->nold; i++) { |
| 1965 |
|
fp = key_fingerprint(ctx->old_keys[i], SSH_FP_HEX); |
| 1966 |
|
strcat_s(msg, sizeof(msg), get_sshname_from_key(ctx->old_keys[i])); |
| 1967 |
|
strcat_s(msg, sizeof(msg), " "); |
| 1968 |
|
strcat_s(msg, sizeof(msg), fp); |
| 1969 |
|
strcat_s(msg, sizeof(msg), "\n"); |
| 1970 |
free(fp); |
free(fp); |
| 1971 |
} |
} |
| 1972 |
} |
} |