http-party/node-http-proxy

Using cert auth results in `SSL alert number 46`

josh-hemphill opened this issue · 1 comments

Whenever I set my server to cert-auth require, the node-http-proxy acting as the client fails with:
D0340000:error:0A000416:SSL routines:ssl3_read_bytes:sslv3 alert certificate unknown:C:\ws\deps\openssl\openssl\ssl\record\rec_layer_s3.c:1586:SSL alert number 46

I'm using the following in my config to set client cert for auth:

config = {
  target: 'some target url',
  secure: false,
  followRedirects: true,
  ssl:{
    pfx:[{
        buf: readFileSync('somefile'),
        passphrase:"some passphrase"
      }]
  }
}

I've made sure other clients can connect to my server directly just fine with client cert auth, it only seems to be an issue with node-http-proxy

Apparently, it needs to be configured under a target object option, instead of using a string for the target.

I would still consider this an issue, there needs to be some mention where the ssl option is described, not to use it for specifying a client cert and to use the target instead since it will break in a weird way otherwise.