# Interface CommonConnectionOptions

interface CommonConnectionOptions {
ALPNProtocols?: Uint8Array | string[] | Uint8Array[];
SNICallback?: ((servername, cb) => void);
enableTrace?: boolean;
rejectUnauthorized?: boolean;
requestCert?: boolean;
secureContext?: SecureContext;
}

#### Hierarchy (view full)

- CommonConnectionOptions
  - TlsOptions
  - TLSSocketOptions

- Defined in node_modules/@types/node/tls.d.ts:505

#####
Index

### Properties

ALPNProtocols?
SNICallback?
enableTrace?
rejectUnauthorized?
requestCert?
secureContext?

## Properties

### `Optional` ALPNProtocols

ALPNProtocols?: Uint8Array | string[] | Uint8Array[]

An array of strings or a Buffer naming possible ALPN protocols. (Protocols should be ordered by their priority.)

- Defined in node_modules/@types/node/tls.d.ts:526

### `Optional` SNICallback

SNICallback?: ((servername, cb) => void)

SNICallback(servername, cb) <Function> A function that will be called if the client supports SNI TLS extension. Two arguments will be passed when called: servername and cb. SNICallback should invoke cb(null, ctx), where ctx is a SecureContext instance. (tls.createSecureContext(...) can be used to get a proper SecureContext.) If SNICallback wasn't provided the default callback with high-level API will be used (see below).

#### Type declaration

- - (servername, cb): void

  - #### Parameters

    - servername: string
    - cb: ((err, ctx?) => void)
      - - (err, ctx?): void

        - #### Parameters

          - err: null | Error
          - `Optional` ctx: SecureContext

          #### Returns void

- Defined in node_modules/@types/node/tls.d.ts:536

### `Optional` enableTrace

enableTrace?: boolean

When enabled, TLS packet trace information is written to `stderr`. This can be used to debug TLS connection problems.

#### Default

    false

- Defined in node_modules/@types/node/tls.d.ts:515

### `Optional` rejectUnauthorized

rejectUnauthorized?: boolean

If true the server will reject any connection which is not authorized with the list of supplied CAs. This option only has an effect if requestCert is true.

#### Default

    true

- Defined in node_modules/@types/node/tls.d.ts:543

### `Optional` requestCert

requestCert?: boolean

If true the server will request a certificate from clients that connect and attempt to verify that certificate. Defaults to false.

- Defined in node_modules/@types/node/tls.d.ts:521

### `Optional` secureContext

secureContext?: SecureContext

An optional TLS context object from tls.createSecureContext()

- Defined in node_modules/@types/node/tls.d.ts:509