SSLko is a lightweight JavaScript library for retrieving SSL/TLS certificate details, including validity and expiration information.
You can install SSLko using npm, yarn, pnpm, or bun:
npm install sslko
yarn add sslko
pnpm add sslko
bun add sslko
import { getCertificateInfo } from "sslko";
const certInfo = await getCertificateInfo("example.com");
console.log(certInfo);
Will return an CertificateInfo object.
import { getCertificate } from 'sslko';
const cert = await getCertificate('example.com');
There is few options you can pass to the getCertificate
function:
import { getCertificate } from 'sslko';
const cert = await getCertificate('example.com', {
port: 488, // Default is 443
timeout: 10000, // Default is 5000ms => 5 seconds
});
More information about the options can be found in the API documentation.
MIT License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
git checkout -b feature/amazing-feature
)git commit -m 'Add some amazing feature'
)git push origin feature/amazing-feature
)Made with β€οΈ by the Roman OΕΎana