"Unsupported key exchange method" downloading pages from github
Chris Angelico <[email protected]>
| Newsgroups | gmane.comp.lang.pike.user |
|---|---|
| Message-ID | <CAPTjJmo_zrw8CnN60hEqVpTX6_jmEfJDJYyTS=mLyjZ8vSvf4g@mail.gmail.com> |
Example code:
void data_available(object q) {exit(0,"Success! File begins:
%O\n",q->data()[..3]);}
void request_ok(object q) {write("Request OK, fetching data...\n");
q->async_fetch(data_available);}
void request_fail(object q) {exit(0,"%% Failed to download, errno = %d
%s\n",q->errno,strerror(q->errno));}
int main()
{
string url="https://github.com/Rosuav/Gypsum/archive/master.zip";
url="https://codeload.github.com/Rosuav/Gypsum/zip/master"; //Pike
7.8 doesn't follow redirects automatically
Protocols.HTTP.do_async_method("GET",url,0,0,Protocols.HTTP.Query()->set_callbacks(request_ok,request_fail));
return -1;
}
This runs just fine on Pike 7.8 (although the canonical URL has to be
manually switched out for its redirection target), but on 8.0 from
trunk, it fails with a noisy exception thrown (usually twice) inside
the backend:
set_cipher_suite: Unsupported key exchange method: 12
lib/modules/SSL.pmod/session.pike:369:
SSL.session()->set_cipher_suite(49199,3,({({2,1}),({2,2}),({2,3})}),512)
lib/modules/SSL.pmod/handshake.pike:1435:
SSL.connection({
})->handle_handshake(2,"\3\3S\210����w.��C�\6~j\211Rʾ\fe#(\216����e\34�\237
\b\237e����i��ܤ�\205*�A�g\203OS\35��\0�I\217�c��/\0\0\t\0\0\0\0�\1\0\1\0",,,0)
lib/modules/SSL.pmod/connection.pike:399: SSL.connection({ })->got_data("")
lib/modules/SSL.pmod/sslfile.pike:1791:
SSL.sslfile(Stdio.File("socket", "192.30.252.144:443", 777 /*
fd=11 */))->ssl_read_callback(1,"\26\3\3\0U\2\0\0Q\3\3S\210����w.��C�\6~j\211Rʾ\fe#(\216����e\34�\237
\b\237e����i��ܤ�\2
05*�A�g\203OS\35��\0�I\217�c��/\0\0\t\0\0\0\0�\1\0\1\0\26\3\3\n\21\v\0\n\r\0\n\n\0\5O0\202\5K0\202\u00043�\3\2\1\2\2\20\rpB9c\2�&�\206���P;�0\r\6\t*\206H\206�\r\1\1\v\5\u00000p1\v0\t\6
\3U\4\6\23\2US1\u00150\23\6\3U\4\n\23\fDigiCert
Inc1\u00190\27\6\3"+[1230])
-:1: Pike.Backend(0)->`()(3600.0)
set_cipher_suite: Unsupported key exchange method: 12
lib/modules/SSL.pmod/session.pike:369:
SSL.session()->set_cipher_suite(49199,3,({({2,1}),({2,2}),({2,3})}),512)
lib/modules/SSL.pmod/handshake.pike:1435:
SSL.connection({
})->handle_handshake(2,"\3\3S\210����w.��C�\6~j\211Rʾ\fe#(\216����e\34�\237
\b\237e����i��ܤ�\205*�A�g\203OS\35��\0�I\217�c��/\0\0\t\0\0\0\0�\1\0\1\0",,,0)
lib/modules/SSL.pmod/connection.pike:399: SSL.connection({ })->got_data("")
lib/modules/SSL.pmod/sslfile.pike:1791:
SSL.sslfile(Stdio.File("socket", "192.30.252.144:443", 777 /*
fd=11 */))->ssl_read_callback(1,"h#\v�\2j\31�f\e�\21&�8���x8}\201\207RB^>2/Bo?f��\221\203\27��\0\4�0\202\4�0\202\3\231�\3\
2\1\2\2\20\4����\\��m�+B�]\25\u009f0\r\6\t*\206H\206�\r\1\1\v\5\u00000l1\v0\t\6\3U\4\6\23\2US1\u00150\23\6\3U\4\n\23\fDigiCert
Inc1\u00190\27\6\3U\4\v\23\20www.digicert.com1+0)\6\3U\4\
3\23\"DigiCert High Assurance EV Roo"+[1401])
-:1: Pike.Backend(0)->`()(3600.0)
The problem came in with revision 8cc6c5, so I'm guessing there's some
corresponding change needed inside Protocols.HTTP somewhere to make
use of the new code. Unless this is some kind of security concern -
but a web browser downloads the same file no problems.
Anyone know what's going on?
ChrisA