Options
All
  • Public
  • Public/Protected
  • All
Menu

Class KeychainAgent

HTTPS Agent that supports certificates stored in the macOS Keychain or Windows Certificate Store, including non-exportable private keys (e.g. Windows CNG, macOS Secure Enclave).

On macOS, if the private key is exportable it is used directly by Node's TLS stack. Otherwise (and always on Windows), TLS is handled by native OS APIs via a Rust helper.

Hierarchy

  • any
    • KeychainAgent

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

  • new KeychainAgent(certAccount: string, options?: AgentOptions): KeychainAgent

Properties

Private certAccount

certAccount: string

The account/label name for the identity in the keychain

Accessors

Private keyring

  • get keyring(): any

Methods

Private buildPipeSocket

  • buildPipeSocket(options: AgentOptions): Promise<Socket>
  • Non-exportable key path (Windows / macOS Secure Enclave): TLS is handled by a Rust helper that uses OS APIs (Schannel / Secure Transport) and proxies plaintext over a local TCP socket, which is returned as a duck-typed TLS socket to Node's HTTP layer.

    Parameters

    • options: AgentOptions

    Returns Promise<Socket>

connect

  • connect(_req: ClientRequest, options: AgentOptions): Promise<Socket>

Generated using TypeDoc