ibmdb / python-ibmdbsa

Automatically exported from code.google.com/p/ibm-db.ibm-db-sa
Apache License 2.0
40 stars 59 forks source link

Passing TLS version as arguments #100

Closed Arusara closed 2 years ago

Arusara commented 3 years ago

Hi team, I want to pass the TLS version while connecting instead of the Default SSL TLS version. could you please someone help me with this?

bimalkjha commented 3 years ago

@Arusara Not possible now. Probably in July-August 2021 you can do that once Db2 V11.5.6.0 get released. Thanks.

bimalkjha commented 2 years ago

@Arusara What is your operating system name where you want to install ibmdbsa and use it? Now, you can use TLSVersion keyword in connection string will values TLSV1 or TLSV12 as per this documentation: https://www.ibm.com/docs/en/db2/11.5?topic=cck-tlsversion Thanks.

amukherjee28 commented 2 years ago

The default clidriver has be updated to version db2_v1156 which supports TLS version as part of connection string.

amukherjee28 commented 2 years ago

With the new version of clidriver (v1156 and above), below connection string example can be used for TLS version argument.

engine = create_engine('ibm_db_sa://USERNAME:PASSWORD@HOSTNAME:SSL_PORT/DATABASE;Security=SSL;SSLServerCertificate=<SSL_SERVER_Certificate_PATH;TLSVersion=TLSV1',echo=True)

Once you have passed a correct value of TLSVERSION successful connection can be established.