1 |
vip-ire |
1.1 |
diff -Nur qpsmtpd-0.84/plugins/tls qpsmtpd-0.84_bz8726/plugins/tls |
2 |
|
|
--- qpsmtpd-0.84/plugins/tls 2014-12-10 22:30:01.359000000 +0100 |
3 |
|
|
+++ qpsmtpd-0.84_bz8726/plugins/tls 2014-12-10 22:33:38.215000000 +0100 |
4 |
|
|
@@ -74,6 +74,7 @@ |
5 |
|
|
$self->tls_key($key); |
6 |
|
|
$self->tls_ca($ca); |
7 |
|
|
$self->tls_ciphers($self->qp->config('tls_ciphers') || 'HIGH'); |
8 |
|
|
+ $self->tls_version($self->qp->config('tls_version') || 'TLSv1'); |
9 |
|
|
|
10 |
|
|
Qpsmtpd->varlog(LOGINFO, "init", "tls", "ciphers: ".$self->tls_ciphers); |
11 |
|
|
|
12 |
|
|
@@ -84,6 +85,7 @@ |
13 |
|
|
SSL_key_file => $self->tls_key, |
14 |
|
|
SSL_ca_file => $self->tls_ca, |
15 |
|
|
SSL_cipher_list => $self->tls_ciphers, |
16 |
|
|
+ SSL_version => $self->tls_version, |
17 |
|
|
SSL_server => 1 |
18 |
|
|
) or die "Could not create SSL context: $!"; |
19 |
|
|
# now extract the password... |
20 |
|
|
@@ -180,6 +182,7 @@ |
21 |
|
|
SSL_key_file => $self->tls_key, |
22 |
|
|
SSL_ca_file => $self->tls_ca, |
23 |
|
|
SSL_cipher_list => $self->tls_ciphers, |
24 |
|
|
+ SSL_version => $self->tls_version, |
25 |
|
|
SSL_server => 1, |
26 |
|
|
SSL_reuse_ctx => $self->ssl_context, |
27 |
|
|
) or die "Could not create SSL socket: $!"; |
28 |
|
|
@@ -236,6 +239,12 @@ |
29 |
|
|
$self->{_tls_ciphers}; |
30 |
|
|
} |
31 |
|
|
|
32 |
|
|
+sub tls_version { |
33 |
|
|
+ my $self = shift; |
34 |
|
|
+ @_ and $self->{_tls_version} = shift; |
35 |
|
|
+ $self->{_tls_version}; |
36 |
|
|
+} |
37 |
|
|
+ |
38 |
|
|
sub ssl_context { |
39 |
|
|
my $self = shift; |
40 |
|
|
@_ and $self->{_ssl_ctx} = shift; |
41 |
|
|
@@ -282,6 +291,7 @@ |
42 |
|
|
SSL_key_file => $self->{_stashed_plugin}->tls_key, |
43 |
|
|
SSL_ca_file => $self->{_stashed_plugin}->tls_ca, |
44 |
|
|
SSL_cipher_list => $self->{_stashed_plugin}->tls_ciphers, |
45 |
|
|
+ SSL_version => $self->{_stashed_plugin}->tls_version, |
46 |
|
|
SSL_startHandshake => 0, |
47 |
|
|
SSL_server => 1, |
48 |
|
|
SSL_reuse_ctx => $self->{_stashed_plugin}->ssl_context, |