shibd opened a new pull request, #301: URL: https://github.com/apache/pulsar-client-node/pull/301
Master Issue: #281 ### Motivation After 1.8.0, we helped users precompile CPP, resulting in users not being able to obtain system certificates when using TLS-related functions. Current usage issues list reference: https://github.com/BewareMyPower/pulsar-tls-examples Node.js provides [bundled Mozilla CA](https://nodejs.org/api/tls.html#tlsrootcertificates), which we can use by default. ### Modifications - Use Node.js bundled Mozilla CA when `tlsTrustCertsFilePath` is empty. - Since the CPP client can't set cert content direct, we first need to write the certificate content to a file and pass in the path to the CPP client. ### Verifying this change You can clone the [repository](https://github.com/shibd/pulsar-client-tls-test) installation and verify: ``` git clone [email protected]:shibd/pulsar-client-tls-test.git npm install node tls-oauth2.js node tls-token.js ``` The environment I currently verified through is: - Windows x64 - MacOS arm64 - Ubuntu 20.04.5 ### Documentation <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. --> - [ ] `doc-required` (Your PR needs to update docs and you will update later) - [x] `doc-not-needed` (Please explain why) - [ ] `doc` (Your PR contains doc changes) - [ ] `doc-complete` (Docs have been already added) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
