<div dir="ltr"><div>Hi All.<br><br></div>I am using the following script at myu laptop, to test for the available cipher-suites :<br><br>####################################################<br>#!/usr/bin/env bash<br><br># OpenSSL requires the port number.<br>SERVER=<a href="http://server.ip.com:12345">server.ip.com:12345</a><br>DELAY=1<br>ciphers=$(openssl ciphers 'ALL:eNULL' | sed -e 's/:/ /g')<br><br>echo Obtaining cipher list from $(openssl version).<br><br>for cipher in ${ciphers[@]}<br>do<br># echo -n Testing $cipher...<br>result=$(echo -n | openssl s_client -cipher "$cipher" -connect $SERVER 2>&1)<br>if [[ "$result" =~ ":error:" ]] ; then<br>    true<br>else<br>  if [[ "$result" =~ "Cipher is ${cipher}" || "$result" =~ "Cipher    :" ]] ; then<br>    echo ${cipher}<br>  else<br>      true<br>  fi<br>fi<br>sleep $DELAY<br>done<br>####################################################<br clear="all"><div><div><br><br></div><div>Above script works, and I am able to get the supported-ciphers-listing.<br></div><div>But all those ciphers are in stringified-form.<br><br><br></div><div>Is there a way, so that I can get the supported-ciphers in their corrsponding numeric-values form?<br></div><div>I ask this, because a particular device supports only a restricted set of ciphers, and I am not able to properly match the cipher-suites using their stringified-forms.<br><br><br></div><div>Looking forward to some help from the experts :)<br><br><br></div><div><br></div><div><div class="gmail_signature">Thanks and Regards,<br>Ajay<br></div>
</div></div></div>