summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/authfile.c
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2013-12-06 13:39:50 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2013-12-06 13:39:50 +0000
commita290ddcba332424443fa2507428cf4bdfd415bac (patch)
tree77d1dc09898f6b40a269e48d8520cffd5bb31dc0 /usr.bin/ssh/authfile.c
parent4b5b44f5080b9b0bd2e297236bde454a7b1d32aa (diff)
support ed25519 keys (hostkeys and user identities) using the public domain
ed25519 reference code from SUPERCOP, see http://ed25519.cr.yp.to/software.html feedback, help & ok djm@
Diffstat (limited to 'usr.bin/ssh/authfile.c')
-rw-r--r--usr.bin/ssh/authfile.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/usr.bin/ssh/authfile.c b/usr.bin/ssh/authfile.c
index c712653bf2c..77594c4e3b1 100644
--- a/usr.bin/ssh/authfile.c
+++ b/usr.bin/ssh/authfile.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: authfile.c,v 1.99 2013/12/06 13:34:54 markus Exp $ */
+/* $OpenBSD: authfile.c,v 1.100 2013/12/06 13:39:49 markus Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -46,6 +46,8 @@
#include <openssl/evp.h>
#include <openssl/pem.h>
+#include "crypto_api.h"
+
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
@@ -582,6 +584,9 @@ key_private_to_blob(Key *key, Buffer *blob, const char *passphrase,
comment, new_format_cipher, new_format_rounds);
}
return key_private_pem_to_blob(key, blob, passphrase, comment);
+ case KEY_ED25519:
+ return key_private_to_blob2(key, blob, passphrase,
+ comment, new_format_cipher, new_format_rounds);
default:
error("%s: cannot save key type %d", __func__, key->type);
return 0;
@@ -981,6 +986,9 @@ key_parse_private_type(Buffer *blob, int type, const char *passphrase,
case KEY_DSA:
case KEY_ECDSA:
case KEY_RSA:
+ return key_parse_private_pem(blob, type, passphrase, commentp);
+ case KEY_ED25519:
+ return key_parse_private2(blob, type, passphrase, commentp);
case KEY_UNSPEC:
if ((k = key_parse_private2(blob, type, passphrase, commentp)))
return k;