Explicitly use certificate chain.
This commit is contained in:
@@ -167,6 +167,7 @@ def validate_token(user_id, token, oauth_subclient_id):
|
|||||||
# Retry a few times when POSTing to BlenderID fails.
|
# Retry a few times when POSTing to BlenderID fails.
|
||||||
# Source: http://stackoverflow.com/a/15431343/875379
|
# Source: http://stackoverflow.com/a/15431343/875379
|
||||||
s = requests.Session()
|
s = requests.Session()
|
||||||
|
s.verify = current_app.config['TLS_CERT_FILE']
|
||||||
s.mount(blender_id_endpoint(), HTTPAdapter(max_retries=5))
|
s.mount(blender_id_endpoint(), HTTPAdapter(max_retries=5))
|
||||||
|
|
||||||
# POST to Blender ID, handling errors as negative verification results.
|
# POST to Blender ID, handling errors as negative verification results.
|
||||||
|
@@ -1,6 +1,11 @@
|
|||||||
import os.path
|
import os.path
|
||||||
from os import getenv
|
from os import getenv
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
|
import requests.certs
|
||||||
|
|
||||||
|
# Certificate file for communication with other systems.
|
||||||
|
TLS_CERT_FILE = requests.certs.where()
|
||||||
|
print('Loading TLS certificates from %s' % TLS_CERT_FILE)
|
||||||
|
|
||||||
import requests.certs
|
import requests.certs
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user