mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-17 12:28:07 +00:00
Potential solution for TLS errors in OneFuzz (#2087)
* proposed fix from here: https://github.com/Azure/azure-functions-durable-python/issues/194#issuecomment-710670377 * Update src/api-service/__app__/__init__.py Co-authored-by: George Pollard <porges@porg.es> Co-authored-by: stas <statis@microsoft.com> Co-authored-by: George Pollard <porges@porg.es> Co-authored-by: George Pollard <gpollard@microsoft.com>
This commit is contained in:
@ -0,0 +1,17 @@
|
|||||||
|
import os
|
||||||
|
|
||||||
|
import certifi.core
|
||||||
|
|
||||||
|
|
||||||
|
def override_where() -> str:
|
||||||
|
"""overrides certifi.core.where to return actual location of cacert.pem"""
|
||||||
|
# see:
|
||||||
|
# https://github.com/Azure/azure-functions-durable-python/issues/194#issuecomment-710670377
|
||||||
|
# change this to match the location of cacert.pem
|
||||||
|
return os.path.abspath(
|
||||||
|
"cacert.pem"
|
||||||
|
) # or to whatever location you know contains the copy of cacert.pem
|
||||||
|
|
||||||
|
|
||||||
|
os.environ["REQUESTS_CA_BUNDLE"] = override_where()
|
||||||
|
certifi.core.where = override_where
|
||||||
|
Reference in New Issue
Block a user