diff options
author | Matt Johnston <matt@ucc.asn.au> | 2013-04-14 00:50:03 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2013-04-14 00:50:03 +0800 |
commit | 5c87c6a435ab1791294c412abe32aa629b42fdc7 (patch) | |
tree | 6986d3354125438325538674274b82455ce8589a /keyimport.c | |
parent | f842712551cc458532aaddb6f140fe1286cfa9fb (diff) |
A bit of work on ecdsa for host/auth keys
--HG--
branch : ecc
Diffstat (limited to 'keyimport.c')
-rw-r--r-- | keyimport.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/keyimport.c b/keyimport.c index 76b92f1..e8fded7 100644 --- a/keyimport.c +++ b/keyimport.c @@ -349,7 +349,7 @@ struct mpint_pos { void *start; int bytes; }; * 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 @@ static struct openssh_key *load_openssh_key(const char *filename) 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; |