Hi, i have big problem which rised when compiling on older OS (CentOS7) to support RH7 customer.
We have python app which is used as IPC by our main app for SSO using Okta OIDC Server.
We had to manually install OpenSSL and Python3.12 but we did it. It’s working (Im using also requests library)
The problem is that okta library is throwing SSL Error and i don’t have any idea now how im supposed to fix it, i suppose it’s looking for local certificate when it should look for certificate in /tmp/(Program)/… which is runtime pyinstaller virtual env.
def is_access_token_valid_okta(token, issuer):
PrintLog("is_access_token_valid_okta")
os.environ['SSL_CERT_FILE']=certifi.where()
os.environ['REQUESTS_CA_BUNDLE']=certifi.where()
sslDir = certifi.where()
sslDir = sslDir[:-11]
os.environ['SSL_CERT_DIR'] = sslDir
jwt_verifier = AccessTokenVerifier(issuer=issuer, audience='api://default')
try:
loop.run_until_complete(jwt_verifier.verify(token))
PrintLog("True")
return True
except Exception as error:
PrintLog(f"False, error is: ", type(error).__name__, "–",
error, " Cert Path: -", certifi.where(), " SSL CONTEXT -- ",
ssl.get_default_verify_paths(), " VAR ", os.getenv('SSL_CERT_FILE'))
return False
Tried to set varirables, create my own ssl context, add hooks in pyinstaller nothing… Any idea what i can do to solve it?