Merge pull request #367 from deargle/fix-ssh-threadsafe

make thread-safe against old ssl versions
This commit is contained in:
van Hauser 2018-10-26 15:05:34 +02:00 committed by GitHub
commit 3585e505d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -40,6 +40,7 @@ int32_t start_ssh(int32_t s, char *ip, int32_t port, unsigned char options, char
ssh_free(session); ssh_free(session);
} }
ssh_init();
session = ssh_new(); session = ssh_new();
ssh_options_set(session, SSH_OPTIONS_PORT, &port); ssh_options_set(session, SSH_OPTIONS_PORT, &port);
ssh_options_set(session, SSH_OPTIONS_HOST, hydra_address2string(ip)); ssh_options_set(session, SSH_OPTIONS_HOST, hydra_address2string(ip));