#235 a couple ssl fixes
Merged 7 years ago by mikem. Opened 7 years ago by mikem.
https://github.com/mikem23/koji-playground.git minor-ssl-fixes  into  master

add another pattern to is_requests_cert_error()
Mike McLean • 7 years ago  
allow setting no_ssl_verify in client config
Mike McLean • 7 years ago  
koji/__init__.py
file modified
+5 -2
@@ -1587,6 +1587,7 @@

          'cert': None,

          'ca': '',  # FIXME: remove in next major release

          'serverca': None,

+         'no_ssl_verify': False,

          'authtype': None

      }

  
@@ -1851,8 +1852,10 @@

  

      # Using str(e) is slightly ugly, but the error stacks in python-requests

      # are way more ugly.

-     if ('certificate revoked' in str(e) or

-             'certificate expired' in str(e)):

+     errstr = str(e)

+     if ('certificate revoked' in errstr or

+             'certificate expired' in errstr or

+             'certificate verify failed' in errstr):

          return True

  

      return False

no initial comment

add another pattern to is_requests_cert_error()

allow setting no_ssl_verify in client config

Pull-Request has been merged by mikem

7 years ago
Metadata