[4173] in BarnOwl Developers
Re: [barnowl/barnowl] Experimental Zulip support (#184)
daemon@ATHENA.MIT.EDU (Adam Glasgall)
Tue Oct 17 03:11:03 2017
Date: Mon, 16 Oct 2017 20:36:32 -0700
From: Adam Glasgall <notifications@github.com>
Reply-To: barnowl/barnowl <reply+004448c9c343c0b0182a905b0a658f01890baa3cfee3c22e92cf0000000115fd3cc092a169ce0fd8a3d7@reply.github.com>
To: barnowl/barnowl <barnowl@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
In-Reply-To: <barnowl/barnowl/pull/184@github.com>
----==_mimepart_59e57ac081c7d_6dfb3f80b32def3889994
Content-Type: text/plain;
charset=UTF-8
Content-Transfer-Encoding: 7bit
aglasgall commented on this pull request.
> + }
+ if ($cfg{'api_url'} =~ /^https/) {
+ if (exists $cfg{'ssl_key_file'}) {
+ $tls_ctx = new AnyEvent::TLS(verify => $cfg{'ssl_verify'},
+ sslv3 => 0, verify_peername => "http",
+ ca_file => $cfg{'ssl_ca_file'},
+ cert_file => $cfg{'ssl_cert_file'},
+ key_file => $cfg{'ssl_key_file'});
+ } else {
+ $tls_ctx = new AnyEvent::TLS(verify => $cfg{'ssl_verify'},
+ sslv3 => 0, verify_peername => "http",
+ ca_file => $cfg{'ssl_ca_file'});
+ }
+ } else {
+ # we still want it for a unique id
+ $tls_ctx = int(rand(1024));
I honestly don't remember why I picked 1024 here. Do you think replacing it with "high" (the AnyEvent::TLS "validate certs" canned context) is sufficient?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/barnowl/barnowl/pull/184#discussion_r145020874
----==_mimepart_59e57ac081c7d_6dfb3f80b32def3889994
Content-Type: text/html;
charset=UTF-8
Content-Transfer-Encoding: 7bit
<p><b>@aglasgall</b> commented on this pull request.</p>
<hr>
<p>In <a href="https://github.com/barnowl/barnowl/pull/184#discussion_r145020874">perl/modules/Zulip/lib/BarnOwl/Module/Zulip.pm</a>:</p>
<pre style='color:#555'>> + }
+ if ($cfg{'api_url'} =~ /^https/) {
+ if (exists $cfg{'ssl_key_file'}) {
+ $tls_ctx = new AnyEvent::TLS(verify => $cfg{'ssl_verify'},
+ sslv3 => 0, verify_peername => "http",
+ ca_file => $cfg{'ssl_ca_file'},
+ cert_file => $cfg{'ssl_cert_file'},
+ key_file => $cfg{'ssl_key_file'});
+ } else {
+ $tls_ctx = new AnyEvent::TLS(verify => $cfg{'ssl_verify'},
+ sslv3 => 0, verify_peername => "http",
+ ca_file => $cfg{'ssl_ca_file'});
+ }
+ } else {
+ # we still want it for a unique id
+ $tls_ctx = int(rand(1024));
</pre>
<p>I honestly don't remember why I picked 1024 here. Do you think replacing it with "high" (the AnyEvent::TLS "validate certs" canned context) is sufficient?</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/barnowl/barnowl/pull/184#discussion_r145020874">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AERIyUVIZvpgcu3UaRMMcxb_6ZV-Gykvks5stCDAgaJpZM4P6_o2">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AERIyZ-JRDjbCKhh4rThJLdE32l_uJnTks5stCDAgaJpZM4P6_o2.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
<link itemprop="url" href="https://github.com/barnowl/barnowl/pull/184#discussion_r145020874"></link>
<meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/barnowl/barnowl","title":"barnowl/barnowl","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/barnowl/barnowl"}},"updates":{"snippets":[{"icon":"PERSON","message":"@aglasgall commented on #184"}],"action":{"name":"View Pull Request","url":"https://github.com/barnowl/barnowl/pull/184#discussion_r145020874"}}}</script>
----==_mimepart_59e57ac081c7d_6dfb3f80b32def3889994--