How to connect to SSL

171 views
Skip to first unread message

Jai Jagani

unread,
Jul 19, 2016, 9:59:35 AM7/19/16
to ibm_db
I am unable to connect to SSL using ibm_db. Please any one can help me.

Gábor Szabó

unread,
Oct 15, 2020, 12:56:05 AM10/15/20
to ibm_db
I can connect to a db2 db using ibm_db, with SSL connection, too, using a web app.

DSN = os.getenv('SSLDSN','') #taking variables from env variables
crbDbConnection = ibm_db.connect(DSN,"","")
return crbDbConnection

But when I try to test with localhost, the connection won't establish.  When tested locally, env vars are taken from .env. W/o SSL, using the non-ssl post the connection does work.
Not with SSL, though.

Working:
SSLDSN="DATABASE=BLUDB;HOSTNAME=<>;PORT=<>;PROTOCOL=TCPIP;UID=<>;PWD=<>;"   

Not working:
SSLDSN="DATABASE=BLUDB;HOSTNAME=<>;PORT=<>;PROTOCOL=TCPIP;UID=<>;PWD=<>;Security=SSL;" 

Some of my colleagues can work with this, but most of us can not.
I suspect it must be a local pycharm or firewall setting. I don't think it is an ssl certificate error, since I can connect to the db using jdbc connection and SSL via SQuirreL SQL Client for example.

Any one has an idea why?

Thank you
Reply all
Reply to author
Forward
0 new messages