TLS Info
AI-generatedOverview
This node retrieves TLS (Transport Layer Security) certificate and protocol information from a specified host and port. It is useful for scenarios where you need to verify the security details of a server's TLS connection, such as checking certificate validity, protocol version, and authorization status. For example, it can be used to monitor the TLS certificates of web servers to ensure they are valid and not expired.
Use Case Examples
- Checking the TLS certificate details of www.google.com on port 443.
- Verifying the TLS protocol version and certificate validity of a custom API endpoint.
Properties
| Name | Meaning |
|---|---|
| Host | The host name to connect to for retrieving TLS information. |
| Port | The port number to connect to on the host. |
| Options.includeVerboseDetails | Whether to include the full certificate object in the output for detailed inspection. |
| Options.rejectUnauthorized | Whether to reject connections with unauthorized certificates, such as self-signed certificates. |
| Options.servername | Host name for Server Name Indication (SNI). If empty, the Host value will be used. |
| Options.timeout | Connection timeout in milliseconds before aborting the TLS connection attempt. |
Output
JSON
protocol- The TLS protocol version used in the connection.authorized- Boolean indicating if the certificate is authorized.authorizationError- Error message if the certificate is not authorized.cert- The full certificate object if verbose details are included.subject- The subject Common Name (CN) of the certificate.issuer- The issuer Common Name (CN) of the certificate.valid_from- The start date of the certificate validity period.valid_to- The end date of the certificate validity period.daysRemaining- Number of days remaining until the certificate expires.
Dependencies
- Node.js 'tls' module for establishing TLS connections.
Troubleshooting
- Connection timeout errors if the host or port is unreachable or slow to respond. Increase the timeout option to resolve.
- Errors related to unauthorized certificates if 'Reject Unauthorized' is set to true and the server uses a self-signed or invalid certificate.
- General network errors if the host is incorrect or network is down.
Links
- Node.js TLS Module - Official documentation for the Node.js TLS module used to establish secure connections.