Mercurial > dropbear
diff keyimport.c @ 793:70625eed40c9 ecc
A bit of work on ecdsa for host/auth keys
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sun, 14 Apr 2013 00:50:03 +0800 |
parents | 9dbc0c443497 |
children | 71e7d31f7671 |
line wrap: on
line diff
--- a/keyimport.c Tue Apr 09 22:47:03 2013 +0800 +++ b/keyimport.c Sun Apr 14 00:50:03 2013 +0800 @@ -349,7 +349,7 @@ * Code to read and write OpenSSH private keys. */ -enum { OSSH_DSA, OSSH_RSA }; +enum { OSSH_DSA, OSSH_RSA, OSSH_EC }; struct openssh_key { int type; int encrypted; @@ -392,6 +392,8 @@ ret->type = OSSH_RSA; else if (!strcmp(buffer, "-----BEGIN DSA PRIVATE KEY-----\n")) ret->type = OSSH_DSA; + else if (!strcmp(buffer, "-----BEGIN EC PRIVATE KEY-----\n")) + ret->type = OSSH_EC; else { errmsg = "Unrecognised key type"; goto error;