EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Visual C++/MFC sample using CElSecureAsyncSocket

Also by EldoS: BizCrypto
Components for BizTalk® and SQL Server® Integration Services that let you securely store and transfer information in your business automation solutions.
#24177
Posted: 03/19/2013 11:19:53
by Chris Moor (Basic support level)
Joined: 03/19/2013
Posts: 6

I've just started evaluating SecureBlackBox with a view to implementing a simple SSL client in some existing software.

This software is written in Visual C++, using MFC

However none of the samples seem to be relevant, and I have been unable to get them to compile anyway

I have found the files ElSecureAsyncSocket.cpp/h, which appear to contain a class I could use, since it is derived from CAsyncSocket, which I already use.

Firstly it doesn't seem to appear in any of the samples.

Secondly it includes the file SSLBBoxCli.h, which I can't find. I can find SSLBBoxCli10.h, but including that produces masses of errors (e.g. identifier TxSBVersion not found)

Finally there are also masses of errors coming from the Cpp file - for example undefined functions such as SBSSLCliInitialize

Can someone help ?
#24178
Posted: 03/19/2013 11:24:01
by Ken Ivanov (EldoS Corp.)

Dear Chris,

Support for DLL edition of SecureBlackbox had been dropped some time ago, sorry. Please consider using the Library Edition of the product, which includes up-to-date and highly-efficient SSL socket implementation.
#24179
Posted: 03/19/2013 11:27:03
by Eugene Mayevski (EldoS Corp.)

To add to Ken, Library edition contains an implementation of TElSimpleSSLClient component which incorporates socket and SSL functionality inside. Samples and docs for Library edition are lagging behind, but we will help you to get everything running.

It is possible to use ActiveX controls in C++, but this way is painful and we don't recommend using it.

Also, can you please tell us the way you have come to ActiveX edition and the classes you mentioned? I.e. was there something on our site that indicated that ActiveX/DLL is a right way to go? We would need to correct this not to mislead people in future and direct them to Library edition instead.


Sincerely yours
Eugene Mayevski
#24182
Posted: 03/19/2013 12:23:22
by Chris Moor (Basic support level)
Joined: 03/19/2013
Posts: 6

Thanks for the quick response

To be honest I have been thrashing about a bit. I think the files I mentioned were in the file Secbboxax.zip, which I found somewhere on your site. When I found the class derived from ASyncSocket it seemed to be what I needed.

I actually started with the Library edition, but didn't find it obvious where to start - ok Help\documentation\index.html is fairly obvious, but not exactly user-friendly.

I looked at the samples - FTPS, PDF, SFTP and SSH but no SSL. Furthermore I don't know where to start with those files. I may have done 15 years ago, but have been using Visual Studio for so long that I've forgotten.

I can see the documentation for TEISSLClient and TEISimpleClient, but it's difficult for me to see where to start or what the differences between them are.

I do have experience of writing and using COM DLLs (never sure of the distiction with Activex), so would be prepared to go down that route for implementation.

Have to admit I've never used the "namespace" definition, so it be that you assume people will be familar with stuff that is unknown to me.

Cheers

Chris
#24183
Posted: 03/19/2013 12:28:07
by Chris Moor (Basic support level)
Joined: 03/19/2013
Posts: 6

Oh, and can I just point out that you documentation contains references to the files SSLBBoxCli.dll, SSLBBoxCli6.dll etc. Is this all in libsbb.dll now, as those other files aren't included in the zip.
#24184
Posted: 03/19/2013 12:52:08
by Chris Moor (Basic support level)
Joined: 03/19/2013
Posts: 6

And finally for tonight (here in the UK) I have tried to use the MFC Class wizard to Add Class from ActiveX Control, namely libsbb.dll

I get the error "No type library found in file: ..."

I don't know whether this is standard practice, but I distribute a .tlb file with my COM object.
#24188
Posted: 03/20/2013 05:43:51
by Ken Ivanov (EldoS Corp.)

Hello Chris,

Unfortunately, documentation for the Library Edition is still in development, as well as the sample projects are. Yet, we expect that most of the samples will be available within a two months time. As Eugene said, we will do our best to compensate the lack of the out-of-the-box guidance by providing you with extensive technical support here in the forum.

So, to summarize, there are two paths you can go by:

1. Use the Library edition. This consists of a Win32 DLL providing SecureBlackbox functionality via DLL exports, and a set of wrapper classes working on top of that DLL. With the help of the wrapper classes you can use SecureBlackbox in C++ in object oriented way.

2. Use the ActiveX edition. This consists of a set of COM/ActiveX components that can be used via standard VC++ COM framework.

The general benefit of the Library edition comparing to the ActiveX edition is that the former is a bit more ahead by a feature list. Yet, if your task is limited with SSL socket functionality and does not involve sophisticated sub-tasks such as deep certificate validation, ActiveX edition will also cope with it just fine.

So just let us know which path you wish to stick to, and we will start helping you move in that direction.

Quote
Oh, and can I just point out that you documentation contains references to the files SSLBBoxCli.dll, SSLBBoxCli6.dll etc. Is this all in libsbb.dll now, as those other files aren't included in the zip.

The SecureBlackbox documentation provides guidance to all the existing editions of the product, so it may contain pieces of information unrelated to the particular edition you are using. The libsbb.dll library belongs to the Library edition, while all the *BBox*.dll's are from the ActiveX edition.

Quote
And finally for tonight (here in the UK) I have tried to use the MFC Class wizard to Add Class from ActiveX Control, namely libsbb.dll
I get the error "No type library found in file: ..."

libsbb.dll does not contain any ActiveX controls (its the Library edition's shared library, a generic Win32 DLL). You will find the ActiveX controls in the ActiveX edition if you decide to proceed with the ActiveX route.
#24192
Posted: 03/20/2013 07:01:34
by Chris Moor (Basic support level)
Joined: 03/19/2013
Posts: 6

Morning

Whilst I don't think I need the extra functionality in the Library edition, I sense that would be the better approach to take, so lets go with that

I'm also more than happy to share my test program with you if you want to use that as a sample once we've got it working

So, I got a very simple, dialog based client program which opens a socket (derived from CAsyncSocket, but with a number of additions) to my server app.

How do I start to add SSL ?
#24197
Posted: 03/20/2013 08:32:32
by Dmytro Bogatskyy (EldoS Corp.)

To use Library edition with Microsoft Visual C++ you would need:

1. Build a static library from *.cpp wrapper files.
For this you would need to run:
"SecBBoxLib_Folder\WrapperSources\Makefile.cmd vc"

The script finds and uses the latest version of VC++. If you installed VC++ in a different location than the default "Program Files (x86)" or "Program Files" then you would need to set VC_PATH environment variable with a correct path.
By default a static library is build with "Multi-threaded DLL (/MD)" option on. If you are building your application, for example, with "Multi-threaded (/MT)" option, then you need to set TGT environment variable with "STATIC" value, or to modify CPPFLAGS variable in Makefile.vc file.

2. To use a static library you would need to modify configuration properties of your project in the following way:
for Include Directories (IncludePath) option add "SecBBoxLib_Folder\WrapperSources\include\all;SecBBoxLib_Folder\WrapperSources\include"
for Library Directories (LibraryPath) option add "SecBBoxLib_Folder\WrapperSources\"
for Additional Dependencies option add "libsbbimp.lib"
Then you would need to copy or specify path for dll: "SecBBoxLib_Folder\Libraries\All\Win32\libsbb.dll"
#24201
Posted: 03/20/2013 12:26:22
by Chris Moor (Basic support level)
Joined: 03/19/2013
Posts: 6

Sorry for the delay in replaying

I've done all that and have a created a libsbbimp.lib file

What next ?

I'm sorry if I'm being a bit thick, but I really can't find anything in the documentation to help me
Also by EldoS: MsgConnect
Cross-platform protocol-independent communication framework for building peer-to-peer and client-server applications and middleware components.

Reply

Statistics

Topic viewed 4335 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!