test-tls

command module
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 5, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

README

test-tls

Overview

test-tls is a small CLI utility to test TLS certificates. It supports local and remote certs.

Downloads

Downloads are available in the releases section.

Usage

Tests TLS Certificates

Usage:
  test-tls [flags]

Flags:
  -h, --help              help for test-tls
  -H, --host string       Remote host to test.
  -l, --loglevel string   Sets the log level (default "INFO")
  -p, --port int          The port to test (default 443)
  -P, --protocol string   The protocol to use for the test (tcp or udp) (default "tcp")

Examples
Successful test
➜  bin test-tls --host www.google.com
INFO[0000] Testing Remote Host                           addr="www.google.com:443" host=www.google.com port=443 proto=tcp
INFO[0000] Connection Established Successfully           cipher_suite=4865 host=www.google.com negotiated_proto= port=443 proto=tcp remote_addr="74.125.136.103:443" version=1.3
INFO[0000] Completed Test Successfully                   elapsed_time=61.454209ms
➜  bin
Unsuccessful test
➜  bin test-tls --host untrusted-root.badssl.com
INFO[0000] Testing Remote Host                           addr="untrusted-root.badssl.com:443" host=untrusted-root.badssl.com port=443 proto=tcp
ERRO[0000] Connection Unsuccessful!                      error="tls: failed to verify certificate: x509: certificate signed by unknown authority" host=untrusted-root.badssl.com port=443 proto=tcp
ERRO[0000] Faulty Cert Info                              cert_num=0 field=Issuer host=untrusted-root.badssl.com port=443 proto=tcp value="CN=BadSSL Untrusted Root Certificate Authority,O=BadSSL,L=San Francisco,ST=California,C=US"
ERRO[0000] Faulty Cert Info                              cert_num=0 field=Expiry host=untrusted-root.badssl.com port=443 proto=tcp value=2025-July-20
ERRO[0000] Faulty Cert Info                              cert_num=0 field=CommonName host=untrusted-root.badssl.com port=443 proto=tcp value="BadSSL Untrusted Root Certificate Authority"
ERRO[0000] Faulty Cert Info                              cert_num=0 field=DNSName host=untrusted-root.badssl.com name_number=0 port=443 proto=tcp value="*.badssl.com"
ERRO[0000] Faulty Cert Info                              cert_num=0 field=DNSName host=untrusted-root.badssl.com name_number=1 port=443 proto=tcp value=badssl.com
ERRO[0000] Faulty Cert Info                              cert_num=1 field=Issuer host=untrusted-root.badssl.com port=443 proto=tcp value="CN=BadSSL Untrusted Root Certificate Authority,O=BadSSL,L=San Francisco,ST=California,C=US"
ERRO[0000] Faulty Cert Info                              cert_num=1 field=Expiry host=untrusted-root.badssl.com port=443 proto=tcp value=2036-July-02
ERRO[0000] Faulty Cert Info                              cert_num=1 field=CommonName host=untrusted-root.badssl.com port=443 proto=tcp value="BadSSL Untrusted Root Certificate Authority"
ERRO[0000] Completed Test With Errors                    elapsed_time=551.54575ms error="tls: failed to verify certificate: x509: certificate signed by unknown authority"
➜  bin

Documentation

Overview

Copyright © 2023 Scott Cudney <scott@cudneys.net>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL