-
Notifications
You must be signed in to change notification settings - Fork 364
Description
Hello!
I want to start this post by thanking the developers. I've been using cx_Oracle for almost a year now and it is absolutely fantastic - thank you!
I've been trying to trace the source of this problem for a few days now with no luck. Since I've been unable to find any information regarding how to debug this problem, I am hoping one of the gurus here can point me in the right direction.
-
What versions are you using?
Oracle Database 12c Standard Edition 12.2.0.1.0 64bit Production
platform.platform: Windows-10-10.0.19041-SP0
sys.maxsize > 2**32: True
platform.python_version: 3.9.1
cx_Oracle.version: 8.1.0
cx_Oracle.clientversion: (19, 9, 0, 0, 0) -
Describe the problem
If I use Instant Client v19.9, I get the following error when connecting to the database:
cx_Oracle.DatabaseError: ORA-29024: Certificate validation failure
If I use Instant Client v19.6, the error does not occur.
-
Include a runnable Python script that shows the problem.
import os
import cx_Oracleos.environ["TNS_ADMIN"] = r"E:\oracle\wallet"
dsn = 'Production'
instant_client_dir = r"E:\instantclient_19_9"
cx_Oracle.init_oracle_client(lib_dir=instant_client_dir)
cnx = cx_Oracle.connect(dsn=f"{dsn}", encoding="UTF-8")
print("Connection established")
The above program fails with the aforementioned error. To make it work, all I have to do is change the value for instant_client_dir so it points to the older version.
I've validated the certificate chain using openssl and it shows no issues. If it helps, the following is my sqlnet.ora file:
SQLNET.WALLET_OVERRIDE = TRUE
SQLNET.AUTHENTICATION_SERVICES = (BEQ,TCPS,ALL)
SSL_CLIENT_AUTHENTICATION=FALSE
SSL_SERVER_DN_MATCH=YES
WALLET_LOCATION =
(SOURCE =
(METHOD = FILE)
(METHOD_DATA =
(DIRECTORY = %TNS_ADMIN%)
)
)
Can someone please point me to a resource that details how to get more information on what might be causing this? Thank you!
Tom