Skip to content

SNICallback callback doesn't throw an error with invalid input #2126

@coolaj86

Description

@coolaj86

This should throw an error:

{ ...
, SNICallback: function (domainname, cb) {
    cb(null, { key: '...', cert: '...', ca: '...' });
  }
}

Instead it succeeds and then the browser barfs.

I was live coding and couldn't figure out in the 30 seconds I just had to wrap my object in require('crypto').createSecureContext(...), so I just used http. :-(

If it had thrown an error it would have made the whole world a better place.

Metadata

Metadata

Assignees

No one assigned

    Labels

    tlsIssues and PRs related to the tls subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions