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

session: Use a struct for all options.

This commit is contained in:
Andreas Schneider
2012-02-05 11:50:49 +01:00
parent 840f75f10c
commit ee774479de
16 changed files with 235 additions and 226 deletions

View File

@@ -161,15 +161,15 @@ SSH_PACKET_CALLBACK(ssh_packet_newkeys){
}
/* check if public key from server matches user preferences */
if (session->wanted_methods[SSH_HOSTKEYS]) {
if(!ssh_match_group(session->wanted_methods[SSH_HOSTKEYS],
if (session->opts.wanted_methods[SSH_HOSTKEYS]) {
if(!ssh_match_group(session->opts.wanted_methods[SSH_HOSTKEYS],
key->type_c)) {
ssh_set_error(session,
SSH_FATAL,
"Public key from server (%s) doesn't match user "
"preference (%s)",
key->type_c,
session->wanted_methods[SSH_HOSTKEYS]);
session->opts.wanted_methods[SSH_HOSTKEYS]);
ssh_key_free(key);
return -1;
}