diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2001-06-05 20:35:09 +0000 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2001-06-05 20:35:09 +0000 |
commit | d78ae766dedb4ca0cdce82a5193efb65ad9f1931 (patch) | |
tree | 9d347812660ca475b54c793aa80cbfb68770a39a | |
parent | 2b1f71baeec8c1545885dc3ec5e3ac7d96319853 (diff) |
- markus@cvs.openbsd.org 2001/05/25 14:37:32
[ssh-keygen.c]
use -P for -e and -y, too.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ssh-keygen.c | 13 |
2 files changed, 12 insertions, 6 deletions
@@ -53,6 +53,9 @@ | |||
53 | - stevesk@cvs.openbsd.org 2001/05/24 18:57:53 | 53 | - stevesk@cvs.openbsd.org 2001/05/24 18:57:53 |
54 | [clientloop.c readconf.c ssh.c ssh.h] | 54 | [clientloop.c readconf.c ssh.c ssh.h] |
55 | don't perform escape processing when ``EscapeChar none''; ok markus@ | 55 | don't perform escape processing when ``EscapeChar none''; ok markus@ |
56 | - markus@cvs.openbsd.org 2001/05/25 14:37:32 | ||
57 | [ssh-keygen.c] | ||
58 | use -P for -e and -y, too. | ||
56 | 59 | ||
57 | 20010528 | 60 | 20010528 |
58 | - (tim) [conifgure.in] add setvbuf test needed for sftp-int.c | 61 | - (tim) [conifgure.in] add setvbuf test needed for sftp-int.c |
@@ -5483,4 +5486,4 @@ | |||
5483 | - Wrote replacements for strlcpy and mkdtemp | 5486 | - Wrote replacements for strlcpy and mkdtemp |
5484 | - Released 1.0pre1 | 5487 | - Released 1.0pre1 |
5485 | 5488 | ||
5486 | $Id: ChangeLog,v 1.1238 2001/06/05 20:32:21 mouring Exp $ | 5489 | $Id: ChangeLog,v 1.1239 2001/06/05 20:35:09 mouring Exp $ |
diff --git a/ssh-keygen.c b/ssh-keygen.c index 166ec6231..d1b2a583a 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" |
15 | RCSID("$OpenBSD: ssh-keygen.c,v 1.60 2001/04/23 22:14:13 markus Exp $"); | 15 | RCSID("$OpenBSD: ssh-keygen.c,v 1.61 2001/05/25 14:37:32 markus Exp $"); |
16 | 16 | ||
17 | #include <openssl/evp.h> | 17 | #include <openssl/evp.h> |
18 | #include <openssl/pem.h> | 18 | #include <openssl/pem.h> |
@@ -113,14 +113,17 @@ ask_filename(struct passwd *pw, const char *prompt) | |||
113 | } | 113 | } |
114 | 114 | ||
115 | Key * | 115 | Key * |
116 | try_load_pem_key(char *filename) | 116 | load_identity(char *filename) |
117 | { | 117 | { |
118 | char *pass; | 118 | char *pass; |
119 | Key *prv; | 119 | Key *prv; |
120 | 120 | ||
121 | prv = key_load_private(filename, "", NULL); | 121 | prv = key_load_private(filename, "", NULL); |
122 | if (prv == NULL) { | 122 | if (prv == NULL) { |
123 | pass = read_passphrase("Enter passphrase: ", 1); | 123 | if (identity_passphrase) |
124 | pass = xstrdup(identity_passphrase); | ||
125 | else | ||
126 | pass = read_passphrase("Enter passphrase: ", 1); | ||
124 | prv = key_load_private(filename, pass, NULL); | 127 | prv = key_load_private(filename, pass, NULL); |
125 | memset(pass, 0, strlen(pass)); | 128 | memset(pass, 0, strlen(pass)); |
126 | xfree(pass); | 129 | xfree(pass); |
@@ -148,7 +151,7 @@ do_convert_to_ssh2(struct passwd *pw) | |||
148 | exit(1); | 151 | exit(1); |
149 | } | 152 | } |
150 | if ((k = key_load_public(identity_file, NULL)) == NULL) { | 153 | if ((k = key_load_public(identity_file, NULL)) == NULL) { |
151 | if ((k = try_load_pem_key(identity_file)) == NULL) { | 154 | if ((k = load_identity(identity_file)) == NULL) { |
152 | fprintf(stderr, "load failed\n"); | 155 | fprintf(stderr, "load failed\n"); |
153 | exit(1); | 156 | exit(1); |
154 | } | 157 | } |
@@ -348,7 +351,7 @@ do_print_public(struct passwd *pw) | |||
348 | perror(identity_file); | 351 | perror(identity_file); |
349 | exit(1); | 352 | exit(1); |
350 | } | 353 | } |
351 | prv = try_load_pem_key(identity_file); | 354 | prv = load_identity(identity_file); |
352 | if (prv == NULL) { | 355 | if (prv == NULL) { |
353 | fprintf(stderr, "load failed\n"); | 356 | fprintf(stderr, "load failed\n"); |
354 | exit(1); | 357 | exit(1); |