> From: owner-openssl-us...@openssl.org On Behalf Of Lewis Rosenthal
> Sent: Wednesday, October 08, 2014 10:57

> Actually, Jakob, I think it's the second one (the first one after the
> pipe) which can come out, i.e.:
> 
Yes.

> openssl s_client -showcerts -connect google.com:443 < \
> /dev/null | openssl x509 -noout -text | grep -A1 "X509v3 Extended Key
> Usage"
> 
> which seems to produce a little less noise, but it's still not down to a
> single line of output. Still, it's more elegant than what I cited, I think.
> 
The remaining noise is a few lines s_client writes to stderr.
Add 2>/dev/null, or 2>&1 and let the next stage discard it.
(I prefer the latter because it's the same Unix/Windows;
one less on the list of adjustments I must remember.)

Also the -showcerts is useless and misleading. x509 -noout -text 
only decodes and displays the *first* cert in the s_client output,
so including and then ignoring the CA certs is just wasted.


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to