Skip to content

Commit

Permalink
Add ssl_ecdh_curve to server resource
Browse files Browse the repository at this point in the history
  • Loading branch information
jdmulloy committed Mar 17, 2018
1 parent 65b7c74 commit 0850b07
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions manifests/resource/server.pp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
# [*ssl_crl*] - String: Specifies CRL path in file system
# [*ssl_dhparam*] - This directive specifies a file containing Diffie-Hellman key agreement protocol cryptographic
# parameters, in PEM format, utilized for exchanging session keys between server and client. Defaults to nginx::ssl_dhparam
# [*ssl_ecdh_curve*] - This directive specifies a curve for ECDHE ciphers.
# [*ssl_prefer_server_ciphers*] - String: Specifies that server ciphers should be preferred over client ciphers when using the SSLv3 and
# TLS protocols. Defaults to nginx::ssl_prefer_server_ciphers.
# [*ssl_redirect*] - Adds a server directive and return statement to force ssl redirect. Will honor ssl_port if it's set.
Expand Down Expand Up @@ -159,6 +160,7 @@
Optional[String] $ssl_client_cert = undef,
String $ssl_verify_client = 'on',
Optional[String] $ssl_dhparam = $::nginx::ssl_dhparam,
Optional[String] $ssl_ecdh_curve = undef,
Boolean $ssl_redirect = false,
Optional[Integer] $ssl_redirect_port = undef,
Optional[Variant[String, Boolean]] $ssl_key = undef,
Expand Down
6 changes: 6 additions & 0 deletions spec/defines/resource_server_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,12 @@
value: '/tmp/dhparam',
match: %r{\s+ssl_dhparam\s+/tmp/dhparam;}
},
{
title: 'should set ssl_ecdh_curve',
attr: 'ssl_ecdh_curve',
value: 'secp521r1',
match: %r{\s+ssl_ecdh_curve\s+secp521r1;}
},
{
title: 'should set the SSL stapling file',
attr: 'ssl_stapling_file',
Expand Down
3 changes: 3 additions & 0 deletions templates/server/server_ssl_settings.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
<% if defined? @ssl_dhparam -%>
ssl_dhparam <%= @ssl_dhparam %>;
<% end -%>
<%- if defined? @ssl_ecdh_curve -%>
ssl_ecdh_curve <%= @ssl_ecdh_curve %>;
<%- end -%>
ssl_session_cache <%= @ssl_cache %>;
ssl_session_timeout <%= @ssl_session_timeout %>;
<% if @ssl_session_tickets -%>
Expand Down

0 comments on commit 0850b07

Please sign in to comment.