X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=plink.c;h=5ef9da2ea9fe54ca9d89baca9c6c7d84be15c877;hb=f391d066de67fc172592d8dfd27902747fa3c833;hp=c60902b548915c4dc9f239d6ffae4440daff846e;hpb=9d814fd26e89cda11fd6d388a48e5fca77959f97;p=PuTTY.git diff --git a/plink.c b/plink.c index c60902b5..5ef9da2e 100644 --- a/plink.c +++ b/plink.c @@ -162,6 +162,25 @@ void askcipher(char *ciphername, int cs) } } +/* + * Warn about the obsolescent key file format. + */ +void old_keyfile_warning(void) +{ + static const char message[] = + "You are loading an SSH 2 private key which has an\n" + "old version of the file format. This means your key\n" + "file is not fully tamperproof. Future versions of\n" + "PuTTY may stop supporting this private key format,\n" + "so we recommend you convert your key to the new\n" + "format.\n" + "\n" + "Once the key is loaded into PuTTYgen, you can perform\n" + "this conversion simply by saving it again.\n"; + + fputs(message, stderr); +} + HANDLE inhandle, outhandle, errhandle; DWORD orig_console_mode; @@ -716,8 +735,11 @@ int main(int argc, char **argv) { char *error; char *realhost; + /* nodelay is only useful if stdin is a character device (console) */ + int nodelay = cfg.tcp_nodelay && + (GetFileType(GetStdHandle(STD_INPUT_HANDLE)) == FILE_TYPE_CHAR); - error = back->init(cfg.host, cfg.port, &realhost); + error = back->init(cfg.host, cfg.port, &realhost, nodelay); if (error) { fprintf(stderr, "Unable to open connection:\n%s", error); return 1;