{"id":3911,"date":"2014-03-30T06:20:55","date_gmt":"2014-03-30T06:20:55","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/google-tv-pairing-protocol-ssl-handshake-error-with-go-golang-collection-of-common-programming-errors\/"},"modified":"2014-03-30T06:20:55","modified_gmt":"2014-03-30T06:20:55","slug":"google-tv-pairing-protocol-ssl-handshake-error-with-go-golang-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/google-tv-pairing-protocol-ssl-handshake-error-with-go-golang-collection-of-common-programming-errors\/","title":{"rendered":"Google TV Pairing Protocol &mdash; SSL Handshake Error with Go (golang)-Collection of common programming errors"},"content":{"rendered":"<p>I&#8217;m writing a Go package for the Google TV Pairing Protocol. But I seem to be hitting a problem with the TLS handshake.<\/p>\n<pre><code>sock, err := tls.Dial(\"tcp\", \"10.8.0.1:9552\", &amp;tls.Config{InsecureSkipVerify: true})\n<\/code><\/pre>\n<p>That line gives me a handshake error. The exact error message is: <code>remote error: handshake failure<\/code>. If I try the same host\/port via curl, it gives <code>curl: (35) error:14094410:SSL routines:SSL3_READ_BYTES:sslv3<\/code> alert handshake failure as well.<\/p>\n<p>Any ideas? Is the Google TV expecting a client cert maybe? I haven&#8217;t seen any references to the need for a client cert anywhere.<\/p>\n<p>If anyone wants to help figure it out, here&#8217;s the code: https:\/\/github.com\/dustywilson\/go-polo<\/p>\n<p>The README file has the easy code to check it out. You will have to know the IP address for your Google TV box since this doesn&#8217;t use mDNS. If you (someone, anyone) run this and you get different results, let me know.<\/p>\n<p>I&#8217;ve already gone through the Google TV Remote code at google-tv-remote. A more useful one is google-tv-pairing-protocol which is the equivalent Java\/Android project to what I&#8217;m doing. Of course I&#8217;ve already poured over that code. I think it&#8217;s a problem either with Go itself (unlikely), a problem with the Go TLS package not knowing how to read the Google TV&#8217;s certificate (I know it was a problem a year ago), or a problem with my code (typically would be most likely, but I&#8217;m just not seeing it).<\/p>\n<p>By the way, I&#8217;m testing this on a Logitech Revue and it has a self-signed SSL certificate. It&#8217;s not rooted or modified in any way.<\/p>\n<p>My resulting code will be open source, of course. Thanks for the assistance.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m writing a Go package for the Google TV Pairing Protocol. But I seem to be hitting a problem with the TLS handshake. sock, err := tls.Dial(&#8220;tcp&#8221;, &#8220;10.8.0.1:9552&#8221;, &amp;tls.Config{InsecureSkipVerify: true}) That line gives me a handshake error. The exact error message is: remote error: handshake failure. If I try the same host\/port via curl, it [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3911","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3911","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=3911"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3911\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=3911"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=3911"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=3911"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}