Re: Using SSL With DBLIB/TinyTDS

"James K. Lowden" <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
On Mon, 11 Apr 2011 13:08:50 -0400
Ken Collins <[email protected]> wrote:

> In my code I have:
> 
> DBSETLDBNAME(login)
> 
> If the user specifies a :secure option. But it will not encrypt, only
> when I set the server to force clients. ... Is this expected behavior?
> What should DBSETLDBNAME do?

DBSETLDBNAME(), as it should, simply sets the default database in the
login packet, obviating the need to call dbuse().  It has nothing to do
with encryption.  

To affect encryption in a db-lib program, your only option is to use
the encryption property in freetds.conf.  It can be set per-server or
globally for the client, but not programmatically per connection.  

To change that would mean extending db-lib, adding

	DBSETLENCRYPT( LOGINREC*, TDS_ENCRYPTION_LEVEL)

and/or adding an environment variable.  (DB-Library has no equivalent
of a connection string, but environment variables do roughly the same
job.)  

HTH.  

--jkl
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.