|
|
sybperl-l Archive
Up Prev Next
From: Michael Peppler <mpeppler at peppler dot org>
Subject: Re: Does DBD::SYBASE support CS_SEC_ENCRYPTION
Date: Sep 24 2004 4:24PM
On Fri, 2004-09-24 at 18:15, Rob Chevalier wrote:
> Using Sybperl/ctlib, I used to set the following for encryption...
>
> {CON_PROPS => { CS_SEC_ENCRYPTION => 1 }}
>
> But now I'm starting to use DBD::Sybase and am wondering if the following
> code is equivalent:
>
> $dbh->DBI->connect("dbi:Sybase:encryptPassword=1", $user, $password);
>
> I'm assuming that it's not and am wondering if there is any way to set the
> ctlib 'CS_SEC_ENCRYPTION' connection property when using DBD:Sybase.
Actually it *is* equivalent.
>From dbdimp.c:
if(imp_dbh->encryptPassword[0] != 0) {
int i = CS_TRUE;
if((retcode = ct_con_props(connection, CS_SET, CS_SEC_ENCRYPTION,
(CS_VOID*)&i,
CS_UNUSED, (CS_INT*)NULL)) != CS_SUCCEED)
{
warn("ct_con_props(CS_SEC_ENCRYPTION, true) failed");
return 0;
}
}
Michael
--
Michael Peppler Data Migrations, Inc.
mpeppler@peppler.org http://www.peppler.org/
Sybase T-SQL/OpenClient/OpenServer/C/Perl developer available for short or
long term contract positions - http://www.peppler.org/resume.html
|