Use a certificate on jira-python

Hi,

I’m using jira-python to get some issue information however I can’t make it work with a certificate. I need to set verify to False to be able to use it.

options = {
   'server': 'https://jira.server',
   'verify': False,
   'cert': '/home/path/certificate.cert',
   }
jira = JIRA(options, basic_auth=('USER', 'PASSWORD'))

This is the output if I set verify to true:

WARNING:root:HTTPSConnectionPool(host='jira.server', port=8443): Max retries exceeded with url: /rest/api/2/serverInfo (Caused by SSLError(SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)'),)) while doing GET https://jira.server:8443/rest/api/2/serverInfo [{u'headers': {'Accept-Encoding': 'gzip, deflate', u'Accept': u'application/json,*.*;q=0.9', 'User-Agent': 'python-requests/2.20.0', 'Connection': 'keep-alive', u'X-Atlassian-Token': u'no-check', u'Cache-Control': u'no-cache', u'Content-Type': u'application/json'}, 'params': None}]
WARNING:root:Got ConnectionError [HTTPSConnectionPool(host='jira.server', port=8443): Max retries exceeded with url: /rest/api/2/serverInfo (Caused by SSLError(SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)'),))] errno:None on GET https://jira.server:8443/rest/api/2/serverInfo
{'request': <PreparedRequest [GET]>, 'response': None}\{'request': <PreparedRequest [GET]>, 'response': None}
WARNING:root:Got recoverable error from GET https://jira.server:8443/rest/api/2/serverInfo, will retry [1/3] in 18.5118699127s. Err: HTTPSConnectionPool(host='jira.server', port=8443): Max retries exceeded with url: /rest/api/2/serverInfo (Caused by SSLError(SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)'),))

I also tried to set the certificate path on the verify field with no success

If I use curl this way I can use ssl to get the data:

curl -s --cacert /home/path/certificate.cert -u USER:PASSWORD https://jira.server/browse/ISSUE-5