Skip to content

Commit

Permalink
add openssl ignore cert for imap
Browse files Browse the repository at this point in the history
  • Loading branch information
CausticKirbyZ committed Oct 4, 2023
1 parent 26eea93 commit 0f24bf0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/spray_types/imap.cr
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ class IMAP < Sprayer
def login_imap(username : String, password : String , host : String , port : Int32, ssl : Bool = false ) : Bool
socket = TCPSocket.new(host, port)
if ssl
tls = OpenSSL::SSL::Socket::Client.new(socket)
context = OpenSSL::SSL::Context::Client.new
context.verify_mode = OpenSSL::SSL::VerifyMode::NONE

tls = OpenSSL::SSL::Socket::Client.new(socket, context: context )
socket = tls
end

Expand Down

0 comments on commit 0f24bf0

Please sign in to comment.