slack-ruby-client icon indicating copy to clipboard operation
slack-ruby-client copied to clipboard

Disable SSL certificate verification

Open altjx opened this issue 7 years ago • 4 comments

Is there a way to bypass the SSL certificate verification process from the slack ruby client?

altjx avatar Aug 13 '18 20:08 altjx

Doesn't look possible right now without patching the code. It would probably be different for web and RTM APIs.

For web, we build the Faraday connection for the web client here. I would start by hacking this code (possibly with this) to first find out how to disable it there. If you just want to disable peer verification adding verify: false into ssl options should do it.

For RTM you need to make changes to the socket in the appropriate async library, here for celluloid.

Once you can figure out what options are needed where we can talk about how to add a feature to configure each scenario externally.

dblock avatar Aug 13 '18 22:08 dblock

Thanks. This might sound ghetto, but as a temporary workaround, I added this to the top of my ruby script:

OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE

Regards, Alton

Sent from my iPhone

On Aug 13, 2018, at 5:06 PM, Daniel Doubrovkine (dB.) @dblockdotorg [email protected] wrote:

Doesn't look possible right now without patching the code. It would probably be different for web and RTM APIs.

For web, we build the Faraday connection for the web client here. I would start by hacking this code (possibly with this) to first find out how to disable it there. If you just want to disable peer verification adding verify: false into ssl options should do it.

For RTM you need to make changes to the socket in the appropriate async library, here for celluloid.

Once you can figure out what options are needed where we can talk about how to add a feature to configure each scenario externally.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

altjx avatar Aug 13 '18 22:08 altjx

Aha, that's the underlying library and seems to do it. Be careful though because that disables it globally so YMMV.

dblock avatar Aug 13 '18 22:08 dblock

Yup, lol. Thanks man and will do! Thanks for your work on this project. I love it!

Regards, Alton

Sent from my iPhone

On Aug 13, 2018, at 5:20 PM, Daniel Doubrovkine (dB.) @dblockdotorg [email protected] wrote:

Aha, that's the underlying library and seems to do it. Be careful though because that disables it globally so YMMV.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

altjx avatar Aug 13 '18 23:08 altjx