aboutsummaryrefslogtreecommitdiff
path: root/src/server.c
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2011-08-22 15:22:58 +0200
committerAndreas Schneider <asn@cryptomilk.org>2011-08-22 15:22:58 +0200
commit90167f09d3c797422a3701be8c576c92de520d8c (patch)
tree369ac420a468080d7e5754579d9787b7fa3b7faf /src/server.c
parent9c376dd913b40bbcf9e0fc528f53e02c104b6c58 (diff)
downloadlibssh-90167f09d3c797422a3701be8c576c92de520d8c.tar.gz
libssh-90167f09d3c797422a3701be8c576c92de520d8c.tar.xz
libssh-90167f09d3c797422a3701be8c576c92de520d8c.zip
server: Migrate hostkey check to new pki.
Diffstat (limited to 'src/server.c')
-rw-r--r--src/server.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/server.c b/src/server.c
index b189d561..faa4c4c5 100644
--- a/src/server.c
+++ b/src/server.c
@@ -176,14 +176,16 @@ static int dh_handshake_server(ssh_session session) {
return -1;
}
- switch(session->hostkeys){
+ switch(session->srv.hostkey) {
case SSH_KEYTYPE_DSS:
privkey = session->srv.dsa_key;
break;
case SSH_KEYTYPE_RSA:
+ case SSH_KEYTYPE_RSA1:
privkey = session->srv.rsa_key;
break;
- default:
+ case SSH_KEYTYPE_ECDSA:
+ case SSH_KEYTYPE_UNKNOWN:
privkey = NULL;
}