summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--key.c7
-rw-r--r--ssh-keygen.c7
3 files changed, 13 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 199c4e356..e6582c9a4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -23,6 +23,9 @@
23 - stevesk@cvs.openbsd.org 2001/09/17 20:38:09 23 - stevesk@cvs.openbsd.org 2001/09/17 20:38:09
24 [sftp.1 sftp.c] 24 [sftp.1 sftp.c]
25 cleanup and document -1, -s and -S; ok markus@ 25 cleanup and document -1, -s and -S; ok markus@
26 - markus@cvs.openbsd.org 2001/09/17 20:50:22
27 [key.c ssh-keygen.c]
28 better error handling if you try to export a bad key to ssh.com
26 29
2720010917 3020010917
28 - (djm) x11-ssh-askpass-1.2.4 in RPM spec, revert workarounds 31 - (djm) x11-ssh-askpass-1.2.4 in RPM spec, revert workarounds
@@ -6483,4 +6486,4 @@
6483 - Wrote replacements for strlcpy and mkdtemp 6486 - Wrote replacements for strlcpy and mkdtemp
6484 - Released 1.0pre1 6487 - Released 1.0pre1
6485 6488
6486$Id: ChangeLog,v 1.1535 2001/09/18 05:47:32 mouring Exp $ 6489$Id: ChangeLog,v 1.1536 2001/09/18 05:49:14 mouring Exp $
diff --git a/key.c b/key.c
index 482168de0..b382f36cf 100644
--- a/key.c
+++ b/key.c
@@ -32,7 +32,7 @@
32 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34#include "includes.h" 34#include "includes.h"
35RCSID("$OpenBSD: key.c,v 1.30 2001/09/17 19:27:15 stevesk Exp $"); 35RCSID("$OpenBSD: key.c,v 1.31 2001/09/17 20:50:22 markus Exp $");
36 36
37#include <openssl/evp.h> 37#include <openssl/evp.h>
38 38
@@ -728,8 +728,9 @@ key_to_blob(Key *key, u_char **blobp, u_int *lenp)
728 buffer_put_bignum2(&b, key->rsa->n); 728 buffer_put_bignum2(&b, key->rsa->n);
729 break; 729 break;
730 default: 730 default:
731 error("key_to_blob: illegal key type %d", key->type); 731 error("key_to_blob: unsupported key type %d", key->type);
732 break; 732 buffer_free(&b);
733 return 0;
733 } 734 }
734 len = buffer_len(&b); 735 len = buffer_len(&b);
735 buf = xmalloc(len); 736 buf = xmalloc(len);
diff --git a/ssh-keygen.c b/ssh-keygen.c
index db4fef2fe..299ba79c8 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.80 2001/09/17 19:27:15 stevesk Exp $"); 15RCSID("$OpenBSD: ssh-keygen.c,v 1.81 2001/09/17 20:50:22 markus Exp $");
16 16
17#include <openssl/evp.h> 17#include <openssl/evp.h>
18#include <openssl/pem.h> 18#include <openssl/pem.h>
@@ -163,7 +163,10 @@ do_convert_to_ssh2(struct passwd *pw)
163 exit(1); 163 exit(1);
164 } 164 }
165 } 165 }
166 key_to_blob(k, &blob, &len); 166 if (key_to_blob(k, &blob, &len) <= 0) {
167 fprintf(stderr, "key_to_blob failed\n");
168 exit(1);
169 }
167 fprintf(stdout, "%s\n", SSH_COM_PUBLIC_BEGIN); 170 fprintf(stdout, "%s\n", SSH_COM_PUBLIC_BEGIN);
168 fprintf(stdout, 171 fprintf(stdout,
169 "Comment: \"%d-bit %s, converted from OpenSSH by %s@%s\"\n", 172 "Comment: \"%d-bit %s, converted from OpenSSH by %s@%s\"\n",