SSL/TLSv1.2 support/fix

This commit is contained in:
van Hauser 2014-12-25 17:49:06 +01:00
commit 9de979af9d
2 changed files with 5 additions and 3 deletions

View file

@ -5,6 +5,7 @@ Release 8.2-pre
* Added xhydra gtk patche by Petar Kaleychev to support modules that do not use usernames
* Better library finding in ./configure for SVN + support for Darwin Homebrew
* Fixed http-form module crash that only occurs on *BSD/OSX systems. Thanks to zdk for reporting!
* Fixed for SSL connection to support TLSv1.2 etc.
* ... your patch?

View file

@ -466,7 +466,8 @@ int internal__hydra_connect_to_ssl(int socket) {
if (sslContext == NULL) {
/* context: ssl2 + ssl3 is allowed, whatever the server demands */
if ((sslContext = SSL_CTX_new(SSLv23_client_method())) == NULL) {
// if ((sslContext = SSL_CTX_new(SSLv23_client_method())) == NULL) {
if ((sslContext = SSL_CTX_new(TLSv1_2_client_method())) == NULL) {
if (verbose) {
err = ERR_get_error();
fprintf(stderr, "[ERROR] SSL allocating context: %s\n", ERR_error_string(err, NULL));
@ -475,8 +476,8 @@ int internal__hydra_connect_to_ssl(int socket) {
}
/* set the compatbility mode */
SSL_CTX_set_options(sslContext, SSL_OP_ALL);
SSL_CTX_set_options(sslContext, SSL_OP_NO_SSLv2);
SSL_CTX_set_options(sslContext, SSL_OP_NO_TLSv1);
// SSL_CTX_set_options(sslContext, SSL_OP_NO_SSLv2);
// SSL_CTX_set_options(sslContext, SSL_OP_NO_TLSv1);
/* we set the default verifiers and dont care for the results */
(void) SSL_CTX_set_default_verify_paths(sslContext);