Skip to content

Commit

Permalink
Add setting to configure ecdh curve
Browse files Browse the repository at this point in the history
  • Loading branch information
aledbf committed Mar 31, 2017
1 parent 5d17c7c commit 8e41bdd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions controllers/nginx/pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,10 @@ type Configuration struct {
// http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_ciphers
SSLCiphers string `json:"ssl-ciphers,omitempty"`

// Specifies a curve for ECDHE ciphers.
// http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_ecdh_curve
SSLECDHCurve string `json:"ssl-ecdh-curve,omitempty"`

// The secret that contains Diffie-Hellman key to help with "Perfect Forward Secrecy"
// https://www.openssl.org/docs/manmaster/apps/dhparam.html
// https://wiki.mozilla.org/Security/Server_Side_TLS#DHE_handshake_and_dhparam
Expand Down Expand Up @@ -280,6 +284,7 @@ func NewDefault() Configuration {
ShowServerTokens: true,
SSLBufferSize: sslBufferSize,
SSLCiphers: sslCiphers,
SSLECDHCurve: "secp384r1",
SSLProtocols: sslProtocols,
SSLSessionCache: true,
SSLSessionCacheSize: sslSessionCacheSize,
Expand Down
2 changes: 2 additions & 0 deletions controllers/nginx/rootfs/etc/nginx/template/nginx.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,8 @@ http {
ssl_dyn_rec_size_lo 0;
{{ end }}

ssl_ecdh_curve {{ $cfg.SSLECDHCurve }};

{{ if .CustomErrors }}
# Custom error pages
proxy_intercept_errors on;
Expand Down

0 comments on commit 8e41bdd

Please sign in to comment.