The hostname to connect to.
Optional parameters to configure the connection.
import { getCertificate } from 'sslko';
const cert = await getCertificate('example.com');
console.log(cert);
import { getCertificate } from 'sslko';
const cert = await getCertificate('example.com', { rejectUnauthorized: true });
console.log(cert);
import { getCertificate } from 'sslko';
const cert = await getCertificate('example.com', { port: 8443 });
console.log(cert);
Fetches the SSL/TLS certificate from a given host and port.