Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Shorten the timeout for openssl s_client?

15,674 views
Skip to first unread message

Todd Thatcher

unread,
Mar 11, 2010, 6:32:01 PM3/11/10
to

All,

   Using the command  “openssl s_client –connect gmail.google.com:443”  openssl gets the certificate information and stays connected until I enter QUIT, or the timeout is hit -- about 2 minutes later.   I want to script  certificate expiration date checks for out servers. Is there a command-line switch or some other advice that I can use to change this behavior?  

 

Thanks in advance

                Todd

David Schwartz

unread,
Mar 12, 2010, 12:48:11 PM3/12/10
to
Todd Thatcher wrote:

Two ideas:

1) echo "QUIT" | openssl s_client -connect gmail.google.com:443

2) openssl s_client -connect gmail.google.com:443 < /dev/null

DS

______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openss...@openssl.org
Automated List Manager majo...@openssl.org

tjhu...@gmail.com

unread,
Sep 7, 2016, 11:05:58 AM9/7/16
to
I know this is many years late but it comes up in google searches so I thought I would just leave this

You can use the timeout command for timing out any command.

```
timeout 3 openssl s_client -connect gmail.google.com:443 < /dev/null
```

Steve W

unread,
Nov 23, 2022, 5:47:36 AM11/23/22
to
On Wednesday, 7 September 2016 at 17:05:58 UTC+2, tjhu...@gmail.com wrote:
> I know this is many years late but it comes up in google searches so I thought I would just leave this
---8<---

Let's keep it alive :)

The following is a useful approach to target multiple domains, with timeouts, keeping errors/noise suppressed and seeking a specific attribute (the certificates' Subject in this case - adapt as required):

$ I="www.google.ca www.google.fr www.google.de www.NoSuchDomain.zzz www.google.at www.google.se www.google.es"

$ for i in $I ; do R=`(timeout 5 openssl s_client -connect ${i}:443 </dev/null 2>/dev/null) | grep "subject="` ; echo "$i:$R" ; done
www.google.ca:subject=CN = *.google.ca
www.google.fr:subject=CN = *.google.fr
www.google.de:subject=CN = www.google.de
www.NoSuchDomain.zzz:
www.google.at:subject=CN = *.google.at
www.google.se:subject=CN = *.google.se
www.google.es:subject=CN = *.google.es

Robert Rodriguez

unread,
Mar 8, 2023, 2:55:24 PM3/8/23
to
Trust us to take care of your property and generate passive income for you.
https://alba.homes/find-the-properties

Jose Porter

unread,
May 31, 2023, 11:42:47 AM5/31/23
to
We are a leading national supplier of point of sale (POS) systems, credit card processing equipment and a full range of merchant services. https://www.cashdiscount360.com/

Michale Z

unread,
Jun 8, 2023, 6:29:55 AM6/8/23
to
On Wednesday, 31 May 2023 at 08:42:47 UTC-7, Jose Porter wrote:
> We are a leading national supplier of point of sale (POS) systems, credit card processing equipment and a full range of merchant services. https://www.cashdiscount360.com/
A rugged tablet, also known as a ruggedized tablet, is a specialized type of tablet computer that is designed to withstand harsh environments and demanding conditions. Unlike consumer-grade tablets, which are typically built for everyday use, rugged tablets are built to be more durable, rugged, and resistant to elements such as dust, water, extreme temperatures, and impacts.https://munbynscan.com/munbyn-irt05-windows-rugged-tablet-pc/
Message has been deleted
Message has been deleted
Message has been deleted

scent stories

unread,
Sep 20, 2023, 1:48:49 PM9/20/23
to
Royal Online originated from the website, being the pioneer in online casinos played through computers. Subsequently, as the cost of mobile devices and internet access decreased, everyone acquired their own mobile phones.

visit us at: https://www.gclubcenter.com/royalonlinev2
Message has been deleted
0 new messages