aboutsummaryrefslogtreecommitdiffstats
path: root/testing/prayer/disable_ssl3.patch
diff options
context:
space:
mode:
authorBartłomiej Piotrowski <bpiotrowski@alpinelinux.org>2014-11-21 21:38:56 +0100
committerBartłomiej Piotrowski <bpiotrowski@alpinelinux.org>2014-11-21 21:38:56 +0100
commit129f727e7b6215c88e623d31156e2c31346ecb21 (patch)
treef9b2bebcdc8ed385d81305d7b5fb2b46f8b1c1f1 /testing/prayer/disable_ssl3.patch
parentf55b3f371ed9c97416ff3257d7d1ac6251ad0c00 (diff)
downloadaports-129f727e7b6215c88e623d31156e2c31346ecb21.tar.bz2
aports-129f727e7b6215c88e623d31156e2c31346ecb21.tar.xz
testing/prayer: new aport
Diffstat (limited to 'testing/prayer/disable_ssl3.patch')
-rw-r--r--testing/prayer/disable_ssl3.patch58
1 files changed, 58 insertions, 0 deletions
diff --git a/testing/prayer/disable_ssl3.patch b/testing/prayer/disable_ssl3.patch
new file mode 100644
index 0000000000..35f74e5121
--- /dev/null
+++ b/testing/prayer/disable_ssl3.patch
@@ -0,0 +1,58 @@
+Description: Disable SSL 3.0 on client as well as server side
+Author: Magnus Holmgren <holmgren@debian.org>
+
+--- a/lib/ssl.c
++++ b/lib/ssl.c
+@@ -387,12 +387,16 @@ void ssl_context_init(struct ssl_config
+ SSL_load_error_strings();
+
+ /* Set up client context: only used by accountd */
+- client_ctx = SSL_CTX_new(SSLv3_client_method());
++ client_ctx = SSL_CTX_new(SSLv23_client_method());
+ SSL_CTX_set_session_cache_mode(client_ctx, SSL_SESS_CACHE_BOTH);
+ SSL_CTX_set_info_callback(client_ctx, info_callback);
+ #ifdef SSL_MODE_AUTO_RETRY
+ SSL_CTX_set_mode(client_ctx, SSL_MODE_AUTO_RETRY);
+ #endif
++ /* SSLv2 now obsolete */
++ SSL_CTX_set_options(client_ctx, SSL_OP_NO_SSLv2);
++ /* SSLv3 now also obsolete */
++ SSL_CTX_set_options(client_ctx, SSL_OP_NO_SSLv3);
+
+ if (SSL_CTX_need_tmp_RSA(client_ctx))
+ SSL_CTX_set_tmp_rsa_callback(client_ctx, rsa_callback);
+@@ -420,6 +424,8 @@ void ssl_context_init(struct ssl_config
+
+ /* SSLv2 now obsolete */
+ SSL_CTX_set_options(server_ctx, SSL_OP_NO_SSLv2);
++ /* SSLv3 now also obsolete */
++ SSL_CTX_set_options(server_ctx, SSL_OP_NO_SSLv3);
+
+ /* Start off with the session cache disabled */
+ SSL_CTX_set_session_cache_mode(server_ctx, SSL_SESS_CACHE_OFF);
+@@ -625,6 +631,12 @@ void *ssl_start_server(int fd, unsigned
+ case TLS1_VERSION:
+ ver = "TLSv1";
+ break;
++ case TLS1_1_VERSION:
++ ver = "TLSv1.1";
++ break;
++ case TLS1_2_VERSION:
++ ver = "TLSv1.2";
++ break;
+ default:
+ ver = "UNKNOWN";
+ }
+@@ -678,6 +690,12 @@ void *ssl_start_client(int fd, unsigned
+ case TLS1_VERSION:
+ ver = "TLSv1";
+ break;
++ case TLS1_1_VERSION:
++ ver = "TLSv1.1";
++ break;
++ case TLS1_2_VERSION:
++ ver = "TLSv1.2";
++ break;
+ default:
+ ver = "UNKNOWN";
+ }