Skip to Content.
Sympa Menu

freetds - Re: [freetds] tsql with SSL on SQL Server

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Tony Baldarelli" <tbaldarelli AT wmsvision.com>
  • To: "'FreeTDS Development Group'" <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] tsql with SSL on SQL Server
  • Date: Sat, 9 Apr 2011 21:04:56 -0400

Ok, I just tried your patch and it did not work - same exact error as before.
So I guess freeTDS cannot connect to SQL Server using openssl, at least not
for 0.82?

I am forcing encryption on the SQL Server side of things. And in
"freetds.conf", "encryption" is set to "required".
Here was the command I did:
[tonyb:v9_odbc:V3_18]> (export TDSDUMP=tonyb.log;tsql -S myserver2005
-U <user id removed for secuirity> -P <password removed for security> <
testMBOCount.sql)
locale is "en_US"
locale charset is "ISO-8859-1"
Msg 20017, Level 9, State -1, Server OpenClient, Line -1
Unexpected EOF from the server
Msg 20002, Level 9, State -1, Server OpenClient, Line -1
Adaptive Server connection failed
There was a problem connecting to the server
[tonyb:v9_odbc:V3_18]>

And her is the TDSDUMP file:
[tonyb:v9_odbc:V3_18]> more tonyb.log
log.c:190:Starting log file for FreeTDS 0.82.1.dev.20110409
on 2011-04-09 20:54:13 with debug flags 0x4fff.
iconv.c:197:names for ISO-8859-1: ISO-8859-1
iconv.c:197:names for UTF-8: UTF-8
iconv.c:197:names for UCS-2LE: UCS-2LE
iconv.c:197:names for UCS-2BE: UCS-2BE
iconv.c:363:iconv to convert client-side data to the "ISO-8859-1" character
set
iconv.c:516:tds_iconv_info_init: converting "ISO-8859-1"->"UCS-2LE"
iconv.c:516:tds_iconv_info_init: converting "ISO-8859-1"->"UCS-2LE"
net.c:210:Connecting to 192.168.254.91 port 1433 (TDS version 8.0)
net.c:266:tds_open_socket: connect(2) returned "Operation now in progress"
net.c:307:tds_open_socket() succeeded
util.c:162:Changed query state from DEAD to IDLE
net.c:793:Sending packet
0000 12 01 00 34 00 00 00 00-00 00 15 00 06 01 00 1b |...4.... ........|
0010 00 01 02 00 1c 00 0c 03-00 28 00 04 ff 08 00 01 |........ .(..ÿ...|
0020 55 00 00 00 4d 53 53 51-4c 53 65 72 76 65 72 00 |U...MSSQ LServer.|
0030 db 49 00 00 - |ÛI..|

net.c:604:Received header
0000 04 01 00 25 00 00 01 00- |...%....|

net.c:683:Received packet
0000 00 00 15 00 06 01 00 1b-00 01 02 00 1c 00 01 03 |........ ........|
0010 00 1d 00 00 ff 09 00 0b-ee 00 00 03 01 |....ÿ... î....|

login.c:1007:detected flag 3
net.c:1049:in tds_push_func
net.c:1008:in tds_pull_func
net.c:793:Sending packet
0000 12 01 00 46 00 00 00 00-16 03 01 00 39 01 00 00 |...F.... ....9...|
0010 35 03 01 4d a0 ff b5 a6-e6 76 b4 3f 04 c4 12 04 |5..M ÿµ¦ æv´?.Ä..|
0020 b5 2e 52 06 16 7a f0 ef-07 61 d8 6b f9 26 5d 1b |µ.R..zðï .aØkù&].|
0030 27 be 5f 00 00 0e 00 09-00 64 00 62 00 03 00 06 |'¾_..... .d.b....|
0040 00 12 00 63 01 00 - |...c..|

net.c:1021:have 0
net.c:1025:before read
util.c:334:tdserror(0x80f8e88, 0x80f97c8, 20017, 0)
util.c:368:tdserror: client library returned TDS_INT_CANCEL(2)
util.c:389:tdserror: returning TDS_INT_CANCEL(2)
util.c:162:Changed query state from IDLE to DEAD
net.c:1311:handshake failed
util.c:334:tdserror(0x80f8e88, 0x80f97c8, 20002, 0)
util.c:368:tdserror: client library returned TDS_INT_CANCEL(2)
util.c:389:tdserror: returning TDS_INT_CANCEL(2)
mem.c:609:tds_free_all_results()
[tonyb:v9_odbc:V3_18]>




And here is the first part of the config.log file:
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by FreeTDS configure 0.82.1.dev.20110409, which was
generated by GNU Autoconf 2.65. Invocation command line was

$ ./configure --with-openssl

## --------- ##
## Platform. ##
## --------- ##

hostname = wms162
uname -m = i686
uname -r = 2.4.20-8smp
uname -s = Linux
uname -v = #1 SMP Thu Mar 13 17:45:54 EST 2003

/usr/bin/uname -p = unknown
/bin/uname -X = unknown

/bin/arch = i686
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown

PATH: /usr/kerberos/sbin
PATH: /home/wms/v9_odbc/bin
PATH: /usr/kerberos/bin
PATH: /usr/local/bin
PATH: /bin
PATH: /usr/bin
PATH: /usr/X11R6/bin
PATH: /oracle8.1.7/bin
PATH: /oracle8.1.7/bin
PATH: /usr/local/bin
PATH: /usr/local/apache-ant-1.6.5/bin
PATH: ./linux9-odbc
PATH: .
PATH: /home/wms/v9_odbc/bin
PATH: /home/wms/v9_odbc/bin/common
PATH: /home/tonyb/bin
PATH: /home/wms/bin
PATH: /oracle/bin
PATH: /oracle/bin









Tony


-----Original Message-----
From: Tony Baldarelli [mailto:tbaldarelli AT wmsvision.com]
Sent: Friday, April 08, 2011 11:36 AM
To: 'FreeTDS Development Group'
Subject: RE: [freetds] tsql with SSL on SQL Server

Thanks for the information.

So, since we don't know when the "patch" tar file will be updated, except for
"tonight", do you have any ideas on how to "try it out"? The best idea I can
think of is to go directly into the code ( src/tds/net.c ) and apply the same
update you sent me in another email
(http://freetds.cvs.sourceforge.net/viewvc/freetds/freetds/src/tds/net.c?r1=1.107&r2=1.108
). If so, do I need to define SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS someplace?
If so, to what?

This is all just temporary. I will wait for the more official patch, but if
I need to show progress on my end, the above "work around" would tide people
over on my end.

Thanks.

Tony


-----Original Message-----
From: freetds-bounces AT lists.ibiblio.org
[mailto:freetds-bounces AT lists.ibiblio.org] On Behalf Of Frediano Ziglio
Sent: Friday, April 08, 2011 11:18 AM
To: FreeTDS Development Group
Subject: Re: [freetds] tsql with SSL on SQL Server

I update patch at http://freetds.sourceforge.net/post82.diff.gz,
patched version should come tonight (I don't know hour and time zone).

Yes, we should update our crontabs :)

freddy77

2011/4/8 Tony Baldarelli <tbaldarelli AT wmsvision.com>:
> Thanks for getting back to me. I am looking at the link you gave me before
> (http://ibiblio.org/pub/Linux/ALPHA/freetds/stable/ ) and I don't see any
> updates, anything new for today. I downloaded the patch again and it is
> exactly the same as the patch I downloaded the other day. I downloaded
> http://ibiblio.org/pub/Linux/ALPHA/freetds/stable/freetds-patched.tgz, to be
> precise. Should I be using another link?
>
> Thanks for your help.
>
>
> Tony
>
>
> -----Original Message-----
> From: freetds-bounces AT lists.ibiblio.org
> [mailto:freetds-bounces AT lists.ibiblio.org] On Behalf Of Frediano Ziglio
> Sent: Friday, April 08, 2011 10:42 AM
> To: FreeTDS Development Group
> Subject: Re: [freetds] tsql with SSL on SQL Server
>
> Yes
>
> 2011/4/8 Tony Baldarelli <tbaldarelli AT wmsvision.com>:
>> So should I try downloading the patch again?
>>
>>
>> Tony
>>
>>
>> -----Original Message-----
>> From: freetds-bounces AT lists.ibiblio.org
>> [mailto:freetds-bounces AT lists.ibiblio.org] On Behalf Of Frediano Ziglio
>> Sent: Friday, April 08, 2011 3:15 AM
>> To: FreeTDS Development Group
>> Subject: Re: [freetds] tsql with SSL on SQL Server
>>
>> Backported...
>>
>> 2011/4/8 Frediano Ziglio <freddy77 AT gmail.com>:
>>> Oppss...
>>>
>>>
>>
> http://freetds.cvs.sourceforge.net/viewvc/freetds/freetds/src/tds/net.c?r1=1
>> .107&r2=1.108
>>>
>>> Looking at CVS patch for OpenSSL was not backported to 0.82 branch. So
>>> 0.82 won't work with recent OpenSSL... I'll try to backport it.
>>>
>>> Frediano
>>>
>> _______________________________________________
>> FreeTDS mailing list
>> FreeTDS AT lists.ibiblio.org
>> http://lists.ibiblio.org/mailman/listinfo/freetds
>>
>> _______________________________________________
>> FreeTDS mailing list
>> FreeTDS AT lists.ibiblio.org
>> http://lists.ibiblio.org/mailman/listinfo/freetds
>>
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>
_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds





Archive powered by MHonArc 2.6.24.

Top of Page