Re: [twsocket] implementation of HTTP form POST method

2012-02-11 Thread Dimitris Botsis

On 11/2/2012 4:55 μμ, Arno Garrels wrote:

Dimitris Botsis wrote:

Hi all,
I am trying to develop a client using ICS in order to send form
parameters to a web server using POST method.
I found an example (Delphi\Internet\OverbyteIcsHttpPost) but when I
test it and think that POST to my test web server, it actually uses a
GET method, not POST.
I call a PHP script where I can handle if what is comes is via GET or
via POST. Is there some solution for that or any workarounds ?


You must be doing something wrong. I just tested the OverbyteIcsHttpPost
demo with an Apache server/PHP script.
Use a protocol analizer such as the free WireShark so see what's actually
sent.


OK thanks, I'll try to fix it.
--
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] implementation of HTTP form POST method

2012-02-11 Thread Dimitris Botsis

Hi all,
I am trying to develop a client using ICS in order to send form 
parameters to a web server using POST method.
I found an example (Delphi\Internet\OverbyteIcsHttpPost) but when I test 
it and think that POST to my test web server, it actually uses a GET 
method, not POST.
I call a PHP script where I can handle if what is comes is via GET or 
via POST. Is there some solution for that or any workarounds ?

Thank you
--
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] Merry Christmas

2011-12-24 Thread Dimitris Botsis

Καλά Χριστούγεννα και ευτυχισμένο το νέο έτος, από την Ελλάδα.

Merry Christmas and Happy new Year, from Greece.


On 24/12/2011 1:50 μμ, DZ-Jay wrote:

¡Feliz Navidad y un Hermoso y Próspero Año Nuevo!

(Merry Christmas and a Beautiful and Prosperous New Year!)

Best wishes to all from Florida, USA.

dZ.

On Dec 24, 2011, at 05:42, François Piette wrote:


Hi !



I wish a Merry Christmas to all of you and your families.



--

François Piette



--
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] remote SSL certificate verification

2011-09-01 Thread Dimitris Botsis

OK, everything is fine now.
But may I ask something strange (at least for me) I noticed ?
When I use following code to retrieve remote cert :

form1.SslHttpCli1.URL := 'https://';
form1.SslHttpCli1.Get;
form1.SslHttpCli1.SslContext.InitContext;

I have noticed that the event "OnSSLVerifyPeer", after every call I make 
to code above, on some sites event is fired 1 time, on other sites 2 
times, on other sites 4 times etc.
For example, when I call at https://www.facebook.com, event is fired 4 
times, all 4 instances have the same structure (of a certificate - 
TX509) but are not all of them always the same.


For example for https://www.facebook.com, I have following Serial 
Numbers return on each reply (notice: I make 1 call) :


1)
Serial Number: 1116160165 (0x428740a5)
Issuer: C=US, O=Entrust.net, OU=www.entrust.net/CPS incorp. by ref. 
(limits liab.), OU=(c) 1999 Entrust.net Limited, CN=Entrust.net Secure 
Server Certification Authority


2)
Serial Number: 1116160165 (0x428740a5)
Issuer: C=US, O=Entrust.net, OU=www.entrust.net/CPS incorp. by ref. 
(limits liab.), OU=(c) 1999 Entrust.net Limited, CN=Entrust.net Secure 
Server Certification Authority


3)
Serial Number: 08:51:f9:59:81:41:45:ca:bd:e0:24:e2:12:c9:c2:0e
Issuer: C=US, O=DigiCert Inc, OU=www.digicert.com, CN=DigiCert High 
Assurance EV Root CA


4)
Serial Number: 0c:6f:c8:59:57:fa:1f:5f:c9:67:2c:9f:e6:5c:db:e6
Issuer: C=US, O=DigiCert Inc, OU=www.digicert.com, CN=DigiCert High 
Assurance CA-3


Can you please explain that ?


On 1/9/2011 9:52 μμ, Dimitris Botsis wrote:

On 1/9/2011 9:48 μμ, Arno Garrels wrote:

Dimitris Botsis wrote:

Hi again,
I can read the certificate's Serial Number right, by parsing
"cert.GetRawText" at OnSSLVerifyPeer, but is it possible to read the
fingerprint too ?


The fingerprint isn't a value stored in the certificate but a
calculated one.
Methods Sha1Digest and Sha1Hex provide the Sha1 fingerprint, if you
need the MD5 hash or other properties derive your own class from
TX509Base.


Thank you
--
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] remote SSL certificate verification

2011-09-01 Thread Dimitris Botsis

On 1/9/2011 9:48 μμ, Arno Garrels wrote:

Dimitris Botsis wrote:

Hi again,
I can read the certificate's Serial Number right, by parsing
"cert.GetRawText" at OnSSLVerifyPeer, but is it possible to read the
fingerprint too ?


The fingerprint isn't a value stored in the certificate but a calculated one.
Methods Sha1Digest and Sha1Hex provide the Sha1 fingerprint, if you
need the MD5 hash or other properties derive your own class from
TX509Base.


Thank you
--
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] remote SSL certificate verification

2011-09-01 Thread Dimitris Botsis

Hi again,
I can read the certificate's Serial Number right, by parsing 
"cert.GetRawText" at OnSSLVerifyPeer, but is it possible to read the 
fingerprint too ?

I cannot find it in the rawtext I have, may I find it somewhere else ?
Thank you.

On 28/8/2011 8:42 πμ, Arno Garrels wrote:

Dimitris Botsis wrote:

Hi again,
from what I understand from you e-mails and tests I tried to do, the
certificate file has to exist locally, where my application that
checks it runs ?
Also in the sample "HttpsTst" cert file has to be provided locally,
isn't it ? Can it use a certificate from an https site being connected
on it ?

Please reply if the following is possible using ICS:
Suppose I want to make an application using ICS, where the application
will have a text box a button and a memo field.
In the the text box we can give any https address/website, press the
button to start check and in the memo field to have detailed
information about the certificate of the site checked.


In event OnSslHandShakeDone call PeerCert.GetRawText to display
the peer certificate as simple text (not available if a session was reused).
TX509Base also provides most common properties of a certificate
however not all are available.


For example, like when I open Firefox or any other browser, open an
https website and from (Firefox) Tools ->  Page info ->  Security ->
View certificate, everyone can see details about certificate.


That's exactly what the OverbyteIcsMsVerify demo demonstrates.



--
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] remote SSL certificate verification

2011-08-27 Thread Dimitris Botsis
I found the solution, setting "SSLVerifyPeer" to True for SSLHTTPCli's 
SSLContect and then reading the cert.

Thank you.

On 27/8/2011 11:18 μμ, Dimitris Botsis wrote:

Hi again,
from what I understand from you e-mails and tests I tried to do, the
certificate file has to exist locally, where my application that checks
it runs ?
Also in the sample "HttpsTst" cert file has to be provided locally,
isn't it ? Can it use a certificate from an https site being connected
on it ?

Please reply if the following is possible using ICS:
Suppose I want to make an application using ICS, where the application
will have a text box a button and a memo field.
In the the text box we can give any https address/website, press the
button to start check and in the memo field to have detailed information
about the certificate of the site checked.
For example, like when I open Firefox or any other browser, open an
https website and from (Firefox) Tools -> Page info -> Security -> View
certificate, everyone can see details about certificate.

Thank you

On 27/8/2011 9:25 μμ, Arno Garrels wrote:

Arno Garrels wrote:

use method PostConnection ..


Sorry typo, the method name is "PostConnectionCheck".



--
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] remote SSL certificate verification

2011-08-27 Thread Dimitris Botsis

Hi again,
from what I understand from you e-mails and tests I tried to do, the 
certificate file has to exist locally, where my application that checks 
it runs ?
Also in the sample "HttpsTst" cert file has to be provided locally, 
isn't it ? Can it use a certificate from an https site being connected 
on it ?


Please reply if the following is possible using ICS:
Suppose I want to make an application using ICS, where the application 
will have a text box a button and a memo field.
In the the text box we can give any https address/website, press the 
button to start check and in the memo field to have detailed information 
about the certificate of the site checked.
For example, like when I open Firefox or any other browser, open an 
https website and from (Firefox) Tools -> Page info -> Security -> View 
certificate, everyone can see details about certificate.


Thank you

On 27/8/2011 9:25 μμ, Arno Garrels wrote:

Arno Garrels wrote:

use method PostConnection ..


Sorry typo, the method name is "PostConnectionCheck".



--
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] remote SSL certificate verification

2011-08-27 Thread Dimitris Botsis

Thank you very much for all help and information.

On 27/8/2011 7:29 μμ, Arno Garrels wrote:

Dimitris Botsis wrote:

OK, let me explain what I want.
I want my client that connects over https to a server, before start
exchanging data with server, first to check if the certificate
provided by the server is the right one. I think there is a signature
in certificate which client will know, and verify if the certificate's
signature that is read from the server are the same.


I see, so this is the common procedure as shown in the demos
mentioned in one of my previous mails.

A certificate is always signed / issued by another certificate and it
can be quite a long chain from top level root certificate down to
the server certificate. The top level root certificate is always self-signed.
All you have to do is to provide the signing certificates you trust in
either the TSslContext.SslCAFile or TSslContext.SslCAPath so
OpenSSL finds them on certificate verification when it builds up
the chain. All certificates issued by these certificates are trusted
as well. Event OnSslVerifyPeer is triggered for each certificate
check, OnSslHandShakeDone triggers after the certificate
chain has been verified. When this was OK you use method
PostConnection of the peer certificate to check for DNS name
match. If you are new to SSL and OpenSSL you should read a
good book about that stuff first i.e.
"Network Security with OpenSSL" published by O'REILY.



--
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] remote SSL certificate verification

2011-08-26 Thread Dimitris Botsis

On 26/8/2011 2:29 μμ, Arno Garrels wrote:

Dimitris Botsis wrote:

"remotely" I mean that client must contact server in order to find
certificate and then verify it to see if it contains signature that
client expects in order to establish trusted connection. Thank you
for replying


I still do not understand. A client must always connect to a server
in order to receive its certificate (chain). Verification of the received
certificate can be done locally or remotely by sending it to an OCSP
server. Do you by any chance mean OCSP?
http://en.wikipedia.org/wiki/Online_Certificate_Status_Protocol

OCSP is not implemented in ICS, however if you use the Microsoft
Crypto API for certificate verification as shown in  demo
OverbyteIcsMsVerify  then Windows (Vista+) may use OCSP as well.


OK, let me explain what I want.
I want my client that connects over https to a server, before start 
exchanging data with server, first to check if the certificate provided 
by the server is the right one. I think there is a signature in 
certificate which client will know, and verify if the certificate's 
signature that is read from the server are the same.
And of course,  any other things that may be used so that the client to 
be sure that this is the right server or is not (not only based on IP 
address connected).

Thank you.
--
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] remote SSL certificate verification

2011-08-26 Thread Dimitris Botsis
"remotely" I mean that client must contact server in order to find certificate 
and then verify it to see if it contains signature that client expects in order 
to establish trusted connection.
Thank you for replying

26 Αυγ 2011, 11:00 π.μ., ο/η "Arno Garrels"  έγραψε:

> Dimitris Botsis wrote:
>> How can a client that connects with https verify the server's SSL
>> certificate remotely ?
> 
> What do you mean by "remotely"?
> 
> Take a look at two samples in the SslInternet folder:
> OverbyteIcsHttpsTst and OverbyteIcsMsVerify.
> 
> -- 
> 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

[twsocket] remote SSL certificate verification

2011-08-26 Thread Dimitris Botsis

Hi all,
can someone please help with this ?
How can a client that connects with https verify the server's SSL 
certificate remotely ?

Thank you.
--
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] UDP receive issue from a Windows service

2011-04-18 Thread Dimitris Botsis

On 18/4/2011 5:35 μμ, Francois PIETTE wrote:

I think that if you consider what I suggested before, might help you...
It maybe has to do with extra process time the debugger gives


Thanks for insisting.

Which extra process time do you mean ? The debugger has just to be
attached. No need to set any breakpoint nor single step. Just attach.
IMO, when a debugger is attached, the process is not slowed down.

I would also add that there is definetely no CPU time issue, nor network
I/O issue with the application. Every second, it send a single UDP
datagram (A SNMP get request) and expect a single UDP datagram (A SNMP
get reply). A single socket is used for both send and receive and
datagram fits in winsock receive buffer.

When the debugger is attached is it exactly the same like when it's not 
attached for the program being executed ?

OK then, my idea was that it's different.
Actually I work with some external hardware devices (USB / serial 
connected) that sometimes in the past performed like in the reported 
problem and the solution was to give some more available time to the 
program with Application.ProcessMessages. But when the debugger was 
attached, this solution was not needed and it always worked fine.
Anyway, my approach for the specific problem reported is more generic, 
not dealing at winsock level.

--
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] UDP receive issue from a Windows service

2011-04-18 Thread Dimitris Botsis

On 18/4/2011 5:12 μμ, Arno Garrels wrote:

Maurizio Lotauro wrote:

Maybe when you use the debugger then the application run undeer a
different user?


Not when the debugger is attached to a running process.
If the debugger spawns the process to be debugged with CreateProcess
then that might happen.


I think that if you consider what I suggested before, might help you...
It maybe has to do with extra process time the debugger gives
--
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] UDP receive issue from a Windows service

2011-04-18 Thread Dimitris Botsis

On 18/4/2011 2:34 μμ, Francois PIETTE wrote:

No idea, but that can't be a permission issue IMO. Receiving datagrams
in a service running as system works fine. Also attaching a debugger
doesn't change security context of the debugee.
What happens is that a new thread is created in the process being
debugged, maybe there's some issue with your multi-threading?


Maybe, but then why attaching a debugger would make things suddently work ?
I really don't know what to do since attaching a debugger solve the
issue. This really puzzles me !

The code for the service is the code I already used in other application
which works fine (using TCP altough).



I had a similar experience in the past, not with ICS components but 
generally working on a completely different project.
When project was running normally at some point did not work but when 
attaching a debugger then it would work.
The problem at that situation was that the program needed some time to 
be given for some external operations, so if a debugger was attached or 
a sleep was introduced or a "Application.Processmessages" command was 
introduced, then it could work.
I don't know if this solves the issue at your situation, but maybe it 
helps. Good luck.

--
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] Unsupported OpenSSL version

2011-04-15 Thread Dimitris Botsis

On 15/4/2011 5:00 μμ, William Sigmund wrote:

Hi,

I have been using ICS V7 with ssl, no problems. I have just rebuilt the project 
and see the message:

EIcsLibeayException "Unsupported OpenSSL version (0x0090600F). Supported 
versions are 0x0090805F - 0x009080EF
Filename ...LIBEAY32.DLL"

I have tried to define NO_OSSL_VERSION_CHECK but then ICS complains that it 
can't find the dll.

Is there a solution to this problme?

Thanks

Hi, I had the same problem, here is a link guys from here gave where you 
can find the proper DLLs :

http://wiki.overbyte.be/wiki/index.php/ICS_Download
--
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] Receive contents of remote text file over SSL

2011-04-12 Thread Dimitris Botsis

On 12/4/2011 8:36 μμ, Arno Garrels wrote:

Dimitris Botsis wrote:

Hi again,
what I try now is get the non-SSL OverByteIcsHttpDemo, and instead
"Go" button calling httpcli component, it calls an sslhttpcli
component (I also added a proper sslcontext component) so code became
:

procedure THttpToMemoForm.GoButtonClick(Sender: TObject);
var
 Data : TMemoryStream;
begin
 DisplayMemo.Clear;

 GoButton.Enabled := FALSE;
 Data := TMemoryStream.Create;
 try
 sslhttpcli1.URL:= URLEdit.Text;
 //httpcli1.Proxy  := ProxyEdit.Text;
 //httpcli1.ProxyPort  := '80';
 sslhttpcli1.RcvdStream := Data;
 sslhttpcli1.Get;
 LoadMemoFromMemoryStream(DisplayMemo, Data);
 finally
 Data.Free;
 GoButton.Enabled := TRUE;
 end;
end;

As URLEdit1.Text, I set the whole URL up to the file, so it's like :
https://www.mydomain.com/myfile.txt

Can someone please explain or find why this does not work ?


Show us your code in LoadMemoFromMemoryStream.
It makes no difference whether you use a TFile or TMemorystream.
Maybe you simply forgot to rewind the stream before the memo
loads it?

No, LoadMemoryFromMemoryStream is completely untouched and stream is 
being rewind. Code is exactly the same.
Now I set to sslhttcli component that I added, "SocksLevel" to 5 (was 0) 
and seems to get better but generally it seems rather unstable.
Additionally I have another problem since I want to load all the 
contents to a RichEdit but very often I get "Richedit Line insertion 
error" but while I used Thttpget (but without SSL support) for some 
months it worked without any problem.
I suppose I must search more to find solution using ICS - any 
help/instructions is appreciated.

Thank you.
--
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] Receive contents of remote text file over SSL

2011-04-12 Thread Dimitris Botsis

On 12/4/2011 7:18 μμ, Dimitris Botsis wrote:

On 12/4/2011 5:12 μμ, Dimitris Botsis wrote:

On 12/4/2011 5:04 μμ, Dimitris Botsis wrote:

On 12/4/2011 4:40 μμ, Arno Garrels wrote:

Dimitris Botsis wrote:

Hi again,

I use the example "OverbyteIcsHttpDmo". When I call the text file on
my web server using HTTP (as in the example) then I get the contents
OK. When I use HTTPS (having added proper sslhttpcli and sslcontect
components) the request is sent but don't get any contents back.
Any ideas ?


Does the server support HTTPS?
If yes, try with the OverbyteIcsHttpsTst demo in SslInternet folder.
If that works search for differences in your code, otherwise the demo
should log error messages.


Of course the server supports HTTPS, if I use web browser it's all OK.
I tried OverbyteIcsHttpsTst demo but without luck.
--
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




Sorry, it's OK - the example works fine.
I used some wrong predefined directives I had added and screw some
things before...
Thank you very much

--
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





Sorry again but there is still a small problem :
The example mentioned stores the downloaded remote file locally and then
(OnRequestDone) loads it again in order to display the contents of the
file in the TMemo.
I see that the whole "problem" is because of streams.
How can I have the same result like in example but without saving
transferred content to external file ?
I tried using MemoryStream or StringStream instead but whole think does
not work.
Thank you.

--
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




Hi again,
what I try now is get the non-SSL OverByteIcsHttpDemo, and instead "Go" 
button calling httpcli component, it calls an sslhttpcli component (I 
also added a proper sslcontext component) so code became :


procedure THttpToMemoForm.GoButtonClick(Sender: TObject);
var
Data : TMemoryStream;
begin
DisplayMemo.Clear;

GoButton.Enabled := FALSE;
Data := TMemoryStream.Create;
try
sslhttpcli1.URL:= URLEdit.Text;
//httpcli1.Proxy  := ProxyEdit.Text;
//httpcli1.ProxyPort  := '80';
sslhttpcli1.RcvdStream := Data;
sslhttpcli1.Get;
LoadMemoFromMemoryStream(DisplayMemo, Data);
finally
Data.Free;
GoButton.Enabled := TRUE;
end;
end;

As URLEdit1.Text, I set the whole URL up to the file, so it's like :
https://www.mydomain.com/myfile.txt

Can someone please explain or find why this does not work ?
It's exactly the same like non-SSL version.
Thank you.
--
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] Receive contents of remote text file over SSL

2011-04-12 Thread Dimitris Botsis

On 12/4/2011 5:12 μμ, Dimitris Botsis wrote:

On 12/4/2011 5:04 μμ, Dimitris Botsis wrote:

On 12/4/2011 4:40 μμ, Arno Garrels wrote:

Dimitris Botsis wrote:

Hi again,

I use the example "OverbyteIcsHttpDmo". When I call the text file on
my web server using HTTP (as in the example) then I get the contents
OK. When I use HTTPS (having added proper sslhttpcli and sslcontect
components) the request is sent but don't get any contents back.
Any ideas ?


Does the server support HTTPS?
If yes, try with the OverbyteIcsHttpsTst demo in SslInternet folder.
If that works search for differences in your code, otherwise the demo
should log error messages.


Of course the server supports HTTPS, if I use web browser it's all OK.
I tried OverbyteIcsHttpsTst demo but without luck.
--
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




Sorry, it's OK - the example works fine.
I used some wrong predefined directives I had added and screw some
things before...
Thank you very much

--
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





Sorry again but there is still a small problem :
The example mentioned stores the downloaded remote file locally and then 
(OnRequestDone) loads it again in order to display the contents of the 
file in the TMemo.

I see that the whole "problem" is because of streams.
How can I have the same result like in example but without saving 
transferred content to external file ?
I tried using MemoryStream or StringStream instead but whole think does 
not work.

Thank you.

--
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] Receive contents of remote text file over SSL

2011-04-12 Thread Dimitris Botsis

On 12/4/2011 5:04 μμ, Dimitris Botsis wrote:

On 12/4/2011 4:40 μμ, Arno Garrels wrote:

Dimitris Botsis wrote:

Hi again,

I use the example "OverbyteIcsHttpDmo". When I call the text file on
my web server using HTTP (as in the example) then I get the contents
OK. When I use HTTPS (having added proper sslhttpcli and sslcontect
components) the request is sent but don't get any contents back.
Any ideas ?


Does the server support HTTPS?
If yes, try with the OverbyteIcsHttpsTst demo in SslInternet folder.
If that works search for differences in your code, otherwise the demo
should log error messages.


Of course the server supports HTTPS, if I use web browser it's all OK.
I tried OverbyteIcsHttpsTst demo but without luck.
--
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




Sorry, it's OK - the example works fine.
I used some wrong predefined directives I had added and screw some 
things before...

Thank you very much

--
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] Receive contents of remote text file over SSL

2011-04-12 Thread Dimitris Botsis

On 12/4/2011 4:40 μμ, Arno Garrels wrote:

Dimitris Botsis wrote:

Hi again,

I use the example "OverbyteIcsHttpDmo". When I call the text file on
my web server using HTTP (as in the example) then I get the contents
OK. When I use HTTPS (having added proper sslhttpcli and sslcontect
components) the request is sent but don't get any contents back.
Any ideas ?


Does the server support HTTPS?
If yes, try with the OverbyteIcsHttpsTst demo in SslInternet folder.
If that works search for differences in your code, otherwise the demo
should log error messages.


Of course the server supports HTTPS, if I use web browser it's all OK.
I tried OverbyteIcsHttpsTst demo but without luck.
--
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] Receive contents of remote text file over SSL

2011-04-12 Thread Dimitris Botsis

Hi again,

I use the example "OverbyteIcsHttpDmo". When I call the text file on my 
web server using HTTP (as in the example) then I get the contents OK.
When I use HTTPS (having added proper sslhttpcli and sslcontect 
components) the request is sent but don't get any contents back.

Any ideas ?

On 12/4/2011 2:38 μμ, Dimitris Botsis wrote:

Hi all,
how can i use SSLHttpCli in order to directly transfer the contents of a
remote text file ? Which are filesize limitations for that ?
For example, I have a file :
https://www.mydomain.com/myfile.txt and want to read it directly to client.
Thank you.
--
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

[twsocket] Receive contents of remote text file over SSL

2011-04-12 Thread Dimitris Botsis

Hi all,
how can i use SSLHttpCli in order to directly transfer the contents of a 
remote text file ? Which are filesize limitations for that ?

For example, I have a file :
https://www.mydomain.com/myfile.txt and want to read it directly to client.
Thank you.
--
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] [OT] 64-bit Delphi preview

2011-04-06 Thread Dimitris Botsis

I agree, it would be great if ICS could be used from Lazarus.
Lazarus seems to go well, new versions are coming, community gets bigger 
- and also Freepascal is great (referring to previous subject it 
supports 64bit systems too)


On 6/4/2011 5:20 μμ, TK Boyd wrote:

Given Embarcadero's total distain for "the little folk", I hope ICS
will continue to leave versions of the ICS which are compatible with
Delphi 4 and Delphi 7 on the ICS website, for those of us still doing
productive work on the "early" Delphis which can... shock horror!...
still be installed on systems simply by entering a registration key,
rather than via an online registration process which leaves the
package owner vulnerable to the marketing choices of the software
producer.

As Kylix seems "dead", I hope Lazarus is thriving, and that a version
of ICS which works with that is/ will remain available... but will
understand that if Lazarus is NOT doing well, the energy to support
it cannot be justified.

Tom

On 6 Apr 2011 at 14:28, Angus Robertson - Magenta Systems Ltd wrote:


I examined the ICS units some time ago and found only several
places that *may* require changing.


Most people are aware that Embarcadero does not allow it's beta testers
to identify themselves except under limited circumstances, nor talk about
beta products.

But since ICS and many other components are always ready for new Delphi
releases, some people may assume that one or more of us have access to
new Delphi code before it's release, to update and test components as
necessary.

Hypothetically, limited testing of ICS under 64-bit may have been done
successfully already.  If the annual Delphi release schedule of August or
September is followed again this year, a lot may still change.

There have been over 200 messages about 64-bit in the non-technical
newsgroup over the last two days, with various suggestions that may get
taken up and cause more changes.

Embarcadero is accepting applications for beta access on it's 64-bit web
page, and such people could similarly get access to test ICS.

Angus

--
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




http://sheepdogsoftware.co.uk  TK Boyd's site with
freeware and shareware for kids, parents, schools... and others.

--
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] File transfer through SSL

2011-04-05 Thread Dimitris Botsis

On 5/4/2011 4:24 μμ, Francois PIETTE wrote:

And how could I send a file on HTTPS protocol?


There is no difference in HTTP (or HTTPS) between files and documents.


I would like to connect two clients behind firewalls through a server
on WAN and initiate the file transfer between them... Do you think
that's possible?


Do you mean you have 3 computers involved: one server and two clients
and want to transfer a file between the two clients ?

You cannot communicate between clients. You must pass thru the server,
first upload the file from one client to the server and then download
the file from the server to the second client.

Or transform one client into a server (That is simply use ICS HTTPS
server component). But then you'll have issues with the firewall which
must forward the incomming connection to the client computer running the
server program.
But could it be possible to have an application that is server and 
client in the same time and for both operations use only one common port 
like port 80 ? Something like Skype does ?
And instead of using HTTPS (SSL) use HTTP but with a custom encryption 
if needed. That's an idea, OK?
Did not implemented something like that (yet) but I think it would be 
interested.




--
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

Re: [twsocket] [OT] What are possible dangers using ICS-SSL without SSLversion chec

2011-04-03 Thread Dimitris Botsis

It definitely depends on the project.
Even 100 KBytes less make significant performance to my client-server 
auto-update application. Both server has less bytes to send to 100 
concurrent connected clients and client can download much faster - there 
are still some clients using dial-up or GPRS very slow connections.


On 3/4/2011 6:32 μμ, Fastream Technologies wrote:

I wondered why it is so big problem to have a large exe? Installers already
compress well for bandwidth and an average 1TB HDD costs less than $100!

SZ
On Sun, Apr 3, 2011 at 6:15 PM, Dimitris Botsis  wrote:


On 3/4/2011 5:12 μμ, Arno Garrels wrote:


Angus Robertson - Magenta Systems Ltd wrote:


Additionally I used UPX and reduced size of libraries - now it's

better.



Beware that most such file compressors will eventually be used by
virus and trojan writers, and the signatures added to detect any
compressed files as malware.



That's indeed a sad story since compressors/encryptors are also used
to protect against reverse engineering. If you digitally sign packed
binaries with a valid signing certificate chances are higher that they
pass. For instance ClamWin reports a false positive in such case,
otherwise a PUA.



You are absolutely right, but with UPX I did not have any problems until
now. I use it for many years. It only compresses and somehow scrambles.
But I really had problems with other commercial products but these products
did not only compress, some also added something like their own virtual
machine (for reverse-engineering protection) on top of which the program was
loaded so this virtual machine was often considered as suspicious or
virus-like.

--
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] [OT] What are possible dangers using ICS-SSL without SSLversion chec

2011-04-03 Thread Dimitris Botsis

On 3/4/2011 5:12 μμ, Arno Garrels wrote:

Angus Robertson - Magenta Systems Ltd wrote:

Additionally I used UPX and reduced size of libraries - now it's
better.


Beware that most such file compressors will eventually be used by
virus and trojan writers, and the signatures added to detect any
compressed files as malware.


That's indeed a sad story since compressors/encryptors are also used
to protect against reverse engineering. If you digitally sign packed
binaries with a valid signing certificate chances are higher that they
pass. For instance ClamWin reports a false positive in such case,
otherwise a PUA.



You are absolutely right, but with UPX I did not have any problems until 
now. I use it for many years. It only compresses and somehow scrambles.
But I really had problems with other commercial products but these 
products did not only compress, some also added something like their own 
virtual machine (for reverse-engineering protection) on top of which the 
program was loaded so this virtual machine was often considered as 
suspicious or virus-like.

--
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] What are possible dangers using ICS-SSL without SSL version check

2011-04-03 Thread Dimitris Botsis

Thank you Angus.
Additionally I used UPX and reduced size of libraries - now it's better.

On 3/4/2011 1:53 μμ, Angus Robertson - Magenta Systems Ltd wrote:

The latest SSL libs that are available, are much smaller than the
ones that 0.9.8x that are available from
http://wiki.overbyte.be/wiki/index.php/ICS_Download.


The size of the SSL DLLs varies depending on whether they contain large C
run time libraries.

The ICS versions are self contained, while other versions also require
one or more extra Microsoft DLLs to be distributed, negating the size
difference and increasing DLL hell.

Angus

--
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

[twsocket] What are possible dangers using ICS-SSL without SSL version check

2011-04-03 Thread Dimitris Botsis

Hi all,

what are the possible problems and dangers that may come when using ICS 
without version check for SSL libraries (enable "$DEFINE 
NO_OSSL_VERSION_CHECK" in OverbyteIcsSslDefs.inc) ?


The latest SSL libs that are available, are much smaller than the ones 
that 0.9.8x that are available from 
http://wiki.overbyte.be/wiki/index.php/ICS_Download.


Thank you
--
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] Strange SSL-components problem

2011-03-30 Thread Dimitris Botsis

Hi all,

I corrected the problem, thank you Arno and Francois for helping.
I did not have "USE_SSL" enabled but although it was not enabled, the 
first times the build was succesful with SSL support - I don't know why.

Anyway, now I have rebuilt the whole package with USE_SSL and it's fine.
Thank you once more.

On 30/3/2011 10:20 μμ, Dimitris Botsis wrote:

Hi Arno, thank you for replying.

I rebuild the project every time the problem occurs.
I even uninstall the whole package and install it again.
First times it works fine without problems.
And then, starts reporting about "undeclared identifiers" of
SSL-components. Only for SSL components.
It's the first time I see something like this.

On 30/3/2011 10:15 μμ, Arno Garrels wrote:

Hi,

at first you should get atest ICS source code and OpenSSL DLLs from
http://wiki.overbyte.be/wiki/index.php/ICS_Download

The problem with undeclared identifiers is easily solved by rebuilding
the project, a simple compile is not enough after changing the USE_SSL
directive.



--
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] Strange SSL-components problem

2011-03-30 Thread Dimitris Botsis

Hi Arno, thank you for replying.

I rebuild the project every time the problem occurs.
I even uninstall the whole package and install it again.
First times it works fine without problems.
And then, starts reporting about "undeclared identifiers" of 
SSL-components. Only for SSL components.

It's the first time I see something like this.

On 30/3/2011 10:15 μμ, Arno Garrels wrote:

Hi,

at first you should get atest ICS source code and OpenSSL DLLs from
http://wiki.overbyte.be/wiki/index.php/ICS_Download

The problem with undeclared identifiers is easily solved by rebuilding
the project, a simple compile is not enough after changing the USE_SSL
directive.



--
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] Strange SSL-components problem

2011-03-30 Thread Dimitris Botsis

Hi all,

I have a very strange problem with ICS.
I try to use ICS v7 (Oct/2010) fresh downloaded from you website 
(overbyte.be). I install it on Delphi 7.

All is OK when starting.
I have an empty form and drop 2 components on it :
- a Tsslhttpcli
- a TsslContext
I have already included the proper paths for ICS in the Delphi 
environment so when I build it's all OK and for SSL I use ssleay32.dll 
and libeay32.dll but due to problems of versions I have disabled SSL 
version checking from "OverbyteIcsSslDefs.inc".


After some builds of the same project, without having changed anything 
in the project, I get the error that
Tsslhttpcli and Tsscontext are "undeclared identifiers", although 
previously they were fine.

If I close and open Delphi and project again, problem is still the same.

The only way to correct it, is to delete all contents of Delphi/Vc32, 
copy there fresh files from the downloaded zip from Overbyte's website 
and rebuild again the "OverbyteIcsD7Run.dpk".
Then it starts working fine for some time tries until it stops with the 
same errors again after some builds.


This happens only with SSL components of ICS, with other components 
everything is OK. Even when the 2 components I refer to seem to be 
"undeclared identifiers" if I use another non-SSL component (before 
rebuilding-that solves temporarily the problem) all other work fine.


Please note that :
- I don't have any other problem with no other components installed
- When I manage to compile project correct, then executable file is fine 
for always. The problem appears only in the Delphi environment together 
with ICS, while in build process.


Thank you very much.
--
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