Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.
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?

share|improve this question
1  
What do you actually want? Check if a certificate is valid, or force wget to connect only if a certificate is valid? –  Lekensteyn Jun 16 '11 at 8:35
    
What do you see as a valid cert? –  echox Jun 16 '11 at 8:36
add comment

1 Answer 1

up vote 2 down vote accepted

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.

share|improve this answer
    
pastebin.com/raw.php?i=aE2SDXsF –  LanceBaynes Jun 16 '11 at 9:45
    
@LanceBaynes: I don't see any connection between this, your question and my answer. –  Gilles Jun 16 '11 at 9:54
    
y, i see now :) ok, then it's ok. –  LanceBaynes Jun 16 '11 at 10:07
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.