Skip to content

Commit

Permalink
Merge pull request #27 from edarevsky/fix-https-requests
Browse files Browse the repository at this point in the history
Fix https requests
  • Loading branch information
shemma3 authored May 26, 2024
2 parents a14a1ff + ce895c9 commit a987e76
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
12 changes: 10 additions & 2 deletions GSSDK.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def __str__(self):

class GSRequest():
DEFAULT_API_DOMAIN = "us1.gigya.com"
VERSION = "3.3.6"
VERSION = "3.5.0"
caCertsPath = os.path.join(os.path.dirname(__file__), "cacert.pem")

_domain = ""
Expand Down Expand Up @@ -452,7 +452,15 @@ def connect(self):
if self._tunnel_host:
self.sock = sock
self._tunnel()
self.sock = ssl.wrap_socket(sock, ca_certs=GSRequest.caCertsPath, cert_reqs=ssl.CERT_REQUIRED)

context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
context.minumum_version = ssl.TLSVersion.TLSv1_2
context.load_verify_locations(GSRequest.caCertsPath)
context.verify_mode = ssl.CERT_REQUIRED
context.check_hostname = True

self.sock = context.wrap_socket(sock, server_hostname=self.host)


class ValidHTTPSHandler(HTTPSHandler):
def https_open(self, req):
Expand Down
Binary file removed Gigya_Python_SDK_3.3.6.zip.txt
Binary file not shown.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
The Python SDK provides a Python interface for the Gigya API.
The library makes it simple to integrate Gigya services in your Python application.
This document is a practical step-by-step guide for programmers who wish to integrate the Gigya service into their Python application.
Follow the steps below to get started and use the [Library Reference](https://help.sap.com/viewer/DRAFT/8b8d6fffe113457094a17701f63e3d6a/GIGYA/en-US/416a3f1f70b21014bbc5a10ce4041860.html) while implementing.
Follow the steps below to get started and use the [Library Reference](https://help.sap.com/docs/SAP_CUSTOMER_DATA_CLOUD/8b8d6fffe113457094a17701f63e3d6a/416a3f1f70b21014bbc5a10ce4041860.html?q=python%20sdk) while implementing.

## Requirements
[Pyhton](https://www.python.org/downloads/)
[Python](https://www.python.org/downloads/)

```
Note: Python 2.7.x and 3 are supported.
Note: Python version 3.x is supported.
```

## Download and Installation
Expand Down

0 comments on commit a987e76

Please sign in to comment.