Skip to content

Accept a CA certificate, and client certificates for mTLS - #2

Merged
sujal-maheshwari2004 merged 1 commit into
mainfrom
feat/tls-ca-and-mtls
Aug 23, 2026
Merged

sujal-maheshwari2004 merged 1 commit into
mainfrom
feat/tls-ca-and-mtls

Conversation

@sujal-maheshwari2004

Copy link
Copy Markdown
Contributor

tls: true called createSsl() with no arguments, so this client could only reach a server whose certificate chains to a public root. A self-hosted Priompt is normally fronted by a private CA — which is exactly what the Go CLI's -ca-cert and the Python client's ca_cert exist for. This client had no equivalent, so TLS deployments were unreachable from Node entirely.

Adds caCert, plus clientCert/clientKey for a server started with -client-ca. All three are file paths; cert and key must be given together, checked up front.

Verified against real TLS and mTLS servers: connects with the CA, refused without it, connects with a valid client cert, refused both without one and with one signed by a different CA.

`tls: true` called createSsl() with no arguments, so the client could only reach
a server whose certificate chains to a public root. A self-hosted Priompt is
normally fronted by a private CA — which is exactly what the Go CLI's -ca-cert
and the Python client's ca_cert exist for. This client had no equivalent, so TLS
deployments were unreachable from Node entirely.

Adds caCert, and clientCert/clientKey for a server started with -client-ca,
which refuses connections lacking a certificate signed by that CA before
authentication runs. All three are file paths; the cert and key must be given
together, and that is checked up front rather than surfacing later as an opaque
handshake failure.

Verified against real TLS and mTLS servers: connects with the CA, is refused
without it, connects with a valid client certificate, and is refused both
without one and with one signed by a different CA.
@sujal-maheshwari2004
sujal-maheshwari2004 merged commit 35dfe31 into main Aug 23, 2026
1 check passed
@sujal-maheshwari2004
sujal-maheshwari2004 deleted the feat/tls-ca-and-mtls branch August 23, 2026 20:24
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

Successfully merging this pull request may close these issues.

1 participant