node-odbc icon indicating copy to clipboard operation
node-odbc copied to clipboard

node-odbc SSL encryption support?

Open Swapnil-Girme opened this issue 8 years ago • 1 comments

I'm trying to connect to Oracle database from Linux machine using node-odbc with SSL configured on Oracle database server. But connection hangs and after some time it returns an error. It seems node-odbc dosen't support SSL encryption.

Error returned:

{ Error: [unixODBC][DataDirect][ODBC 20101 driver][20101]11603
    at Error (native)
  errors:
   [ { message: '[unixODBC][DataDirect][ODBC 20101 driver][20101]11603',
       state: '21' },
     { message: '[unixODBC][DataDirect][ODBC 20101 driver]7529',
       state: '08001' } ],
  error: '[node-odbc] SQL_ERROR',
  message: '[unixODBC][DataDirect][ODBC 20101 driver][20101]11603',
  state: '21' }

Below are the environment details:

Linux Distribution Name and Version:

Distributor ID: Ubuntu
Description:    Ubuntu 14.04 LTS
Release:        14.04

Driver Manager:

UnixODBC v2.3.4

ODBC Driver:

Name: Progress DataDirect Connect for ODBC Oracle WP Driver
Version: 7.1.6 

Connection String:

"DRIVER={Connect64_for_ODBC_71};HOST=<host IP>;PORT=1521;UID=<user ID>;PWD=<user pwd>; SERVICENAME=orcl;EncryptionMethod=1;Truststore=/root/Oracle_POC/SSL/ssl_certs/server.pem; TruststorePassword=<truststore pwd>;ValidateServerCertificate=1"

Does node-odbc support SSL encryption?

Swapnil-Girme avatar Oct 06 '17 07:10 Swapnil-Girme

Hi @Swapnil-Girme, Does that connection string work from any other ODBC consumer on that same machine?

I am not aware of any ODBC calls that are required for setting up SSL. I would expect that it would be handled by the ODBC driver, in your case {Connect64_for_ODBC_71}. Maybe you could try configuring a DSN in /etc/odbc.ini and then test with isql to see if the ODBC connection works with unixodbc in general.

wankdanker avatar Oct 06 '17 14:10 wankdanker