upstream commit
missing parentheses after if in do_convert_from() broke private key conversion from other formats some time in 2010; bz#2345 reported by jjelen AT redhat.com
This commit is contained in:
parent
25f5f78d8b
commit
7a2c368477
|
@ -1,4 +1,4 @@
|
||||||
/* $OpenBSD: ssh-keygen.c,v 1.259 2015/01/28 22:36:00 djm Exp $ */
|
/* $OpenBSD: ssh-keygen.c,v 1.260 2015/01/30 00:59:19 djm Exp $ */
|
||||||
/*
|
/*
|
||||||
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||||
* Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
* Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
||||||
|
@ -721,12 +721,12 @@ do_convert_from(struct passwd *pw)
|
||||||
fatal("%s: unknown key format %d", __func__, convert_format);
|
fatal("%s: unknown key format %d", __func__, convert_format);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!private)
|
if (!private) {
|
||||||
if ((r = sshkey_write(k, stdout)) == 0)
|
if ((r = sshkey_write(k, stdout)) == 0)
|
||||||
ok = 1;
|
ok = 1;
|
||||||
if (ok)
|
if (ok)
|
||||||
fprintf(stdout, "\n");
|
fprintf(stdout, "\n");
|
||||||
else {
|
} else {
|
||||||
switch (k->type) {
|
switch (k->type) {
|
||||||
case KEY_DSA:
|
case KEY_DSA:
|
||||||
ok = PEM_write_DSAPrivateKey(stdout, k->dsa, NULL,
|
ok = PEM_write_DSAPrivateKey(stdout, k->dsa, NULL,
|
||||||
|
|
Loading…
Reference in New Issue