Skip to main content
ConnectionOptions - node__tls.d.ts - Node documentation
interface ConnectionOptions

Usage in Deno

```typescript import { type ConnectionOptions } from "node:node__tls.d.ts"; ```

Properties

optional
host: string | undefined
optional
port: number | undefined
optional
path: string | undefined
optional
socket: stream.Duplex | undefined
optional
servername: string | undefined
optional
session: Buffer | undefined
optional
minDHSize: number | undefined
optional
lookup: net.LookupFunction | undefined
optional
timeout: number | undefined

Methods

optional
pskCallback(hint: string | null): PSKCallbackNegotation | null
When negotiating TLS-PSK (pre-shared keys), this function is called with optional identity `hint` provided by the server or `null` in case of TLS 1.3 where `hint` was removed. It will be necessary to provide a custom `tls.checkServerIdentity()` for the connection as the default one will try to check hostname/IP of the server against the certificate but that's not applicable for PSK because there won't be a certificate present. More information can be found in the RFC 4279.