Skip to Content.
Sympa Menu

freetds - Re: [freetds] Using SSL With DBLIB/TinyTDS

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT freetds.org>
  • To: freetds AT lists.ibiblio.org
  • Subject: Re: [freetds] Using SSL With DBLIB/TinyTDS
  • Date: Tue, 12 Apr 2011 22:07:34 -0400

On Mon, 11 Apr 2011 13:08:50 -0400
Ken Collins <ken AT metaskills.net> 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




Archive powered by MHonArc 2.6.24.

Top of Page