@whatwg-node/node-fetch
Version:
Fetch API implementation for Node
17 lines (16 loc) • 794 B
text/typescript
import { type PeerCertificate } from 'node:tls';
/**
* Canonicalize an IP for equality checks (`::1` vs `0:0:0:0:0:0:0:1`).
*/
export declare function normalizeIpAddress(ip: string): string;
/**
* Detect Node.js IPv6 IP-SAN regression in `tls.checkServerIdentity`
* (https://github.com/nodejs/node/issues/64032). Probes once, on first use.
*/
export declare function needsIpv6SanWorkaround(): boolean;
/**
* Custom verifier that correctly matches IPv6 literals against `IP Address` SANs.
*/
export declare function checkServerIdentityIpv6San(hostname: string, cert: PeerCertificate): Error | undefined;
/** Lazy: only set when the first https request probes an affected Node build. */
export declare function getHttpsCheckServerIdentity(): typeof checkServerIdentityIpv6San | undefined;