npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@cappern/node-red-tls-cert-info

v1.1.3

Published

A Node-RED node that retrieves SSL/TLS certificate information from a given host and port.

Downloads

8

Readme

node-red-tls-cert-info

A Node-RED node that retrieves SSL/TLS certificate information from a given host and port.

Installation

To install this node, run the following command in your Node-RED user directory:

npm install @cappern/node-red-tls-cert-info

Usage

The tls-cert-info node retrieves the SSL/TLS certificate information from the given host and port. The certificate details are returned in the payload object of the message.

Inputs

| Property | Type | Required | Description | | -------- | ------- | -------- | ----------------------------------------------- | | host | string | yes | Hostname to connect to. | | port | integer | no | Port number to connect to (default is 443). | | payload | string | yes | The payload of the message to publish. |

Outputs

| Property | Type | Description | | -------- | ------ | ------------------------------------------- | | payload | object | Object containing the certificate details. |

The payload object has the following properties:

| Property | Type | Description | | ------------- | ------- | -------------------------------------------------------------------------------- | | subject | object | Object containing the details of the subject of the certificate. | | keysize | integer | The size of the key used in the certificate. | | serialnumber | string | The serial number of the certificate. | | validFrom | string | The date and time when the certificate becomes valid. | | validTo | string | The date and time when the certificate expires. | | san | string | A list of Subject Alternative Names (SANs) present in the certificate. | | pem | string | The PEM-formatted certificate. |

The hostname and port values can be configured in the node's configuration or set by msg.host and msg.port, respectively.

Example Flow

Here is an example flow that retrieves the SSL/TLS certificate information from www.ferrari.com and outputs it to the debug console:

Example screenshot

[{"id":"d9458ee26e50ecd5","type":"inject","z":"d2e014450d0e3a4b","name":"Start","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":150,"y":220,"wires":[["50d9be476b07daeb"]]},{"id":"3023f57f560d34c4","type":"debug","z":"d2e014450d0e3a4b","name":"Output SSL-CERT","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":830,"y":220,"wires":[]},{"id":"50d9be476b07daeb","type":"change","z":"d2e014450d0e3a4b","name":"","rules":[{"t":"set","p":"host","pt":"msg","to":"www.ferrari.com","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":370,"y":220,"wires":[["481470c97bd45b0d"]]},{"id":"5590eabc990e75f9","type":"comment","z":"d2e014450d0e3a4b","name":"Set Params","info":"","x":370,"y":160,"wires":[]},{"id":"a2090b54dbf45c3e","type":"comment","z":"d2e014450d0e3a4b","name":"Get Certificate","info":"","x":590,"y":160,"wires":[]},{"id":"22f6d42603cf75ed","type":"comment","z":"d2e014450d0e3a4b","name":"Output Result","info":"","x":810,"y":160,"wires":[]},{"id":"481470c97bd45b0d","type":"tls-cert-info","z":"d2e014450d0e3a4b","name":"","x":590,"y":220,"wires":[["3023f57f560d34c4"]]}]

References

License

This project is licensed under the MIT License - see the LICENSE file for details.