summaryrefslogtreecommitdiff
path: root/key.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-09-18 05:49:14 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-09-18 05:49:14 +0000
commit99a30f11c2e698916f3a3d8434a438085d9f298f (patch)
tree86288e2a6e09298839afd9e64ffe770d9354eb16 /key.c
parent6a337633321a3aef52d766e643f0abba7cdad02f (diff)
- markus@cvs.openbsd.org 2001/09/17 20:50:22
[key.c ssh-keygen.c] better error handling if you try to export a bad key to ssh.com
Diffstat (limited to 'key.c')
-rw-r--r--key.c7
1 files changed, 4 insertions, 3 deletions
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);