-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Attached is a patch to add a progress meter for ssh-keygen similar
to the one in the commercial ssh1.
Was this left out of the OpenBSD version because of security
concerns?
Regards,
Damien Miller
- --
| "Bombay is 250ms from New York in the new world order" - Alan Cox
| Damien Miller - http://www.mindrot.org/
| Email: djm at mindrot.org (home) -or- djm at ibs.com.au (work)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.0 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE4WFr1ormJ9RG1dI8RAjYoAJ99bJwtjL7dKwrZhat9FAUj4nEUlwCgqvZ/
tFU5SXFtgbOsFx8gFlEdd8s=20cA
-----END PGP SIGNATURE-----
-------------- next part --------------
Index: rsa.c
==================================================================RCS file:
/var/cvs/openssh/rsa.c,v
retrieving revision 1.5
diff -u -r1.5 rsa.c
--- rsa.c 1999/11/25 00:54:59 1.5
+++ rsa.c 1999/12/16 03:19:38
@@ -56,6 +56,21 @@
}
/*
+ * Key generation progress meter callback
+ */
+void
+keygen_progress(int p, int n, void *arg)
+{
+ const char progress_chars[] = ".o+O?";
+
+ if ((p < 0) || (p > (sizeof(progress_chars) - 2)))
+ p = 4;
+
+ printf("%c", progress_chars[p]);
+ fflush(stdout);
+}
+
+/*
* Generates RSA public and private keys. This initializes the data
* structures; they should be freed with rsa_clear_private_key and
* rsa_clear_public_key.
@@ -69,8 +84,11 @@
if (rsa_verbose) {
printf("Generating RSA keys: ");
fflush(stdout);
+ key = RSA_generate_key(bits, 35, keygen_progress, NULL);
+ printf("\n");
+ } else {
+ key = RSA_generate_key(bits, 35, NULL, NULL);
}
- key = RSA_generate_key(bits, 35, NULL, NULL);
if (key == NULL)
fatal("rsa_generate_key: key generation failed.");
In message <Pine.LNX.4.10.9912161416380.22988-200000 at mothra.mindrot.org>, Damie n Miller writes:>Was this left out of the OpenBSD version because of security >concerns?No, not for security concerns. I did not have the time to put the function hooks in. And it did not seem particullary important. Niels.
Reading this (progress meter) patch reminds me of something I meant to bring up previously about scp... I know folks that favor building the old ssh1.2.27 distribution using the 'configure --without-scp-stats' option so that scp more closely behaves like rcp (only generate output on errors). Yes, this behavior can be obtained if you remember to add the -q switch to the scp command, but it might be useful to borrow this kind of configuration functionality from the ssh1.2.27 configure script. I believe they use a macro something like WITH_SCP_STATS to control if the code to generate the progress stats should be compiled into the program or not. Enjoy! -- Mark
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wed, 15 Dec 1999, Mark D. Baushke wrote:> Yes, this behavior can be obtained if you remember to add the -q > switch to the scp command, but it might be useful to borrow this kind > of configuration functionality from the ssh1.2.27 configure script. I > believe they use a macro something like WITH_SCP_STATS to control if > the code to generate the progress stats should be compiled into the > program or not.How about: alias scp="scp -q" In your profile? Regards, Damien Miller - -- | "Bombay is 250ms from New York in the new world order" - Alan Cox | Damien Miller - http://www.mindrot.org/ | Email: djm at mindrot.org (home) -or- djm at ibs.com.au (work) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.0 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE4WaemormJ9RG1dI8RAo4qAJ9U8KNg3Ffvgdr68IY+hJI1r+btrQCaAxwI ZWjF66PP5iaP3FRnAeuocqM=/Ct5 -----END PGP SIGNATURE-----