1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-29 01:03:57 +03:00

server: Migrate hostkey check to new pki.

This commit is contained in:
Andreas Schneider
2011-08-22 15:22:58 +02:00
parent 9c376dd913
commit 90167f09d3
3 changed files with 11 additions and 8 deletions

View File

@@ -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;
}