@nebius/js-sdk - v0.2.54
    Preparing search index...

    Function normalizeRootCAs

    • Loads user-supplied root certificates.

      A Buffer contains the certificate data. A string contains a PEM file path. An array contains PEM file paths in concatenation order. The function returns the same Buffer instance when the input is a buffer.

      Missing, empty, and unreadable files are ignored. If no path produces data, the function returns undefined; it does not throw.

      Parameters

      • Optionalinput: string | string[] | Buffer<ArrayBufferLike>

      Returns Buffer<ArrayBufferLike> | undefined

      import { Buffer } from 'node:buffer';
      import { normalizeRootCAs } from '@nebius/js-sdk/runtime/tls/system_certs';

      const pem = Buffer.from('application-provided PEM data');
      const roots = normalizeRootCAs(pem);
      roots === pem; // true