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

https: disallow boolean types for key and cert options #14807

Closed
wants to merge 4 commits into from

Commits on Aug 13, 2017

  1. https: disallow boolean types for key and cert options

    When using https.createServer, passing boolean values for `key` and `cert` properties in the options object parameter doesn't throw an error an could lead to potential issues if they're accidentally passed.
    
    This PR aims to throw a reasonable error if a boolean was passed to either of those properties.
    
    Fixes: nodejs#12802
    jimmycann committed Aug 13, 2017
    Configuration menu
    Copy the full SHA
    262d4b2 View commit details
    Browse the repository at this point in the history

Commits on Aug 14, 2017

  1. tls: disallow boolean types for key, cert and ca options

    Taking on board the review from the initial PR, multiple changes have been made.
    - Type checking now a whitelist as opposed to only checking for a boolean
    - Type checking moved to the underlying `_tls_common` , `tls` and `https` modules now affected
    - Arrays are now iterated using `map` instead of `for` for affected sections
    -Testing added for the `tls` module
    
    Fixes: nodejs#12802
    jimmycann committed Aug 14, 2017
    Configuration menu
    Copy the full SHA
    e92e64a View commit details
    Browse the repository at this point in the history

Commits on Aug 16, 2017

  1. tls: type checking for key, cert and ca options

    Additional changes in line with PR review
    
    - Loosen type checking for buffers using the ArrayBuffer method
    - Require pem files using updated fixture access method
    - Add tests for ArrayBuffer and DataView types
    
    Fixes: nodejs#12802
    jimmycann committed Aug 16, 2017
    Configuration menu
    Copy the full SHA
    b132c96 View commit details
    Browse the repository at this point in the history
  2. tls: type checking for key, cert and ca options

    - Change iteration method from map -> forEach
    
    Fixes: nodejs#12802
    jimmycann committed Aug 16, 2017
    Configuration menu
    Copy the full SHA
    c46fdd4 View commit details
    Browse the repository at this point in the history