Function downloadCert

  • Get a TLS certificate by hostname. This function will always connect to port 443.

    Parameters

    • hostname: string

      Hostname to connect to (e.g. 'github.com')

    • timeout: number = 6000

      Timeout in milliseconds (default: 6000)

    Returns Promise<Buffer>

    Buffer containing the raw certificate (DER)

    Throws

    AbortError if the request timed out

Generated using TypeDoc