pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Build ODBC Drivers for Solaris with TLS support
7+ messages / 2 participants
[nested] [flat]

* Build ODBC Drivers for Solaris with TLS support
@ 2020-10-22 23:16  Jensen, David E <djensen8@dxc.com>
  0 siblings, 1 reply; 7+ messages in thread

From: Jensen, David E @ 2020-10-22 23:16 UTC (permalink / raw)
  To: pgsql-odbc

Hello,

I'm supporting a project that is migrating a database from on-prem Oracle to Azure PostgreSQL.  There are DB links from one oracle DB to the one that is migrating.  The on-prem Oracle DB is on Solaris, so we have built unixODBC, and pulled the source for the ODBC PostgreSQL drivers and built them too.

Using isql to try and connect we received an error about setting SSL options because the Azure system is set to require SSL on the connections.  If I add sslmode = require in the odbc.ini, we get and error about using ssl options are invalid when SSL support is not compiled in.  I see mention the ODBC driver supports SSL, but cannot see how to run configure to have it compiled it.

Is there any direction you can provide on this?  It would be much appreciated.

Thank you!
David

David Jensen
Senior Professional: Programmer Analyst, Global Outsourcing Services

T +1 610.624.3401
djensen8@dxc.com

DXC Technology
Virtual Office
Pen Argyl, PA 18072

dxc.technology<http://www.dxc.technology/; / Twitter<https://twitter.com/dxctechnology; / Facebook<https://www.facebook.com/DXCTechnology/; / LinkedIn<https://www.linkedin.com/company/dxctechnology;

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Build ODBC Drivers for Solaris with TLS support
@ 2020-10-23 10:13  Heikki Linnakangas <hlinnaka@iki.fi>
  parent: Jensen, David E <djensen8@dxc.com>
  0 siblings, 1 reply; 7+ messages in thread

From: Heikki Linnakangas @ 2020-10-23 10:13 UTC (permalink / raw)
  To: Jensen, David E <djensen8@dxc.com>; pgsql-odbc

On 23/10/2020 02:16, Jensen, David E wrote:
> Hello,
> 
> I'm supporting a project that is migrating a database from on-prem
> Oracle to Azure PostgreSQL.  There are DB links from one oracle DB to
> the one that is migrating.  The on-prem Oracle DB is on Solaris, so
> we have built unixODBC, and pulled the source for the ODBC PostgreSQL
> drivers and built them too.
> 
> Using isql to try and connect we received an error about setting SSL
> options because the Azure system is set to require SSL on the
> connections.  If I add sslmode = require in the odbc.ini, we get and
> error about using ssl options are invalid when SSL support is not
> compiled in.  I see mention the ODBC driver supports SSL, but cannot
> see how to run configure to have it compiled it.
> 
> Is there any direction you can provide on this?  It would be much
> appreciated.

Hi! The psqlODBC driver uses PostgreSQL's libpq library for connecting 
to the server. It sounds like you're using a version of libpq that's not 
built with OpenSSL. Are you using a pre-built package for libpq or 
building it from sources?

If you're building libpq from PostgreSQL sources, you need to pass the 
"configure --with-openssl" flag to PostgreSQL's configure.

- Heikki





^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* RE: Build ODBC Drivers for Solaris with TLS support
@ 2020-10-23 12:19  Jensen, David E <djensen8@dxc.com>
  parent: Heikki Linnakangas <hlinnaka@iki.fi>
  0 siblings, 1 reply; 7+ messages in thread

From: Jensen, David E @ 2020-10-23 12:19 UTC (permalink / raw)
  To: Heikki Linnakangas <hlinnaka@iki.fi>; pgsql-odbc

Heikki,

Thank you for the quick response.  To build the ODBC drivers, I used the package from the PostgreSQL site for solaris10-sparc64 - https://ftp.postgresql.org/pub/binary/v11.9/solaris/solaris10/sparc/postgresql-11.9-S10.sparc-64.tar...

After I send this message to the list I started wondering about the PG install itself, so I guess I was on the right track.  Are those packages not built with SSL support?

Regards,
David


David Jensen
Senior Professional: Programmer Analyst, Global Outsourcing Services

T +1 610.624.3401
djensen8@dxc.com

DXC Technology
Virtual Office
Pen Argyl, PA 18072

dxc.technology / Twitter / Facebook / LinkedIn

-----Original Message-----
From: Heikki Linnakangas <hlinnaka@iki.fi>
Sent: Friday, October 23, 2020 6:13 AM
To: Jensen, David E <djensen8@dxc.com>; pgsql-odbc@postgresql.org
Subject: Re: Build ODBC Drivers for Solaris with TLS support

On 23/10/2020 02:16, Jensen, David E wrote:
> Hello,
>
> I'm supporting a project that is migrating a database from on-prem
> Oracle to Azure PostgreSQL.  There are DB links from one oracle DB to
> the one that is migrating.  The on-prem Oracle DB is on Solaris, so we
> have built unixODBC, and pulled the source for the ODBC PostgreSQL
> drivers and built them too.
>
> Using isql to try and connect we received an error about setting SSL
> options because the Azure system is set to require SSL on the
> connections.  If I add sslmode = require in the odbc.ini, we get and
> error about using ssl options are invalid when SSL support is not
> compiled in.  I see mention the ODBC driver supports SSL, but cannot
> see how to run configure to have it compiled it.
>
> Is there any direction you can provide on this?  It would be much
> appreciated.

Hi! The psqlODBC driver uses PostgreSQL's libpq library for connecting to the server. It sounds like you're using a version of libpq that's not built with OpenSSL. Are you using a pre-built package for libpq or building it from sources?

If you're building libpq from PostgreSQL sources, you need to pass the "configure --with-openssl" flag to PostgreSQL's configure.

- Heikki








^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Build ODBC Drivers for Solaris with TLS support
@ 2020-10-23 13:22  Heikki Linnakangas <hlinnaka@iki.fi>
  parent: Jensen, David E <djensen8@dxc.com>
  0 siblings, 1 reply; 7+ messages in thread

From: Heikki Linnakangas @ 2020-10-23 13:22 UTC (permalink / raw)
  To: Jensen, David E <djensen8@dxc.com>; pgsql-odbc

On 23/10/2020 15:19, Jensen, David E wrote:
> Heikki,
> 
> Thank you for the quick response.  To build the ODBC drivers, I used the package from the PostgreSQL site for solaris10-sparc64 - https://ftp.postgresql.org/pub/binary/v11.9/solaris/solaris10/sparc/postgresql-11.9-S10.sparc-64.tar...
> 
> After I send this message to the list I started wondering about the PG install itself, so I guess I was on the right track.  Are those packages not built with SSL support?

I don't know, unfortunately. Does Solaris have 'ldd' or similar, to 
check what libraries libpq.so depends on? On my Linux system:

$ ldd <path to pgsql installation>/lib/libpq.so
	linux-vdso.so.1 (0x00007ffef63f6000)
	libssl.so.1.1 => /usr/lib/x86_64-linux-gnu/libssl.so.1.1 
(0x00007facf52d9000)
	libcrypto.so.1.1 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 
(0x00007facf4ff0000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 
(0x00007facf4fcf000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007facf4e0e000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007facf4e09000)
	/lib64/ld-linux-x86-64.so.2 (0x00007facf53e7000)

The libssl and libcrypto dependencies come from building with OpenSSL.

- Heikki





^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Build ODBC Drivers for Solaris with TLS support
@ 2020-10-23 14:01  Jensen, David E <djensen8@dxc.com>
  parent: Heikki Linnakangas <hlinnaka@iki.fi>
  0 siblings, 1 reply; 7+ messages in thread

From: Jensen, David E @ 2020-10-23 14:01 UTC (permalink / raw)
  To: Heikki Linnakangas <hlinnaka@iki.fi>; pgsql-odbc

It does 🙂.  It would appear that they aren't built with SSL  - so I guess my only option would be to build from source myself then?

 ldd libpq.so
        libgss.so.1 =>   /usr/lib/64/libgss.so.1
        libnsl.so.1 =>   /lib/64/libnsl.so.1
        libsocket.so.1 =>        /lib/64/libsocket.so.1
        libpthread.so.1 =>       /lib/64/libpthread.so.1
        libc.so.1 =>     /lib/64/libc.so.1
        libcmd.so.1 =>   /lib/64/libcmd.so.1
        libmp.so.2 =>    /lib/64/libmp.so.2
        libmd.so.1 =>    /lib/64/libmd.so.1
        libscf.so.1 =>   /lib/64/libscf.so.1
        libdoor.so.1 =>  /lib/64/libdoor.so.1
        libuutil.so.1 =>         /lib/64/libuutil.so.1
        libgen.so.1 =>   /lib/64/libgen.so.1
        libm.so.2 =>     /lib/64/libm.so.2
        /lib/sparcv9/../libm/sparcv9/libm_hwcap1.so.2
        /platform/SUNW,SPARC-Enterprise/lib/sparcv9/libc_psr.so.1
$



David Jensen
Senior Professional: Programmer Analyst, Global Outsourcing Services

T +1 610.624.3401
djensen8@dxc.com

DXC Technology
Virtual Office
Pen Argyl, PA 18072

dxc.technology<http://www.dxc.technology/; / Twitter<https://twitter.com/dxctechnology; / Facebook<https://www.facebook.com/DXCTechnology/; / LinkedIn<https://www.linkedin.com/company/dxctechnology;



________________________________
From: Heikki Linnakangas <hlinnaka@iki.fi>
Sent: Friday, October 23, 2020 9:22 AM
To: Jensen, David E <djensen8@dxc.com>; pgsql-odbc@postgresql.org <pgsql-odbc@postgresql.org>
Subject: Re: Build ODBC Drivers for Solaris with TLS support

On 23/10/2020 15:19, Jensen, David E wrote:
> Heikki,
>
> Thank you for the quick response.  To build the ODBC drivers, I used the package from the PostgreSQL site for solaris10-sparc64 - https://ftp.postgresql.org/pub/binary/v11.9/solaris/solaris10/sparc/postgresql-11.9-S10.sparc-64.tar...
>
> After I send this message to the list I started wondering about the PG install itself, so I guess I was on the right track.  Are those packages not built with SSL support?

I don't know, unfortunately. Does Solaris have 'ldd' or similar, to
check what libraries libpq.so depends on? On my Linux system:

$ ldd <path to pgsql installation>/lib/libpq.so
        linux-vdso.so.1 (0x00007ffef63f6000)
        libssl.so.1.1 => /usr/lib/x86_64-linux-gnu/libssl.so.1.1
(0x00007facf52d9000)
        libcrypto.so.1.1 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1
(0x00007facf4ff0000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
(0x00007facf4fcf000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007facf4e0e000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007facf4e09000)
        /lib64/ld-linux-x86-64.so.2 (0x00007facf53e7000)

The libssl and libcrypto dependencies come from building with OpenSSL.

- Heikki




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Build ODBC Drivers for Solaris with TLS support
@ 2020-10-23 14:08  Heikki Linnakangas <hlinnaka@iki.fi>
  parent: Jensen, David E <djensen8@dxc.com>
  0 siblings, 1 reply; 7+ messages in thread

From: Heikki Linnakangas @ 2020-10-23 14:08 UTC (permalink / raw)
  To: Jensen, David E <djensen8@dxc.com>; pgsql-odbc

On 23/10/2020 17:01, Jensen, David E wrote:
> It does 🙂.  It would appear that they aren't built with SSL  - so I
> guess my only option would be to build from source myself then?
Yeah, I'm afraid so.

- Heikki





^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* RE: Build ODBC Drivers for Solaris with TLS support
@ 2020-10-23 15:15  Jensen, David E <djensen8@dxc.com>
  parent: Heikki Linnakangas <hlinnaka@iki.fi>
  0 siblings, 0 replies; 7+ messages in thread

From: Jensen, David E @ 2020-10-23 15:15 UTC (permalink / raw)
  To: Heikki Linnakangas <hlinnaka@iki.fi>; pgsql-odbc

I figured that would be the answer.  Thanks for the help and information.



David Jensen
Senior Professional: Programmer Analyst, Global Outsourcing Services

T +1 610.624.3401
djensen8@dxc.com

DXC Technology
Virtual Office
Pen Argyl, PA 18072

dxc.technology / Twitter / Facebook / LinkedIn

-----Original Message-----
From: Heikki Linnakangas <hlinnaka@iki.fi>
Sent: Friday, October 23, 2020 10:08 AM
To: Jensen, David E <djensen8@dxc.com>; pgsql-odbc@postgresql.org
Subject: Re: Build ODBC Drivers for Solaris with TLS support

On 23/10/2020 17:01, Jensen, David E wrote:
> It does 🙂.  It would appear that they aren't built with SSL  - so I
> guess my only option would be to build from source myself then?
Yeah, I'm afraid so.

- Heikki





^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2020-10-23 15:15 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-10-22 23:16 Build ODBC Drivers for Solaris with TLS support Jensen, David E <djensen8@dxc.com>
2020-10-23 10:13 ` Heikki Linnakangas <hlinnaka@iki.fi>
2020-10-23 12:19   ` Jensen, David E <djensen8@dxc.com>
2020-10-23 13:22     ` Heikki Linnakangas <hlinnaka@iki.fi>
2020-10-23 14:01       ` Jensen, David E <djensen8@dxc.com>
2020-10-23 14:08         ` Heikki Linnakangas <hlinnaka@iki.fi>
2020-10-23 15:15           ` Jensen, David E <djensen8@dxc.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox