{"id":330,"date":"2010-03-10T22:47:58","date_gmt":"2010-03-11T06:47:58","guid":{"rendered":"http:\/\/www.outflux.net\/blog\/?p=330"},"modified":"2010-03-10T22:49:00","modified_gmt":"2010-03-11T06:49:00","slug":"openssl-client-does-not-check-commonname","status":"publish","type":"post","link":"https:\/\/outflux.net\/blog\/archives\/2010\/03\/10\/openssl-client-does-not-check-commonname\/","title":{"rendered":"openssl client does not check commonName"},"content":{"rendered":"<p>I realize the <code>openssl s_client<\/code> tool tries to be upper-layer protocol agnostic, but doesn&#8217;t everything that uses SSL do commonName checking (HTTP, SMTP, IMAP, FTP, POP, XMPP)?  Shouldn&#8217;t this be something <code>openssl s_client<\/code> does by default, maybe with an option to turn it off for less common situations?<\/p>\n<p>Here it doesn&#8217;t complain about connecting to &#8220;outflux.net&#8221; when the cert has a CN for &#8220;www.outflux.net&#8221;:<\/p>\n<pre class=\"brush:shell\">echo QUIT | openssl s_client -CApath \/etc\/ssl\/certs \\\r\n  -connect outflux.net:443 2>\/dev\/null | egrep \"subject=|Verify\"\r\n<\/pre>\n<pre class=\"brush:text\">\r\nsubject=\/CN=www.outflux.net\r\n    Verify return code: 0 (ok)\r\n<\/pre>\n<p style='text-align:left'>&copy; 2010, <a href=\"https:\/\/outflux.net\/blog\/\">Kees Cook<\/a>. This work is licensed under a <a rel=\"license\" href=\"http:\/\/creativecommons.org\/licenses\/by-sa\/4.0\/\">Creative Commons Attribution-ShareAlike 4.0 License<\/a>.<br \/><a rel=\"license\" href=\"http:\/\/creativecommons.org\/licenses\/by-sa\/4.0\/\"><img decoding=\"async\" alt=\"CC BY-SA 4.0\" style=\"border-width:0\" src=\"https:\/\/i.creativecommons.org\/l\/by-sa\/4.0\/88x31.png\" \/><\/a> <\/p>\n","protected":false},"excerpt":{"rendered":"<p>I realize the openssl s_client tool tries to be upper-layer protocol agnostic, but doesn&#8217;t everything that uses SSL do commonName checking (HTTP, SMTP, IMAP, FTP, POP, XMPP)? Shouldn&#8217;t this be something openssl s_client does by default, maybe with an option to turn it off for less common situations? Here it doesn&#8217;t complain about connecting to [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,18,6,14,19],"tags":[],"_links":{"self":[{"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/posts\/330"}],"collection":[{"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/comments?post=330"}],"version-history":[{"count":5,"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/posts\/330\/revisions"}],"predecessor-version":[{"id":335,"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/posts\/330\/revisions\/335"}],"wp:attachment":[{"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/media?parent=330"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/categories?post=330"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/tags?post=330"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}