Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for ssl_dh config #38

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ To see a more complete description of the attributes, go to the [Dovecot wiki2 c
| `node['dovecot']['conf']['ssl_verify_client_cert']` | *nil* | Request client to send a certificate.
| `node['dovecot']['conf']['ssl_cert_username_field']` | *nil* | Which field from certificate to use for username.
| `node['dovecot']['conf']['ssl_parameters_regenerate']` | *nil* | How often to regenerate the SSL parameters file.
| `node['dovecot']['conf']['ssl_dh']` | *nil* | DH parameters to use. Generate new params with `openssl dhparam -out /etc/dovecot/dh.pem 4096`
| `node['dovecot']['conf']['ssl_dh_parameters_length']` | *nil* | DH parameters length to use.
| `node['dovecot']['conf']['ssl_protocols']` | *nil* | SSL protocols to use.
| `node['dovecot']['conf']['ssl_cipher_list']` | *nil* | SSL ciphers to use.
Expand Down
1 change: 1 addition & 0 deletions attributes/conf_10_ssl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
default['dovecot']['conf']['ssl_cert_username_field'] = nil
default['dovecot']['conf']['ssl_parameters_regenerate'] = nil
default['dovecot']['conf']['ssl_dh_parameters_length'] = nil
default['dovecot']['conf']['ssl_dh'] = nil
default['dovecot']['conf']['ssl_protocols'] = nil
default['dovecot']['conf']['ssl_cipher_list'] = nil
default['dovecot']['conf']['ssl_prefer_server_ciphers'] = nil
Expand Down
6 changes: 6 additions & 0 deletions templates/default/conf.d/10-ssl.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@
# DH parameters length to use.
<%= DovecotCookbook::Conf.attribute(@conf, 'ssl_dh_parameters_length', 1024) %>

# SSL DH parameters
# Generate new params with `openssl dhparam -out /etc/dovecot/dh.pem 4096`
# Or migrate from old ssl-parameters.dat file with the command dovecot
# gives on startup when ssl_dh is unset.
<%= DovecotCookbook::Conf.attribute(@conf, 'ssl_dh', '</usr/share/dovecot/dh.pem') %>

# SSL protocols to use
<%= DovecotCookbook::Conf.attribute(@conf, 'ssl_protocols', '!SSLv2') %>

Expand Down