Skip to content

tls: add --tls-cipher-list command line switch#2412

Closed
jasnell wants to merge 1 commit into
nodejs:masterfrom
jasnell:cipher-list-switch
Closed

tls: add --tls-cipher-list command line switch#2412
jasnell wants to merge 1 commit into
nodejs:masterfrom
jasnell:cipher-list-switch

Conversation

@jasnell

@jasnell jasnell commented Aug 17, 2015

Copy link
Copy Markdown
Member

This adds a new --cipher-list command line switch, and
corresponding NODE_CIPHER_LIST environment variable,
that can be used to override the built-in default cipher
list. The intent of this is to make it possible to enforce
an alternative default cipher list at the process level.
Overriding the default cipher list is still permitted at
the application level by changing the value of
require('tls').DEFAULT_CIPHERS.

As part of the change, the built in default list is moved
out of tls.js and into node_constants.h and node_constants.cc.
Two new constants are added to require('constants'):

  • DEFAULT_CIPHER_LIST defaultCipherList (the active default cipher list)
  • DEFAULT_CIPHER_LIST_CORE defaultCoreCipherList (the built-in default cipher list)

A test case and doc changes are included.

A new NODE_DEFINE_STRING_CONSTANT macro is also created in
node.h

When node_constants is initialized, it will pick up either
the passed in command line switch or envvar value or fallback
to the default built in suite.

Within joyent/node, this change had originaly been wrapped
up with a number of other related commits involving the
removal of the RC4 cipher. This breaks out this isolated
change.

/cc @mhdawson, @misterdjules, @trevnorris, @indutny, @rvagg

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver-minor PRs that contain new features and should be released in the next minor version. tls Issues and PRs related to the tls subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants