putty now uses credential record

This commit is contained in:
David Sparer
2017-01-27 09:42:04 -07:00
parent 03da5b3cf1
commit 6e8e1ad74b

View File

@@ -6,6 +6,7 @@ using System.Diagnostics;
using System.Drawing;
using System.Threading;
using System.Windows.Forms;
using mRemoteNG.Security;
using mRemoteNG.Security.SymmetricEncryption;
@@ -68,9 +69,9 @@ namespace mRemoteNG.Connection.Protocol
var username = "";
var password = "";
if (!string.IsNullOrEmpty(InterfaceControl.Info.Username))
if (!string.IsNullOrEmpty(InterfaceControl.Info.CredentialRecord?.Username))
{
username = InterfaceControl.Info.Username;
username = InterfaceControl.Info.CredentialRecord?.Username;
}
else
{
@@ -84,9 +85,9 @@ namespace mRemoteNG.Connection.Protocol
}
}
if (!string.IsNullOrEmpty(InterfaceControl.Info.Password))
if (!string.IsNullOrEmpty(InterfaceControl.Info.CredentialRecord?.Password.ConvertToUnsecureString()))
{
password = InterfaceControl.Info.Password;
password = InterfaceControl.Info.CredentialRecord?.Password.ConvertToUnsecureString();
}
else
{