Skip to content

StrictSSL enabled request throws error #158

@mweibel

Description

@mweibel

I'm using the https://github.com/mikeal/request module and it seems that when setting strictSSL to true (If true, requires SSL certificates be valid. Note: to use your own certificate authority, you need to specify an agent that was created with that CA as an option.) nock fails with this error:

Uncaught TypeError: Cannot read property 'authorized' of undefined
      at Request.onResponse (/Users/wemi/Code/Coresystems/web-node/node_modules/request/request.js:730:23)
      at OverridenClientRequest.EventEmitter.emit (events.js:95:17)
      at /Users/wemi/Code/Coresystems/web-node/node_modules/nock/lib/request_overrider.js:281:11
      at process._tickCallback (node.js:415:13)

I understand why it is like that (nock isn't issuing a valid certificate obviously), but is there some workaround?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions