Skip to content

Commit

Permalink
Specify absolute path for cacert file
Browse files Browse the repository at this point in the history
  • Loading branch information
Shenny S committed Jul 8, 2013
1 parent 4bcabc1 commit eab49ba
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion createsend/createsend.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import httplib
import base64
import gzip
import os
import socket, ssl
from StringIO import StringIO
from urlparse import urlparse
Expand Down Expand Up @@ -160,7 +161,7 @@ def make_request(self, method, path, params={}, body="", username=None,
if (parsed_base_uri.scheme == 'https'):
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect((parsed_base_uri.netloc, 443))
sslsock = ssl.wrap_socket(sock, cert_reqs=ssl.CERT_REQUIRED, ca_certs='cacert.pem')
sslsock = ssl.wrap_socket(sock, cert_reqs=ssl.CERT_REQUIRED, ca_certs=os.path.dirname(__file__)+ '\cacert.pem')
cert = sslsock.getpeercert()

for field in cert['subject']:
Expand Down

0 comments on commit eab49ba

Please sign in to comment.