Previous solutions that you need to find inside the result file / output of the "Key Usage" line. I got the following solution, which brings exactly the string to the X509 certificate to use the key.
openssl s_client -showcerts -connect SERVER_HERE:443 </dev/null 2>/dev/null|openssl x509 -text |grep v "$(grep -E -A1 "Key Usage")"
The above command receives a certificate, parses the text and finds the "Key Usage" line and presents the next result line, which represents the value for this particular field on the X509.
// Greetings
Rafael gorski
source share