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

Using cert auth results in SSL alert number 46 #1643

Open
josh-hemphill opened this issue Aug 2, 2023 · 1 comment
Open

Using cert auth results in SSL alert number 46 #1643

josh-hemphill opened this issue Aug 2, 2023 · 1 comment

Comments

@josh-hemphill
Copy link

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

@josh-hemphill
Copy link
Author

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.

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

No branches or pull requests

1 participant