diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2011-08-22 14:29:39 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2011-08-22 14:29:39 +0200 |
commit | 4de452055952b89aa093f7b43d3a5e40c5f7bc68 (patch) | |
tree | 305a8c1a6f624fa3dede0b61296c40d18a59d434 /src/bind.c | |
parent | 245a354187d6f743c511a2e64b2b5643f9b90e66 (diff) | |
download | libssh-4de452055952b89aa093f7b43d3a5e40c5f7bc68.tar.gz libssh-4de452055952b89aa093f7b43d3a5e40c5f7bc68.tar.xz libssh-4de452055952b89aa093f7b43d3a5e40c5f7bc68.zip |
server: Use new pki infrastructure.
Diffstat (limited to 'src/bind.c')
-rw-r--r-- | src/bind.c | 32 |
1 files changed, 4 insertions, 28 deletions
@@ -333,8 +333,6 @@ void ssh_bind_free(ssh_bind sshbind){ int ssh_bind_accept(ssh_bind sshbind, ssh_session session) { - ssh_key dsa = NULL; - ssh_key rsa = NULL; socket_t fd = SSH_INVALID_SOCKET; int i; @@ -392,42 +390,20 @@ int ssh_bind_accept(ssh_bind sshbind, ssh_session session) { ssh_socket_set_fd(session->socket, fd); ssh_socket_get_poll_handle_out(session->socket); - /* FIXME */ -#if 0 if (sshbind->dsa) { - session->dsa_key = ssh_key_dup(sshbind->dsa); - if (session->dsa_key == NULL) { + session->srv.dsa_key = ssh_key_dup(sshbind->dsa); + if (session->srv.dsa_key == NULL) { ssh_set_error_oom(sshbind); return SSH_ERROR; } } if (sshbind->rsa) { - session->rsa_key = ssh_key_dup(sshbind->rsa); - if (session->rsa_key == NULL) { + session->srv.rsa_key = ssh_key_dup(sshbind->rsa); + if (session->srv.rsa_key == NULL) { ssh_set_error_oom(sshbind); return SSH_ERROR; } } -#else - if (sshbind->dsa) { - dsa = ssh_key_dup(sshbind->dsa); - if (dsa == NULL) { - ssh_set_error_oom(sshbind); - return SSH_ERROR; - } - session->dsa_key = ssh_pki_convert_key_to_privatekey(dsa); - } - - if (sshbind->rsa) { - rsa = ssh_key_dup(sshbind->rsa); - if (rsa == NULL) { - ssh_set_error_oom(sshbind); - return SSH_ERROR; - } - session->rsa_key = ssh_pki_convert_key_to_privatekey(rsa); - } - -#endif return SSH_OK; } |