0
wget https://skype.com -O - > /dev/null 

isn't good. I just want to create a short bash script to check that an HTTPS cert is valid or no. i think wget doesn't connects if the cert is invalid. i just need a parameter? to wget to only work on HTTPS! are there any?

2
  • 1
    What do you actually want? Check if a certificate is valid, or force wget to connect only if a certificate is valid? Commented Jun 16, 2011 at 8:35
  • What do you see as a valid cert? Commented Jun 16, 2011 at 8:36

2 Answers 2

2

For your purpose, just call wget. It will retrieve the certificate and refuse to connect if the certificate is invalid.

Obviously, if you pass an https:// URL, wget will connect using HTTPS.

3
  • pastebin.com/raw.php?i=aE2SDXsF Commented Jun 16, 2011 at 9:45
  • @LanceBaynes: I don't see any connection between this, your question and my answer. Commented Jun 16, 2011 at 9:54
  • y, i see now :) ok, then it's ok. Commented Jun 16, 2011 at 10:07
0

To answer your question in the title: Pass --https-only to force wget to follow https links exclusively. This can be useful for sites that silently downgrade connections to insecure ones.

1
  • 1
    The wget manual says about --https-only: "When in recursive mode, only HTTPS links are followed." This sounds like this argument is ignored when retrieving a single file. Commented May 8, 2020 at 3:46

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.