ssh-keygen.c (57429) | ssh-keygen.c (58582) |
---|---|
1/* 2 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * All rights reserved 5 * Created: Mon Mar 27 02:26:40 1995 ylo 6 * Identity and host key generation and maintenance. 7 */ 8 9#include "includes.h" | 1/* 2 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * All rights reserved 5 * Created: Mon Mar 27 02:26:40 1995 ylo 6 * Identity and host key generation and maintenance. 7 */ 8 9#include "includes.h" |
10RCSID("$Id: ssh-keygen.c,v 1.16 2000/02/04 14:34:09 markus Exp $"); | 10RCSID("$Id: ssh-keygen.c,v 1.17 2000/03/16 20:56:14 markus Exp $"); |
11 12#include "rsa.h" 13#include "ssh.h" 14#include "xmalloc.h" 15#include "fingerprint.h" 16 17/* Generated private key. */ 18RSA *private_key; --- 57 unchanged lines hidden (view full) --- 76void 77do_fingerprint(struct passwd *pw) 78{ 79 FILE *f; 80 BIGNUM *e, *n; 81 RSA *public_key; 82 char *comment = NULL, *cp, *ep, line[16*1024]; 83 int i, skip = 0, num = 1, invalid = 1; | 11 12#include "rsa.h" 13#include "ssh.h" 14#include "xmalloc.h" 15#include "fingerprint.h" 16 17/* Generated private key. */ 18RSA *private_key; --- 57 unchanged lines hidden (view full) --- 76void 77do_fingerprint(struct passwd *pw) 78{ 79 FILE *f; 80 BIGNUM *e, *n; 81 RSA *public_key; 82 char *comment = NULL, *cp, *ep, line[16*1024]; 83 int i, skip = 0, num = 1, invalid = 1; |
84 unsigned int ignore; |
|
84 struct stat st; 85 86 if (!have_identity) 87 ask_filename(pw, "Enter file in which the key is"); 88 if (stat(identity_file, &st) < 0) { 89 perror(identity_file); 90 exit(1); 91 } --- 41 unchanged lines hidden (view full) --- 133 else if (*cp == '"') 134 quoted = !quoted; 135 } 136 if (!*cp) 137 continue; 138 *cp++ = '\0'; 139 } 140 ep = cp; | 85 struct stat st; 86 87 if (!have_identity) 88 ask_filename(pw, "Enter file in which the key is"); 89 if (stat(identity_file, &st) < 0) { 90 perror(identity_file); 91 exit(1); 92 } --- 41 unchanged lines hidden (view full) --- 134 else if (*cp == '"') 135 quoted = !quoted; 136 } 137 if (!*cp) 138 continue; 139 *cp++ = '\0'; 140 } 141 ep = cp; |
141 if (auth_rsa_read_key(&cp, &i, e, n)) { | 142 if (auth_rsa_read_key(&cp, &ignore, e, n)) { |
142 invalid = 0; 143 comment = *cp ? cp : comment; 144 printf("%d %s %s\n", BN_num_bits(n), 145 fingerprint(e, n), 146 comment ? comment : "no comment"); 147 } 148 } 149 BN_free(e); --- 407 unchanged lines hidden --- | 143 invalid = 0; 144 comment = *cp ? cp : comment; 145 printf("%d %s %s\n", BN_num_bits(n), 146 fingerprint(e, n), 147 comment ? comment : "no comment"); 148 } 149 } 150 BN_free(e); --- 407 unchanged lines hidden --- |