Skip to content

Commit

Permalink
ssl,ssh and http-form fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
vanhauser-thc committed Jan 20, 2016
1 parent 852aa71 commit 725d14b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ else
fi

SSLNEW=""
if [ "X" = "X$WSSL_PATH" ]; then
if [ "X" = "X$SSL_PATH" ]; then
SSL_PATH="$i"
SSLNEW=`grep SHA256_CTX $i/openssl/sha.h 2> /dev/null`
else
Expand Down
2 changes: 1 addition & 1 deletion hydra-http-form.c
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ char *html_encode(char *string) {
if (index(ret, '&') != NULL)
ret = hydra_strrep(ret, "&", "%26");
if (index(ret, '#') != NULL)
ret = hydra_strrep(ret, "&", "%23");
ret = hydra_strrep(ret, "#", "%23");

return ret;
}
Expand Down
6 changes: 4 additions & 2 deletions hydra-mod.c
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ int internal__hydra_connect_to_ssl(int socket) {
} else {
// if ((sslContext = SSL_CTX_new(SSLv23_client_method())) == NULL) {
#ifndef TLSv1_2_client_method
#define TLSv1_2_client_method TLSv1_client_method
#define TLSv1_2_client_method TLSv1_client_method
#endif
if ((sslContext = SSL_CTX_new(TLSv1_2_client_method())) == NULL) {
if (verbose) {
Expand Down Expand Up @@ -774,6 +774,7 @@ int hydra_connect_to_ssl(int socket) {
#ifdef LIBOPENSSL
return (internal__hydra_connect_to_ssl(socket));
#else
fprintf(stderr, "Error: not compiled with SSL\n");
return -1;
#endif
}
Expand All @@ -786,7 +787,8 @@ int hydra_connect_ssl(char *host, int port) {
#ifdef LIBOPENSSL
return (internal__hydra_connect_ssl(host, port, SOCK_STREAM, 6));
#else
return (internal__hydra_connect(host, port, SOCK_STREAM, 6));
fprintf(stderr, "Error: not compiled with SSL\n");
return -1;
#endif
}

Expand Down

0 comments on commit 725d14b

Please sign in to comment.