{"id":176,"date":"2015-01-03T22:52:26","date_gmt":"2015-01-03T22:52:26","guid":{"rendered":"http:\/\/adriangrigoras.com\/blog\/?p=176"},"modified":"2015-01-03T22:52:26","modified_gmt":"2015-01-03T22:52:26","slug":"test-openssl-ciphers","status":"publish","type":"post","link":"https:\/\/adriangrigoras.com\/blog\/test-openssl-ciphers\/","title":{"rendered":"Test OpenSSL ciphers"},"content":{"rendered":"<p>#!\/usr\/bin\/env bash<\/p>\n<p># OpenSSL requires the port number.<br \/>\nSERVER=192.168.1.11:443<br \/>\nDELAY=1<br \/>\nciphers=$(openssl ciphers \u2018ALL:eNULL\u2019 | sed -e \u2018s\/:\/ \/g\u2019)<\/p>\n<p>echo Obtaining cipher list from $(openssl version).<\/p>\n<p>for cipher in ${ciphers[@]}<br \/>\ndo<br \/>\necho -n Testing $cipher\u2026<br \/>\nresult=$(echo -n | openssl s_client -cipher \u201c$cipher\u201d -connect $SERVER 2&gt;&amp;1)<br \/>\nif [[ \u201c$result\u201d =~ \u201cCipher is \u201d ]] ; then<br \/>\necho YES<br \/>\nelse<br \/>\nif [[ \u201c$result\u201d =~ \u201c:error:\u201d ]] ; then<br \/>\nerror=$(echo -n $result | cut -d&#8217;:\u2019 -f6)<br \/>\necho NO \\($error\\)<br \/>\nelse<br \/>\necho UNKNOWN RESPONSE<br \/>\necho $result<br \/>\nfi<br \/>\nfi<br \/>\nsleep $DELAY<br \/>\ndone<\/p>\n","protected":false},"excerpt":{"rendered":"<p>#!\/usr\/bin\/env bash # OpenSSL requires the port number. SERVER=192.168.1.11:443 DELAY=1 ciphers=$(openssl ciphers \u2018ALL:eNULL\u2019 | sed -e \u2018s\/:\/ \/g\u2019) echo Obtaining cipher list from $(openssl version). for cipher in ${ciphers[@]} do echo -n Testing $cipher\u2026 result=$(echo -n | openssl s_client -cipher \u201c$cipher\u201d -connect $SERVER 2&gt;&amp;1) if [[ \u201c$result\u201d =~ \u201cCipher is \u201d ]] ; then echo\u2026 <span class=\"read-more\"><a href=\"https:\/\/adriangrigoras.com\/blog\/test-openssl-ciphers\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-176","post","type-post","status-publish","format-standard","hentry","category-bash"],"_links":{"self":[{"href":"https:\/\/adriangrigoras.com\/blog\/wp-json\/wp\/v2\/posts\/176","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/adriangrigoras.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/adriangrigoras.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/adriangrigoras.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/adriangrigoras.com\/blog\/wp-json\/wp\/v2\/comments?post=176"}],"version-history":[{"count":1,"href":"https:\/\/adriangrigoras.com\/blog\/wp-json\/wp\/v2\/posts\/176\/revisions"}],"predecessor-version":[{"id":177,"href":"https:\/\/adriangrigoras.com\/blog\/wp-json\/wp\/v2\/posts\/176\/revisions\/177"}],"wp:attachment":[{"href":"https:\/\/adriangrigoras.com\/blog\/wp-json\/wp\/v2\/media?parent=176"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/adriangrigoras.com\/blog\/wp-json\/wp\/v2\/categories?post=176"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/adriangrigoras.com\/blog\/wp-json\/wp\/v2\/tags?post=176"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}