Re: FreeTDS: MSSQL2005, SSL, Encryption, TDS v8 does not work

Frediano Ziglio <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <1250258417.6133.6.camel@freddy>
Il giorno ven, 07/08/2009 alle 14.41 +0200, Mittel, Alexander ha
scritto:
> *** UPDATE (see >>>>> update) ***
> 
> Hi,
> 
> thanks for help!
> With ALL Your hints/suggestions now I could establish a encrypted connection!
> First installing all needed libs for gnutls and gnutls itself, then
> ./configure --prefix=/usr/local/freetds --with-gnutls --with-tdsver=8.0 --enable-msdblib
> >>>>>update 1)
>         option "--with-unixodbc" and unixodbc/isql works
> 

unixodbc should be detected by configure if unixodbc is installed in
default directories... could you post configure output and config.log
without --with-unixodbc ??

> To clear "undefined reference to `gnutls_........`" while make/linking I had to
> [inconveniently] manually edit (for reasons of precaution all) Makefile's:
> NETWORK_LIBS = -lgnutls -lgnutlsxx -lcrypto
> LDFLAGS = -L/usr/lib -L/usr/local/lib
> 
> >>>>>update 2)
>         gnutls does not build/use "libgnutls-config" anymore, it must be replaced by "pkg-config gnutls"
>         (see NEWS within gnutls-source-directory).
>         So I changed freetds "configure" at line 23135 (approx) and then the right Makefile's are created.
>            ...
>            if test "$with_gnutls" = "yes"; then
>                 ...
>           CPPFLAGS="$CPPFLAGS `libgnutls-config --cflags`"
>           NETWORK_LIBS="$NETWORK_LIBS `libgnutls-config --libs`"
>                 ...
>            ...
> 

I wrote a patch to fix this issue. Now if pkg-config gnutls works it's
used instead of libgnutls-config

> 
> >>>>>update 3)
>         sometimes there are errors (freetds/tsql and unixodbc/isql), then the connection is still active
>         but every next sql-command will be result in one of these errors:
> 
>                 Msg 20004, Level 9, State -1, Server OpenClient, Line -1
>                 Read from the server failed
> 
>                 Msg 20006, Level 9, State -1, Server OpenClient, Line -1
>                 Write to the server failed
> 

Mmmm.... probably server close the connection. Which queries cause these
problems ??

> 
> Result:
> /usr/local/freetds/bin/tsql -C
> Compile-time settings (established with the "configure" script)
>                             Version: freetds v0.83.dev.20090725
>              freetds.conf directory: /usr/local/freetds/etc
>      MS db-lib source compatibility: yes
>         Sybase binary compatibility: no
>                       Thread safety: yes
>                       iconv library: yes
>                         TDS version: 8.0
>                               iODBC: no
>                            unixodbc: no / yes
> Connect to SQLServer and check encryption with:
> SELECT session_id, net_transport, encrypt_option, auth_scheme FROM sys.dm_exec_connections
> 
> Mfg Alexander
> 

Regards
  Frediano Ziglio
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.