EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Do you have any samples which uses SocketAsyncEventsArgs ?

Posted: 11/03/2011 02:38:42
by Thowfiq Raja (Basic support level)
Joined: 11/03/2011
Posts: 4

HI Eugene Mayevski/Ken.

Its follow up with the MSDN post http://social.msdn.microsoft.com/Forums/en-GB/netfxnetcom/thread/0260ec6a-70b1-492c-9737-52301f69cd78

For my question "Do you have any samples which uses SocketAsyncEventsArgs ?" i got the following answer from Ken
" extend a project utilizing .NET sockets with SSL support is to replace all the System.Net.Sockets.Socket objects with client- or server-side SSLBlackbox descendant (e.g. SecureBlackbox.SSLSocket.Server.ElServerSSLSocket) throughout the project".

how can i authorize the client using ElServerSSLSocket? just by replacing the socket with ElServerSSLSocket.

we assign socket to socketEventArg.UserToken and we will define eventhandler for IO completion and in that event we will perform ProcessConnect or ProcessReceive or ProcessSend based on the LastOperation. and use socketEventArg buffer attribute for sending and receiving data.

How can we achieve all these just by replacing socket with ElServerSSLSocket?

Posted: 11/03/2011 05:17:14
by Ken Ivanov (Team)

Thank you for contacting us.

Use the properties and events exposed by ElServerSSLSocket to configure SSL-specific properties of the component. Particularly, handle the OnCertificateValidate event to intercept certificates provided by the clients in order to validate them.

You might also get some guidance from the SSLSocket sample shipped with the distribution (Samples\C#\SSLBlackbox\Server\SSLSocketDemo\).
Posted: 11/04/2011 02:48:22
by Thowfiq Raja (Basic support level)
Joined: 11/03/2011
Posts: 4

Hi Innokentiy Ivanov,
Thanks for your reply. i have checked the code. But i am not able to understand. How do i use the sample project of SocketAsyncEventArgs given in the following link with ElServerSSLSocket? http://www.codeproject.com/KB/IP/socketasynceventargs.aspx

Posted: 11/04/2011 03:28:50
by Vsevolod Ievgiienko (Team)

ElServerSSLSocket has the same or similar methods as System.Net.Sockets.Socket. You can also access underlying System.Net.Sockets.Socket object using ElServerSSLSocket.Socket property. Please read our documentation http://www.eldos.com/documentation/sb...ocket.html where you can find detailed description of the class.
Posted: 11/04/2011 05:08:24
by Thowfiq Raja (Basic support level)
Joined: 11/03/2011
Posts: 4

Hi Vsevolod Ievgiienko,
thanks for the reply. i will try build that. Can i use Microsoft certification store?
Posted: 11/04/2011 05:14:08
by Vsevolod Ievgiienko (Team)

Can i use Microsoft certification store

Yes you can do this using our TElWinCertStorage class.
Posted: 11/09/2011 23:42:03
by Thowfiq Raja (Basic support level)
Joined: 11/03/2011
Posts: 4

Do you have any samples for TElWinCertStorage?
Posted: 11/10/2011 01:39:29
by Ken Ivanov (Team)

1) Yes, there is a a CertDemo sample (%SAMPLES%\C#\PKIBlackbox\CertDemo) which, in particular, illustrates the use of TElWinCertStorage class.

2) If you only need to validate provided certificates against a collection of system stores (CA, ROOT), TElX509CertificateValidator might be a better choice. It is pretty straightforward to use - set up a bunch of boolean properties and call the Validate() method.
Posted: 11/10/2011 01:41:22
by Vsevolod Ievgiienko (Team)

Yes. \EldoS\SecureBlackbox.NET\Samples\C#\PKIBlackbox\CertDemo demo shows how to use.



Topic viewed 1699 times

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


Back to top

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

Got it!