mirror of
https://repo.or.cz/socat.git
synced 2025-07-26 12:02:58 +00:00
Ubuntu Oneiric: OpenSSL w/o SSLv2, bsd/libutil.h, unused vars
This commit is contained in:
parent
76291f6a67
commit
4c9898446d
16 changed files with 98 additions and 74 deletions
|
@ -690,7 +690,7 @@ int
|
|||
SSL_CTX **ctx)
|
||||
{
|
||||
bool opt_fips = false;
|
||||
SSL_METHOD *method;
|
||||
const SSL_METHOD *method;
|
||||
char *me_str = NULL; /* method string */
|
||||
char *ci_str = NULL; /* cipher string */
|
||||
char *opt_key = NULL; /* file name of client private key */
|
||||
|
@ -747,8 +747,14 @@ int
|
|||
if (!server) {
|
||||
if (me_str != 0) {
|
||||
if (!strcasecmp(me_str, "SSLv2") || !strcasecmp(me_str, "SSL2")) {
|
||||
#if HAVE_SSLv2_client_method
|
||||
method = sycSSLv2_client_method();
|
||||
} else if (!strcasecmp(me_str, "SSLv3") || !strcasecmp(me_str, "SSL3")) {
|
||||
#else
|
||||
Error1("OpenSSL method \"%s\" not provided by library", me_str);
|
||||
method = sycSSLv23_server_method();
|
||||
#endif
|
||||
} else
|
||||
if (!strcasecmp(me_str, "SSLv3") || !strcasecmp(me_str, "SSL3")) {
|
||||
method = sycSSLv3_client_method();
|
||||
} else if (!strcasecmp(me_str, "SSLv23") || !strcasecmp(me_str, "SSL23") ||
|
||||
!strcasecmp(me_str, "SSL")) {
|
||||
|
@ -758,16 +764,22 @@ int
|
|||
method = sycTLSv1_client_method();
|
||||
} else {
|
||||
Error1("openssl-method=\"%s\": unknown method", me_str);
|
||||
method = sycSSLv23_client_method()/*!*/;
|
||||
method = sycSSLv23_client_method();
|
||||
}
|
||||
} else {
|
||||
method = sycSSLv23_client_method()/*!*/;
|
||||
method = sycSSLv23_client_method();
|
||||
}
|
||||
} else /* server */ {
|
||||
if (me_str != 0) {
|
||||
if (!strcasecmp(me_str, "SSLv2") || !strcasecmp(me_str, "SSL2")) {
|
||||
#if HAVE_SSLv2_server_method
|
||||
method = sycSSLv2_server_method();
|
||||
} else if (!strcasecmp(me_str, "SSLv3") || !strcasecmp(me_str, "SSL3")) {
|
||||
#else
|
||||
Error1("OpenSSL method \"%s\" not provided by library", me_str);
|
||||
method = sycSSLv23_server_method();
|
||||
#endif
|
||||
} else
|
||||
if (!strcasecmp(me_str, "SSLv3") || !strcasecmp(me_str, "SSL3")) {
|
||||
method = sycSSLv3_server_method();
|
||||
} else if (!strcasecmp(me_str, "SSLv23") || !strcasecmp(me_str, "SSL23") ||
|
||||
!strcasecmp(me_str, "SSL")) {
|
||||
|
@ -777,10 +789,10 @@ int
|
|||
method = sycTLSv1_server_method();
|
||||
} else {
|
||||
Error1("openssl-method=\"%s\": unknown method", me_str);
|
||||
method = sycSSLv23_server_method()/*!*/;
|
||||
method = sycSSLv23_server_method();
|
||||
}
|
||||
} else {
|
||||
method = sycSSLv23_server_method()/*!*/;
|
||||
method = sycSSLv23_server_method();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue