Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

Commit

Permalink
Potential solution for TLS errors in OneFuzz (#2087)
Browse files Browse the repository at this point in the history
* proposed fix from here:

Azure/azure-functions-durable-python#194 (comment)

* 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>
  • Loading branch information
4 people authored Jun 29, 2022
1 parent 358c57a commit 30daae2
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/api-service/__app__/__init__.py
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 30daae2

Please sign in to comment.