mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-27 07:44:29 +02:00
- markus@cvs.openbsd.org 2001/05/25 14:37:32
[ssh-keygen.c] use -P for -e and -y, too.
This commit is contained in:
parent
2b1f71baee
commit
d78ae766de
@ -53,6 +53,9 @@
|
|||||||
- stevesk@cvs.openbsd.org 2001/05/24 18:57:53
|
- stevesk@cvs.openbsd.org 2001/05/24 18:57:53
|
||||||
[clientloop.c readconf.c ssh.c ssh.h]
|
[clientloop.c readconf.c ssh.c ssh.h]
|
||||||
don't perform escape processing when ``EscapeChar none''; ok markus@
|
don't perform escape processing when ``EscapeChar none''; ok markus@
|
||||||
|
- markus@cvs.openbsd.org 2001/05/25 14:37:32
|
||||||
|
[ssh-keygen.c]
|
||||||
|
use -P for -e and -y, too.
|
||||||
|
|
||||||
20010528
|
20010528
|
||||||
- (tim) [conifgure.in] add setvbuf test needed for sftp-int.c
|
- (tim) [conifgure.in] add setvbuf test needed for sftp-int.c
|
||||||
@ -5483,4 +5486,4 @@
|
|||||||
- Wrote replacements for strlcpy and mkdtemp
|
- Wrote replacements for strlcpy and mkdtemp
|
||||||
- Released 1.0pre1
|
- Released 1.0pre1
|
||||||
|
|
||||||
$Id: ChangeLog,v 1.1238 2001/06/05 20:32:21 mouring Exp $
|
$Id: ChangeLog,v 1.1239 2001/06/05 20:35:09 mouring Exp $
|
||||||
|
13
ssh-keygen.c
13
ssh-keygen.c
@ -12,7 +12,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$OpenBSD: ssh-keygen.c,v 1.60 2001/04/23 22:14:13 markus Exp $");
|
RCSID("$OpenBSD: ssh-keygen.c,v 1.61 2001/05/25 14:37:32 markus Exp $");
|
||||||
|
|
||||||
#include <openssl/evp.h>
|
#include <openssl/evp.h>
|
||||||
#include <openssl/pem.h>
|
#include <openssl/pem.h>
|
||||||
@ -113,14 +113,17 @@ ask_filename(struct passwd *pw, const char *prompt)
|
|||||||
}
|
}
|
||||||
|
|
||||||
Key *
|
Key *
|
||||||
try_load_pem_key(char *filename)
|
load_identity(char *filename)
|
||||||
{
|
{
|
||||||
char *pass;
|
char *pass;
|
||||||
Key *prv;
|
Key *prv;
|
||||||
|
|
||||||
prv = key_load_private(filename, "", NULL);
|
prv = key_load_private(filename, "", NULL);
|
||||||
if (prv == NULL) {
|
if (prv == NULL) {
|
||||||
pass = read_passphrase("Enter passphrase: ", 1);
|
if (identity_passphrase)
|
||||||
|
pass = xstrdup(identity_passphrase);
|
||||||
|
else
|
||||||
|
pass = read_passphrase("Enter passphrase: ", 1);
|
||||||
prv = key_load_private(filename, pass, NULL);
|
prv = key_load_private(filename, pass, NULL);
|
||||||
memset(pass, 0, strlen(pass));
|
memset(pass, 0, strlen(pass));
|
||||||
xfree(pass);
|
xfree(pass);
|
||||||
@ -148,7 +151,7 @@ do_convert_to_ssh2(struct passwd *pw)
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
if ((k = key_load_public(identity_file, NULL)) == NULL) {
|
if ((k = key_load_public(identity_file, NULL)) == NULL) {
|
||||||
if ((k = try_load_pem_key(identity_file)) == NULL) {
|
if ((k = load_identity(identity_file)) == NULL) {
|
||||||
fprintf(stderr, "load failed\n");
|
fprintf(stderr, "load failed\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
@ -348,7 +351,7 @@ do_print_public(struct passwd *pw)
|
|||||||
perror(identity_file);
|
perror(identity_file);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
prv = try_load_pem_key(identity_file);
|
prv = load_identity(identity_file);
|
||||||
if (prv == NULL) {
|
if (prv == NULL) {
|
||||||
fprintf(stderr, "load failed\n");
|
fprintf(stderr, "load failed\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user