Fetch TLS (HTTPS)¶
Fetch the TLS certificate chain exposed on remote endpoint using cert-monitor fetch tls --url [URL]
.
Usage¶
cert-monitor fetch tls
Error: required flag(s) "url" not set
Usage:
cert-monitor fetch tls [flags]
Examples:
cert-monitor fetch tls --url https://google.com
Flags:
-h, --help help for tls
--sni string TLS Server Name Identifier
-u, --url string remote TLS endpoint
Global Flags:
-d, --debug debug mode enabled
-i, --index int Index from certificate list (default -1)
--no-color Disable color output
--no-text Don't display test (only PEM)
--skew int Days to check for expiration (default 90)
--skip-tls-validation Skip TLS certificate validation
required flag(s) "url" not set
--sni string
¶
Optionally, you can specify a Server Name Indicator using --sni string
:
Example:
-
default
cert-monitor fetch tls --url https://idp.iamfas.belgium.be/ --index 0
2022-01-16T16:04:31.915+0100 [INFO] cert-monitor: X509 Certificate: index=0 Subject="CN=idp.iamfas.belgium.be,O=Federale Overheidsdienst Beleid en Ondersteuning,L=BRUSSEL,C=BE" 2022-01-16T16:04:31.915+0100 [INFO] cert-monitor: X509 Certificate: index=0 Issuer="CN=GEANT OV RSA CA 4,O=GEANT Vereniging,C=NL" 2022-01-16T16:04:31.915+0100 [INFO] cert-monitor: X509 Certificate: index=0 NotBefore="2021-09-17 00:00:00 +0000 UTC" 2022-01-16T16:04:31.915+0100 [INFO] cert-monitor: X509 Certificate: index=0 NotAfter="2022-09-17 23:59:59 +0000 UTC" 2022-01-16T16:04:31.915+0100 [INFO] cert-monitor: X509 Certificate: index=0 -----BEGIN CERTIFICATE----- MIIHcjCCBVqgAwIBAgIRANtvSR/N24RkUXflQCUxPKkwDQYJKoZIhvcNAQEMBQAw RDELMAkGA1UEBhMCTkwxGTAXBgNVBAoTEEdFQU5UIFZlcmVuaWdpbmcxGjAYBgNV BAMTEUdFQU5UIE9WIFJTQSBDQSA0MB4XDTIxMDkxNzAwMDAwMFoXDTIyMDkxNzIz NTk1OVowejELMAkGA1UEBhMCQkUxEDAOBgNVBAcTB0JSVVNTRUwxOTA3BgNVBAoT MEZlZGVyY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RF+Josd1Kc5yrcOHQ03vNVG3gYo5/Tt9k 53ofP84lmC9q6lXcxfx+55tUqJwpF/wZINbXngjxxCGk57J6b9SvXtzjC2K6cRlM Whz8mvWXyplKJu+raza9l+J6xQ0Y1ni+KqcklQ0qpHJTVM2hXqw= -----END CERTIFICATE-----
-
Specifying
--sni "*.iamfas.belgium.be"
cert-monitor fetch tls --url https://idp.iamfas.belgium.be/ --index 0 --sni "*.iamfas.belgium.be"
2022-01-16T16:04:41.997+0100 [INFO] cert-monitor: X509 Certificate: index=0 Subject="CN=*.iamfas.belgium.be,O=Federale Overheidsdienst Beleid en Ondersteuning,L=BRUSSEL,C=BE" 2022-01-16T16:04:41.997+0100 [INFO] cert-monitor: X509 Certificate: index=0 Issuer="CN=GEANT OV RSA CA 4,O=GEANT Vereniging,C=NL" 2022-01-16T16:04:41.997+0100 [INFO] cert-monitor: X509 Certificate: index=0 NotBefore="2021-04-26 00:00:00 +0000 UTC" 2022-01-16T16:04:41.997+0100 [INFO] cert-monitor: X509 Certificate: index=0 NotAfter="2022-04-26 23:59:59 +0000 UTC" 2022-01-16T16:04:41.997+0100 [INFO] cert-monitor: X509 Certificate: index=0 -----BEGIN CERTIFICATE----- MIIHgDCCBWigAwIBAgIQA1GD0+6qSr600cFp68H79zANBgkqhkiG9w0BAQwFADBE MQswCQYDVQQGEwJOTDEZMBcGA1UEChMQR0VBTlQgVmVyZW5pZ2luZzEaMBgGA1UE AxMRR0VBTlQgT1YgUlNBIENBIDQwHhcNMjEwNDI2MDAwMDAwWhcNMjIwNDI2MjM1 OTU5WjB4MQswCQYDVQQGEwJCRTEQMA4GA1UEBxMHQlJVU1NFTDE5MDcGA1UEChMw RmVkZXJhbGUgT3ZlcmhlaWRzZGllbnN0IEJlbGVpZCBlbiBPbmRlcnN0ZXVuaW5n MRwwGgYDVQQDDBMqLmlhbWZhcy5iZWxnaXVtLmJlMIIBIjANBgkqhkiG9w0BAQEF AAOCAQ8AMIIBCgKCAQEAripD+Q4cuG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