summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2000-12-29 16:50:13 +0000
committerBen Lindstrom <mouring@eviladmin.org>2000-12-29 16:50:13 +0000
commit2941f119e61091b94e11754e8b28398645cb9fa1 (patch)
treebcffb50953c457d0a60ba560a8a5774fefa60002
parente76524075efba18358b371bf7c18ea95acf13aae (diff)
20001230
- (bal) OpenBSD CVS Update - markus@cvs.openbsd.org 2000/12/28 18:58:30 [ssh-keygen.c] enable 'ssh-keygen -l -f ~/.ssh/{authorized_keys,known_hosts}{,2} - (bal) Resynced CVS ID with OpenBSD for channel.c and uidswap.c
-rw-r--r--ChangeLog6
-rw-r--r--channels.c2
-rw-r--r--ssh-keygen.c28
-rw-r--r--uidswap.c2
4 files changed, 24 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index 8caa9b6fd..a85ee6e5d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
120001230
2 - (bal) OpenBSD CVS Update
3 - markus@cvs.openbsd.org 2000/12/28 18:58:30
4 [ssh-keygen.c]
5 enable 'ssh-keygen -l -f ~/.ssh/{authorized_keys,known_hosts}{,2}
6 - (bal) Resynced CVS ID with OpenBSD for channel.c and uidswap.c
1 7
220001229 820001229
3 - (bal) Fixed spelling of 'authorized_keys' in ssh-copy-id.1 by Christian 9 - (bal) Fixed spelling of 'authorized_keys' in ssh-copy-id.1 by Christian
diff --git a/channels.c b/channels.c
index 3c2f15f2a..6879d167d 100644
--- a/channels.c
+++ b/channels.c
@@ -40,7 +40,7 @@
40 */ 40 */
41 41
42#include "includes.h" 42#include "includes.h"
43RCSID("$OpenBSD: channels.c,v 1.77 2000/12/19 23:17:56 markus Exp $"); 43RCSID("$OpenBSD: channels.c,v 1.78 2000/12/29 11:05:55 markus Exp $");
44 44
45#include "ssh.h" 45#include "ssh.h"
46#include "packet.h" 46#include "packet.h"
diff --git a/ssh-keygen.c b/ssh-keygen.c
index 057803351..87be6a5f8 100644
--- a/ssh-keygen.c
+++ b/ssh-keygen.c
@@ -12,7 +12,7 @@
12 */ 12 */
13 13
14#include "includes.h" 14#include "includes.h"
15RCSID("$OpenBSD: ssh-keygen.c,v 1.37 2000/12/22 16:49:40 markus Exp $"); 15RCSID("$OpenBSD: ssh-keygen.c,v 1.38 2000/12/28 18:58:39 markus Exp $");
16 16
17#include <openssl/evp.h> 17#include <openssl/evp.h>
18#include <openssl/pem.h> 18#include <openssl/pem.h>
@@ -332,7 +332,6 @@ do_fingerprint(struct passwd *pw)
332 Key *public; 332 Key *public;
333 char *comment = NULL, *cp, *ep, line[16*1024]; 333 char *comment = NULL, *cp, *ep, line[16*1024];
334 int i, skip = 0, num = 1, invalid = 1, success = 0; 334 int i, skip = 0, num = 1, invalid = 1, success = 0;
335 u_int ignore;
336 struct stat st; 335 struct stat st;
337 336
338 if (!have_identity) 337 if (!have_identity)
@@ -350,7 +349,7 @@ do_fingerprint(struct passwd *pw)
350 if (try_load_public_key(identity_file, public, &comment)) 349 if (try_load_public_key(identity_file, public, &comment))
351 success = 1; 350 success = 1;
352 else 351 else
353 error("try_load_public_key KEY_UNSPEC failed"); 352 debug("try_load_public_key KEY_UNSPEC failed");
354 } 353 }
355 if (success) { 354 if (success) {
356 printf("%d %s %s\n", key_size(public), key_fingerprint(public), comment); 355 printf("%d %s %s\n", key_size(public), key_fingerprint(public), comment);
@@ -359,9 +358,6 @@ do_fingerprint(struct passwd *pw)
359 exit(0); 358 exit(0);
360 } 359 }
361 360
362 /* XXX RSA1 only */
363
364 public = key_new(KEY_RSA1);
365 f = fopen(identity_file, "r"); 361 f = fopen(identity_file, "r");
366 if (f != NULL) { 362 if (f != NULL) {
367 while (fgets(line, sizeof(line), f)) { 363 while (fgets(line, sizeof(line), f)) {
@@ -398,13 +394,21 @@ do_fingerprint(struct passwd *pw)
398 *cp++ = '\0'; 394 *cp++ = '\0';
399 } 395 }
400 ep = cp; 396 ep = cp;
401 if (auth_rsa_read_key(&cp, &ignore, public->rsa->e, public->rsa->n)) { 397 public = key_new(KEY_RSA1);
402 invalid = 0; 398 if (key_read(public, &cp) != 1) {
403 comment = *cp ? cp : comment; 399 cp = ep;
404 printf("%d %s %s\n", key_size(public), 400 key_free(public);
405 key_fingerprint(public), 401 public = key_new(KEY_UNSPEC);
406 comment ? comment : "no comment"); 402 if (key_read(public, &cp) != 1) {
403 key_free(public);
404 continue;
405 }
407 } 406 }
407 comment = *cp ? cp : comment;
408 printf("%d %s %s\n", key_size(public),
409 key_fingerprint(public),
410 comment ? comment : "no comment");
411 invalid = 0;
408 } 412 }
409 fclose(f); 413 fclose(f);
410 } 414 }
diff --git a/uidswap.c b/uidswap.c
index 8af46d450..91f93923f 100644
--- a/uidswap.c
+++ b/uidswap.c
@@ -12,7 +12,7 @@
12 */ 12 */
13 13
14#include "includes.h" 14#include "includes.h"
15RCSID("$OpenBSD: uidswap.c,v 1.11 2000/12/20 19:37:22 markus Exp $"); 15RCSID("$OpenBSD: uidswap.c,v 1.12 2000/12/29 10:48:56 markus Exp $");
16 16
17#include "ssh.h" 17#include "ssh.h"
18#include "uidswap.h" 18#include "uidswap.h"