Re: [twsocket] TWSocket and SSL

2011-01-14 Thread Francois PIETTE

Hello Daniel,

I think you first need a little background knowledge about SSL and then you 
can apply it with ICS components.


You should probably read the book (or at least parts of it): "Network 
security win OpenSSL" by John Viega, matt Messier & Pravir Chandra. 
O-Reilly. ISBN 0-596-00270-X. You can find it on Amazon and in any good book 
store.
This book is very interesting for you because ICS-SSL is based on OpenSSL. 
ICS-SSL components hide the complexity of OpenSSL programming, nevertheless, 
the fundamental information is the same. Just skip any code section.


--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be


- Original Message - 
From: "daniel cc" 

To: "ICS support mailing" 
Sent: Thursday, January 13, 2011 9:41 PM
Subject: Re: [twsocket] TWSocket


Yeah,
Many thanks Arno :)
Rebuilding did help.

How about the SSL keys and the certificate?
How do I use the keys in both locations (server and client), where do I copy
the keys, how do I build keys?

Thanks in advance

-daniel

-Original Message- 
From: Arno Garrels

Sent: Thursday, January 13, 2011 10:12 PM
To: ICS support mailing
Subject: Re: [twsocket] TWSocket

daniel cc wrote:

Hi,
I have got everythíng needed but still can't run the demos,
do I need to register the dll files?


No, "rebuild" the project, just a "compile" is not enough.
Whenever a conditial define changed you have to (re)build
the project, sometimes even that does not work, in such cases
(re)build the package first.

--
Arno Garrels
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be 


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] TWSocket and SSL

2011-01-14 Thread daniel cc

Hi Francois,
Thanks for the response :)
I don't have the book yet but I have already collected some info.

Here are few unclear things,
1) Do I need to install the OpenSSL to the machine?
2) How do I use the batch file for making the keys, the batch file is made 
by you and it is founded in SSL directory of the component, this batch file 
looks real good but how it works?
3) How  do I set the keys for each client and where do I keep the keys in 
the server?
4) How about the root certificate, where do I keep it, in my server 
directory?


You see,
I need to first understand the basic things about the component and will go 
for the secrets of SSL after that :)


Thanks in advance

With best regards

-daniel

-Original Message- 
From: Francois PIETTE

Sent: Friday, January 14, 2011 11:12 AM
To: ICS support mailing
Subject: Re: [twsocket] TWSocket and SSL

Hello Daniel,

I think you first need a little background knowledge about SSL and then you
can apply it with ICS components.

You should probably read the book (or at least parts of it): "Network
security win OpenSSL" by John Viega, matt Messier & Pravir Chandra.
O-Reilly. ISBN 0-596-00270-X. You can find it on Amazon and in any good book
store.
This book is very interesting for you because ICS-SSL is based on OpenSSL.
ICS-SSL components hide the complexity of OpenSSL programming, nevertheless,
the fundamental information is the same. Just skip any code section.

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be


- Original Message - 
From: "daniel cc" 

To: "ICS support mailing" 
Sent: Thursday, January 13, 2011 9:41 PM
Subject: Re: [twsocket] TWSocket


Yeah,
Many thanks Arno :)
Rebuilding did help.

How about the SSL keys and the certificate?
How do I use the keys in both locations (server and client), where do I copy
the keys, how do I build keys?

Thanks in advance

-daniel

-Original Message- 
From: Arno Garrels

Sent: Thursday, January 13, 2011 10:12 PM
To: ICS support mailing
Subject: Re: [twsocket] TWSocket

daniel cc wrote:

Hi,
I have got everythíng needed but still can't run the demos,
do I need to register the dll files?


No, "rebuild" the project, just a "compile" is not enough.
Whenever a conditial define changed you have to (re)build
the project, sometimes even that does not work, in such cases
(re)build the package first.

--
Arno Garrels
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be 


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] TWSocket and SSL

2011-01-14 Thread Francois PIETTE

I don't have the book yet but I have already collected some info.
Here are few unclear things,
1) Do I need to install the OpenSSL to the machine?


Yes, but this is simply copying the two OpenSSL DLL

2) How do I use the batch file for making the keys, the batch file is made 
by you and it is founded in SSL directory of the component, this batch 
file looks real good but how it works?


You  need the book to get the command line utility syntax.

3) How  do I set the keys for each client and where do I keep the keys in 
the server?


You don't need a key per client on the server.

4) How about the root certificate, where do I keep it, in my server 
directory?


Open OverbyteIcsWSocket.pas and search for "Reference guide" in the 
comments.


--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] SslWSocketServer Send and receive

2011-01-14 Thread daniel cc
Hi guys,
1) I need to send from SslWSocketServer to SslWSocket,
- Files (upload and download)
- Commands. Commands are just text lines like: change IP Address, change 
display resolution, reboot the machine ETC.

2) I need to send from SslWSocket to SslWSocketServer,
- Files (upload and download)
- Commands. Commmands are just text lines like: CPU temp is: 60%, HDD space 
left: 10% ETC.

Please notice!!
I am not asking you to tell about how to change the ip address or how to get 
CPU temp.
I just need to know about how to send the message and how to receive the 
message.
How to upload the file and how to download the file.

Thanks in advance

Best regards

-daniel
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] SslWSocketServer Send and receive

2011-01-14 Thread Francois PIETTE

1) I need to send from SslWSocketServer to SslWSocket,


A socket server cannot send any data to a client. The client has first to 
establish the communication with the server. At server side, a new socket is 
instanciated by SslWSocketServer to handle the communication with that 
client. Then once the connection is open, it is working in both directions. 
A server has to wait until the client connect. That's exactly what make a 
server a server: passively waiting for client connection.



- Files (upload and download)
- Commands. Commands are just text lines like: change IP Address, change 
display resolution, reboot the machine ETC.


As far as the socket is concerned, files or commands is exactly the same 
thing. A socket with an established connection is a bidirectional 
transparent data stream. What you send at one end is received at the other 
end. To send a file, you read the file block by block and you send each 
block. You'd probably add some metadata in front of the file data so that 
the receiver know at least the file size and maybe filename, timestamp and 
so on. Basically that is what HTTP protocol is doing. You can reuse HTTP or 
design your own protocol.


Commands being simple text lines, the socket has a line mode which will 
facilitate your programming. When line mode is active, the socket will 
assemble incomming data into lines and trigger OnDataAvailable for each 
complete line no matter how it is spread into packets of various sizes.



2) I need to send from SslWSocket to SslWSocketServer,
- Files (upload and download)
- Commands. Commmands are just text lines like: CPU temp is: 60%, HDD 
space left: 10% ETC.


See above.

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] SslWSocketServer Send and receive

2011-01-14 Thread daniel cc

Thanks Francois,
Sorry for not making myself clear :(
I already know these.

How do I send text comand from server to the client  after it has 
established a connection to the server?

how do I do the same thing from client to the server?
for example: Server sends "Hello client" to the client and client answers 
"Hello server" to the server.

a little example perhaps?

And how do I do the same thing with the upload and download?
like server sends some file/files to the client and client sends some 
file/files to the server.

a little example?

Thanks in advance

-daniel

-Original Message- 
From: Francois PIETTE

Sent: Friday, January 14, 2011 11:23 PM
To: ICS support mailing
Subject: Re: [twsocket] SslWSocketServer Send and receive


1) I need to send from SslWSocketServer to SslWSocket,


A socket server cannot send any data to a client. The client has first to
establish the communication with the server. At server side, a new socket is
instanciated by SslWSocketServer to handle the communication with that
client. Then once the connection is open, it is working in both directions.
A server has to wait until the client connect. That's exactly what make a
server a server: passively waiting for client connection.


- Files (upload and download)
- Commands. Commands are just text lines like: change IP Address, change 
display resolution, reboot the machine ETC.


As far as the socket is concerned, files or commands is exactly the same
thing. A socket with an established connection is a bidirectional
transparent data stream. What you send at one end is received at the other
end. To send a file, you read the file block by block and you send each
block. You'd probably add some metadata in front of the file data so that
the receiver know at least the file size and maybe filename, timestamp and
so on. Basically that is what HTTP protocol is doing. You can reuse HTTP or
design your own protocol.

Commands being simple text lines, the socket has a line mode which will
facilitate your programming. When line mode is active, the socket will
assemble incomming data into lines and trigger OnDataAvailable for each
complete line no matter how it is spread into packets of various sizes.


2) I need to send from SslWSocket to SslWSocketServer,
- Files (upload and download)
- Commands. Commmands are just text lines like: CPU temp is: 60%, HDD 
space left: 10% ETC.


See above.

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be 


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be