Add return value and error checks to make_sessionid().

git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@418 7dcaeef0-15fb-0310-b436-a5af3365683c
This commit is contained in:
Andreas Schneider
2009-04-07 18:38:09 +00:00
parent 1e52650dbf
commit 323ee63a1d
4 changed files with 143 additions and 75 deletions

View File

@@ -290,7 +290,9 @@ static int dh_handshake_server(SSH_SESSION *session){
publickey_free(pub);
dh_import_pubkey(session,pubkey);
dh_build_k(session);
make_sessionid(session);
if (make_sessionid(session) != SSH_OK) {
return -1;
}
sign=ssh_sign_session_id(session,prv);
buffer_free(buf);
/* free private keys as they should not be readable past this point */