Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Problem with self-signed servers #28

Closed
mknj opened this issue Apr 5, 2018 · 2 comments
Closed

Problem with self-signed servers #28

mknj opened this issue Apr 5, 2018 · 2 comments

Comments

@mknj
Copy link

mknj commented Apr 5, 2018

Does not honor the rejectUnauthorized: false option that is set inside https.get.

code

     let agent = tunnel.httpsOverHttp({
        proxy: {
          host: 'localhost',
          port: 3128
        }
      });
      let options = {hostname: 'localhost', port: 8443, agent: agent, rejectUnauthorized: false}
      https.get(options, (resp) => {
        resp.statusCode.should.equal(200)
        resp.on('data', console.log)
      })

result

Error: self signed certificate
    at TLSSocket.<anonymous> (_tls_wrap.js:1105:38)
    at TLSSocket._finishInit (_tls_wrap.js:639:8)
    at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:469:38)


@bilportistivraboti
Copy link

Had the same problem - you have to use rejectUnauthorized: false on both client and server.

@koichik
Copy link
Owner

koichik commented Sep 11, 2018

@bilportistivraboti : Thanks, closing.
@mknj : Feel free to reopen if you couldn't solve this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants