Error Attempted to read or write Protected memory - WeOnlyDo Discussion board

Error Attempted to read or write Protected memory (wodFtpDLX / wodFtpDLX.NET)

by cassy34, Thursday, July 28, 2016, 11:39 (2827 days ago)

Hi,

I'm experiencing an issue with wodFtpDLX and WODSSHKeyLib

xmlkey = New WODSSHKeyLib.Keys
Ftp1.LicenseKey = "XXXX-XXXX-XXXX-XXXX"

Ftp1.Blocking = True
Ftp1.Hostname = txtHostName.Text
Ftp1.Login = txtLogin.Text
Ftp1.Port = System.Convert.ToInt32(txtPort.Text)
If Me.txtKeyFile.Text.Length > 0 Then
Ftp1.Authentication = WeOnlyDo.Client.Authentications.PublicKey
xmlkey.Load(txtKeyFile.Text, "")
Dim a As String
a = xmlkey.ToXmlString(WODSSHKeyLib.SSHKeyTypes.RSAkey, True)
Ftp1.PrivateKey = a
Else
Ftp1.Authentication = WeOnlyDo.Client.Authentications.Password
Ftp1.Password = txtPassword.Text
End If

The rsa key was generated on a linux platform using ssh-keygen -y rsa

The error coming back is "Error: Attempted to read or write protected memory at WODSSHKeyLib.KeyClass.ToXMLString(SSHKeyTypes KeyType,Boolean IncludePrivate)

We are using version 1.0.0 of WODSSHKeyLib

I have converted the generated rsa key via putty to a .ppk files and have successfully logged into the linux server using WINSCP. I think it might be the structure of the RSA key that is at fault, but not sure how to fix it.


Complete thread: