EldoS | Feel safer!

Software components for data protection, secure storage and transfer

SimpleSSHClient Sample -- internally trap auth. error dialog

Also by EldoS: CallbackDisk
Create virtual disks backed by memory or custom location, expose disk images as disks and more.
#247
Posted: 05/17/2006 12:04:47
by Donald Benkendorf (Standard support level)
Joined: 05/17/2006
Posts: 20

Using SimpleSSHClient sample program - Borland C++ Builder version 5, with SecureBlackbox 4.4.84 Pre-Release version.
Added Keyboard authentication, and using Password auth., also. Can't figure out how to trap the authentication error internally at higher level, so doesn't generate dialog box ?
#249
Posted: 05/17/2006 12:26:35
by Eugene Mayevski (EldoS Corp.)

Did you search for the message in the code?
There's no dialog box, but a line in the log, put from TForm1::HandleClientAuthenticationFailed() method.


Sincerely yours
Eugene Mayevski
#250
Posted: 05/17/2006 12:44:12
by Donald Benkendorf (Standard support level)
Joined: 05/17/2006
Posts: 20

Yes, I searched all files in project, and couldn't find
anything. Following is my TForm1::HandleClientAuthenticationFailed() method :

void __fastcall TForm1::HandleClientAuthenticationFailed(System::TObject* Sender, int AuthType)
{ Memo2->Lines->Add(AnsiString::Format("Authentication failed, AuthType= %d", ARRAYOFCONST((AuthType))));
}
#251
Posted: 05/17/2006 12:52:09
by Donald Benkendorf (Standard support level)
Joined: 05/17/2006
Posts: 20

[img]f:\dialog_box.jpg[/img]
#252
Posted: 05/17/2006 13:04:15
by Eugene Mayevski (EldoS Corp.)

Unfortunately there's no screenshot here. I will allow loading of images as attachments so that you can attach it.


Sincerely yours
Eugene Mayevski
#253
Posted: 05/17/2006 13:06:56
by Donald Benkendorf (Standard support level)
Joined: 05/17/2006
Posts: 20

Following is what comes out in the "Log window" :
Client socket connected
Server key [8F9F0FD7F053C49C7FEA19EEDE581F6D] received
Authentication failed, AuthType= 4
Error 114
Connection closed.

This is immediately followed by modal display of dialog box with title bar "Sshdemo", message text = "SSH connection failed due to error (114)", and a single "OK"-button, i.e. to discharge the dialog...

#254
Posted: 05/17/2006 13:07:57
by Eugene Mayevski (EldoS Corp.)

Done. Now you can attach jpg screenshot.


Sincerely yours
Eugene Mayevski
#255
Posted: 05/17/2006 13:17:21
by Donald Benkendorf (Standard support level)
Joined: 05/17/2006
Posts: 20

When I try to "Load attachment" of either a Word (.Doc) or JPG (.jpg), I get the error message: "Incorrect file type or maximum size of the file exceeded (.jpg)!", in red.
By the way, I searched the executable also, and the text wasn't there....
#256
Posted: 05/17/2006 13:49:00
by Donald Benkendorf (Standard support level)
Joined: 05/17/2006
Posts: 20

When the IDE excepts, the call stack shows:
7C59BBF3 C:\WINNT\system32\KERNEL32.dll
00496DA9 Sbsimplessh::TElSimpleSSHClient::Open
004020EF TForm1::ClientSocket1Connect(this=:00D52950, Sender=:00D580BC, Socket=:00D58144)
004EACD5 Scktcomp::TCustomSocket::Event(Self=:00D580BC, Socket=:00D58144, SocketEvent=2 /* seConnect */)
004EA93A Scktcomp::TAbstractSocket::DoEvent(Self=:00D580BC, Sender=:00D58144, Socket=:00D58144, SocketEvent=2 /* seConnect */)
004EA139 Scktcomp::TCustomWinSocket::Event(Self=:00D58144, Socket=:00D58144, SocketEvent=2 /* seConnect */)
004EA89D Scktcomp::TClientWinSocket::Connect(Self=:00D58144, Socket=2604)
004E9AEF Scktcomp::TCustomWinSocket::CMSocketMessage(Self=:00D58144, Message=:0012FE28)
004EA698 Scktcomp::TCustomWinSocket::WndProc(Self=:00D58144, Message=:0012FE28)
0050443E Forms::StdWndProc(Window=9310838, Message=1025, WParam=2604, LParam=16)
77E3A420 C:\WINNT\system32\USER32.dll
77E14605 C:\WINNT\system32\USER32.dll
77E15B77 C:\WINNT\system32\USER32.dll
0050EEC4 Forms::TApplication::HandleMessage(Self=:00D52294)
0050F14A Forms::TApplication::Run(Self=:00D52294)
0040130B WinMain( =:00400000, =NULL, =:00133180, =9)
00545653 __startup

Part of Event Log is :
Thread Start: Thread ID: 0x0000156C. Process SSHDemo.exe (0x318)
Source Breakpoint at 0x00401AE2: C:\Program Files\EldoS\SecureBlackbox\Samples\SSH\Client\BCB\SimpleSSH\MainForm.cpp line 80. Process SSHDemo.exe (0x318)
Source Breakpoint at 0x00401AE2: C:\Program Files\EldoS\SecureBlackbox\Samples\SSH\Client\BCB\SimpleSSH\MainForm.cpp line 80. Process SSHDemo.exe (0x318)
First chance exception at 0x7C59BBF3 . Exception class EElSimpleSSHClientException with message 'SSH connection failed due to error (114)'. Process SSHDemo.exe (0x318)
#257
Posted: 05/17/2006 14:11:35
by Eugene Mayevski (EldoS Corp.)

Attachments - this seems to be a bug in Forum engine. Will report to developers.

Regarding the exception -- most likely the dialog is shown by IDE itself. All you need to do is ignore this exception. To do this add EElSimpleSSHClientException to the list of exceptions to ignore. See Main Menu -> Tools -> Debugger Options -> Language exceptions in IDE


Sincerely yours
Eugene Mayevski
Also by EldoS: CallbackFilter
A component to monitor and control disk activity, track file and directory operations (create, read, write, rename etc.), alter file data, encrypt files, create virtual files.

Reply

Statistics

Topic viewed 14563 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!