Fixed a problem with access to SSL.

I had a problem accessing SSL, which are untrusted. Gave me 403 ERROR. This code fix my problem and decided to share it if it will benefit someone.