Code segment, using keys - WeOnlyDo Discussion board

Code segment, using keys (wodSFTP / wodSFTP.NET / wodSFTPdll)

by scotstyer, Monday, November 14, 2011, 15:45 (4545 days ago)

I'm trying to implement keys within powerbuilder
you have a code segment that says

ftp1.hostname = your_hostname
ftp1.authentication = authCertificate
ftp1.login = your_login
ftp1.protocol = SFTP
ftp1.connect

I don't see where in that code segment, SFTP and authCertificate
are defined
the code segment, I'm talking about is
http://www.weonlydo.com/index.asp?kb=1&View=entry&EntryID=50

can you give me some ideas?

Re: Code segment, using keys

by wodDamir, Monday, November 14, 2011, 16:05 (4545 days ago) @ scotstyer

Hi,

Please check the following article:

http://www.weonlydo.com/index.asp?kb=1&View=entry&EntryID=80

It shows how to initiate wodCertificate object. Once initialized, you need to use Load method to load the key, and pass the object reference back to wodFtpDLX.Certificate property.

Can you please try something like that?

Regards,
Damba

Re: Code segment, using keys

by scotstyer, Monday, November 14, 2011, 16:27 (4545 days ago) @ wodDamir

Hi,

Please check the following article:

http://www.weonlydo.com/index.asp?kb=1&View=entry&EntryID=80

It shows how to initiate wodCertificate object. Once initialized, you need to use Load method to load the key, and pass the object reference back to wodFtpDLX.Certificate property.

Can you please try something like that?

Regards,
Damba


Does this syntax appear to be correct?
to validate using keys

OLEObject ole_cer

ole_cer = CREATE oleobject
ole_cer.ConnectToNewObject( WeOnlyDo.Certificate.1 )
ole_cer.loadkey( c:jmskey.txt )


ole_ftp.object.hostname = ftp_site
ole_ftp.object.login = ftp_acc
ole_ftp.object.certificate = ole_cer
ole_ftp.object.authentication = 2
ole_ftp.object.transfermode = 0
ole_ftp.object.blocking = 0
ole_ftp.object.protocol = 1
ole_ftp.object.compression = 6
ole_ftp.object.passive = 1
ole_ftp.object.port = 22

Re: Code segment, using keys

by woddrazen, Monday, November 14, 2011, 16:40 (4545 days ago) @ scotstyer

Hi,


Yes, this looks like correct syntax.


Drazen