EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Using SecureBlackbox/ElHTTPSClient in our project conditions

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.
#964
Posted: 08/08/2006 12:31:08
by Albert Schmidt (Basic support level)
Joined: 08/08/2006
Posts: 2

Hi Eugene,

I'm just started searching for library to build client part of our SSL application.
It must support handling of both HTTP(S) and raw SSL.
What we need is async raw data sending/receiving and async sending of HTTP/HTTPS requests,
SOCKS, Proxy tunneling, ability to make both raw SSL connections or HTTP/HTTPS requests.
There is some details, so which I have some main questions.

How to eslablish SSL connection using ElHTTPSClient without sending HTTP request?
If it is possible, can I use SendData/OnData to asynchronously send/receive data whith that established connection?

Assume I established a persistent plain-HTTP connection to my server,
and we are not closing it. How can I asynchrounously send both /raw data/ or /http requests/ whithin that connection?

All that stuff must use non-blocking sockets, or blocking sockets with multithreading in library.
We don't need to care about main thread blocking.

I need an advice on how to build such application with SBB most correctly and effectively.
Maybe in common with some other libs (Indy,ICS,..).

#965
Posted: 08/08/2006 12:58:41
by Eugene Mayevski (EldoS Corp.)

Quote
Albert Schmidt wrote:
How to eslablish SSL connection using ElHTTPSClient without sending HTTP request?


Use TElSimpleSSLClient instead. ElHTTPSClient is a descendant of TElSimpleSSLClient which adds HTTP(S).

Quote
Albert Schmidt wrote:
Assume I established a persistent plain-HTTP connection to my server,
and we are not closing it. How can I asynchrounously send both /raw data/ or /http requests/ whithin that connection?


I can hardly imagine such situation and I think that in this case you need create and parse HTTP requests/responses yourself. An alternative would be to create a proxy (to which the HTTP client will connect), but this can be a bit complicated. Not very much, but extra complexity is present...

Quote
Albert Schmidt wrote:
All that stuff must use non-blocking sockets, or blocking sockets with multithreading in library.


SimpleSSLClient (and ElHTTPSClient consequently) works in blocking mode, so you would need to run it within a thread.


Sincerely yours
Eugene Mayevski
#967
Posted: 08/08/2006 16:13:38
by Albert Schmidt (Basic support level)
Joined: 08/08/2006
Posts: 2

Quote
Use TElSimpleSSLClient instead. ElHTTPSClient is a descendant of TElSimpleSSLClient which adds HTTP(S).

Is there any way to access parent TElSimpleSSLClient in ElHTTPSClient so we can use functionality of it?

Quote
I can hardly imagine such situation and I think that in this case you need create and parse HTTP requests/responses yourself.

I know that we can solve it like that if only we can send data.
I actually can do this with Indy where it's provides access to all parent classes such as
TIdContext->TIdTCPConnection. When we do GET method connection is then established,
server part didn't close it, and we can use all TIdTCPConnection functionality to send data.
But you say ElHTTPSClient and TElSimpleSSLClient are blocking...

Quote
SimpleSSLClient (and ElHTTPSClient consequently) works in blocking mode, so you would need to run it within a thread.

I thought wrong that there is some internal threading stuff in SBB like in Indy. I began with demo application with non-blocking mode, now I see its based on VCL sockets.

Thanks for your reply.
#970
Posted: 08/09/2006 00:56:00
by Eugene Mayevski (EldoS Corp.)

Quote
Albert Schmidt wrote:
Is there any way to access parent TElSimpleSSLClient in ElHTTPSClient so we can use functionality of it?


No, and this doesn't make any sense -- HTTPSClient relies on being an owner of the socket, i.e. it will not work properly if you send some data there.

Quote
Albert Schmidt wrote:
I began with demo application with non-blocking mode, now I see its based on VCL sockets.


This is not correct. There are various samples for various socket classes. But as said TElSimpleSSLClient class has it's own blocking socket.


Sincerely yours
Eugene Mayevski

Reply

Statistics

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