Commit graph

6 commits

Author SHA1 Message Date
Divy
36e9eb2023
fix(ext/node): support JS underlying stream in TLS (#30465)
Some checks are pending
ci / pre-build (push) Waiting to run
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / build libs (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
Fixes https://github.com/denoland/deno/issues/20594

This implements `JSStreamSocket` which drives the TLS underlying stream
in `rustls_tokio_stream` using 2 sets of channels. One for piping the
encrypted protocol transport and the other for plaintext application
data.

This fixes connecting to `npm:mssql`:
```js
import sql from "npm:mssql";

const sqlConfig = {
  server: "localhost",
  user: "divy",
  password: "123",
  database: "master",
  options: {
    trustServerCertificate: true,
  },
};

const pool = await sql.connect(sqlConfig);
const result = await pool.request().query(`SELECT * FROM sys.databases`);
```
2025-08-28 17:56:17 +05:30
Divy
09036f5241
fix(ext/node): handle null keypair in tls connect (#30516)
Some checks are pending
ci / build libs (push) Blocked by required conditions
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / pre-build (push) Waiting to run
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
2025-08-25 17:47:10 +00:00
Divy
b5808041e0
feat: allow disable hostname verification in TLS (#30409)
Fixes https://github.com/denoland/deno/issues/28903
Closes https://github.com/denoland/deno/issues/26190

- Adds a new option `unsafelyDisableHostnameVerification` to
`Deno.connectTls` and `Deno.startTls` to ignore DNS name mismatch errors
from rustls server verifier.
- Disable hostname verification in Node.js TLSSocket if
`checkServerIdentity` is a no-op.

---------

Signed-off-by: Divy Srivastava <dj.srivastava23@gmail.com>
2025-08-23 10:37:57 +05:30
Divy
3a491a509a
fix(ext/node): TLS emit close event on parent socket (#30451)
Fixes https://github.com/denoland/deno/issues/28543
2025-08-19 19:01:23 +05:30
Divy
5c79bc7300
fix(ext/node): mTLS support for node:tls (#30426)
Fixes https://github.com/denoland/deno/issues/28341

- handle `secureContext.key` and `secureContext.cert` in `new
TLSSocket()`
- Fix serialize when `secureContext.ca` is an array

Fixes MQTT connect support:
```
New connection from 127.0.0.1:58119 on port 8883.
1755367370: New client connected from 127.0.0.1:58119 as 637013c2-53c7-4779-9e84-50dcf2f2f81b (p5, c0, k60, u'test-client').
1755367370: No will message specified.
1755367370: Sending CONNACK to 637013c2-53c7-4779-9e84-50dcf2f2f81b (0, 0)
```
2025-08-17 16:32:15 +05:30
Divy
963bc4bd8a
chore: rewrite tls_wrap internals to JS (#30303) 2025-08-05 09:02:45 +00:00
Renamed from ext/node/polyfills/_tls_wrap.ts (Browse further)