Re: [twsocket] Skype like application
Hi Paul. If you have little time and want a good job done, or to get for sound advice, pay Francois Piette to do the preliminaries for you. The demos show how to do many things with sockets, but to get a particular job done, like I needed, it is just better to pay for some hours. 10 hours of his time might be 50 hours of your time, and saves a lot of stress. Cheers, Raymond Hi Raymond. I had the same idea ... I think the two main architects, Francois and Arno can get the job done, but I'm not the person to decide ... I need permission for this Paul -- 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] Skype like application
Hi all, I want to make an application to that can receive streaming camera images using udp hole punching. I found this link the net, but I have no clue of how to start with it. http://www.brynosaurus.com/pub/net/p2pnat/ Is there someone that can get me started with this ? Paul -- 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] Skype like application
You are best off asking at http://stackoverflow.com/ instead. Any good reason for that ? I want to make it with ICS Paul -- 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] Skype like application
What's the actual problem? From a brief look the article above seems to describe hole punching very well, guess you just have to implement it accordingly (also known as work ;). (also known as work ;). Yes, but I don't like to work :) No, seriously, I've never had the time to dive into socket programming and still struggling to find the time for it. So, I need to get as much info I can before I even can start with it ... It's obvious that a central server has to be used to exchange connection/NAT data to both peers, but there are many articles to find on the net and many are contradictable Paul -- 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] Ipv6
Thanks to all I'll check is this weekend Paul - Original Message - From: François Piette francois.pie...@skynet.be To: 'ICS support mailing' twsocket@elists.org Sent: Tuesday, June 05, 2012 9:54 AM Subject: Re: [twsocket] Ipv6 what is the status of IPv6 with ICS ? Already working, thanks to Arno ! See SVN repository branch icsipv6. -- 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
[twsocket] Ipv6
Hi, what is the status of IPv6 with ICS ? Thanks, Paul -- 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] DomainKeys/DKIM signature
When it's best to use a TSslDynamicLock or TSslStaticLock ? Paul - Original Message - From: Arno Garrels arno.garr...@gmx.de To: ICS support mailing twsocket@elists.org Sent: Saturday, March 31, 2012 12:01 PM Subject: Re: [twsocket] DomainKeys/DKIM signature Max Terentiev wrote: One more question: looks like OpenSSL contains all necessary functions (RSA and SHA-256 ciphers). But can I use this functions inside my sending threads ? It's thread safe ? OpenSSL is not thread-safe unless you provide callbacks for the required locking. The components TSslDynamicLock and TSslStaticLock are made for this purpose. Read the comments in OverbyteIcsThrdLock.pas. Create _one_ of those components in your main thread and set property Enabled to True before any other call to OpenSSL, that's it. In order to avoid memory leaks use this code at the end of TThread's Execute method: //* thread-local cleanup */ if @f_ERR_remove_thread_state nil then f_ERR_remove_thread_state(nil) // OSSL v1.0.0+ else f_ERR_remove_state(0); // deprecated For debugging you should define OPENSSL_USE_DELPHI_MM in the project options. If defined OpenSSL will use current Delphi memory manager which makes detection of OpenSSL memory leaks possible. You will however notice that there's always one (or two?) small leak(s) in OpenSSL on shutting down the application, this can be safely ignored. -- Arno -- 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] Should next ICS version support anything before Delphi XE ?
Still using BCB2007 :-) On 28/03/2012 20:10, Dejan Petković wrote: My suggestion is Delphi 2010 and up. I still use D2010 and I don't plan to switch to any XE version soon. On Wed, Mar 28, 2012 at 8:59 PM, François Piette francois.pie...@skynet.bewrote: Hi ! I’m planning the next ICS version… Being unable to use any features added to Delphi in the last 10 years is very restricted. Maybe we need to cease support for old Delphi versions ? Of course ICS V5 and V7 will remains available however, the only changes will be bug fixes. What do you think ? Please keep your answer as short as possible, I just want to have an idea about how many of you are still using an old Delphi version. -- 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 -- Regards Paul Read nSolve Ltd 33-35 Daws Lane London, NW7 4SD England Tel: +44 (0) 1993 402011 Tel: +1 617 273 2304 http://www.nsolve.com Find us on Facebook! http://www.facebook.com/nSolve -- 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] Should next ICS version support anything before Delphi XE ?
I'm using D2009 and don't plan to upgrade to XE, only for the exe size which has to be as small as possible. Paul -Original Message- From: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] On Behalf Of François Piette Sent: 28-Mar-12 11:59 To: ICS support mailing Subject: [twsocket] Should next ICS version support anything before Delphi XE ? Hi ! I'm planning the next ICS version. Being unable to use any features added to Delphi in the last 10 years is very restricted. Maybe we need to cease support for old Delphi versions ? Of course ICS V5 and V7 will remains available however, the only changes will be bug fixes. What do you think ? Please keep your answer as short as possible, I just want to have an idea about how many of you are still using an old Delphi version. -- 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 -- 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] tcp hole punching
HI Francois Probably Universal Plug and Play (UPnP)is what you are looking for. How reliable is that ? Btw: Skype is using an intermediate server to locate users. Looks normal to exchange connection data Paul -- 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] tcp hole punching
Are you asking if it works ? The answer is yes. Are you asking it is always available ? The answer is no. It is disabled on firewalls or routers where security is really controlled. Most home user have it turn on because they don't even know what it is. Do you know how TCP hole punching works ? Paul -- 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] tcp hole punching
Hi Francois, http://www.brynosaurus.com/pub/net/p2pnat/ That's far more difficult than I thought it woild be I should start testing with tcp first ... Paul -- 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] tcp hole punching
Hi all, It's been a while since last time due tue another (electronics) job. Now I need to establisch a P2P connection that can pass firewalls. Does anyone knows how it should be done ? I probably need a gateway to extinguish connection data, but I don't have a clue how it should be done. Any help and/or examples available ? TIA Paul BTW: what is the status of IpV6 ? -- 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] tcp hole punching
Hi Francois, I thougth that the whole idea of hole punching is a way to let NAT and firewalls thinck that there is no server that a gateway is needed to exchange connection date between the 2 peers. Since these are adhoc connections, there is no control over firewalls. I need something like Skype does Paul - Original Message - From: François Piette francois.pie...@skynet.be To: 'ICS support mailing' twsocket@elists.org Sent: Friday, March 02, 2012 8:39 PM Subject: Re: [twsocket] tcp hole punching Now I need to establisch a P2P connection that can pass firewalls. Does anyone knows how it should be done ? Could you more explicit about the situation ? Where is the server, where is the client(s), where is the firewall ? Is each client also a server or do they work thru an intermediate server ? Do you have control over the infrastructure (Firewall config for example) ? -- 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] Digest authentication via THttpCli?
@Paul: Does that fix the issue? Yes! :-) On 09/01/2012 10:36, Arno Garrels wrote: François Piette wrote: Maybe a new component options would let the developer select the behaviour ? Or maybe first try with on option and then automatically switch to the other if it fails ? Think I found the bug in OverbyteIcsDigestAuth.pas, will update SVN later : {code} procedure AuthDigestCalcResponse( [..] { calculate response } MD5Init(Md5Ctx); MD5UpdateBuffer(Md5Ctx, HA1); MD5UpdateBuffer(Md5Ctx, AUTH_DIGEST_DELIM); MD5UpdateBuffer(Md5Ctx, Nonce); if Qop '' then begin // (if auth-int or auth) rfc2617 3.2.2.1 Request-Digest MD5UpdateBuffer(Md5Ctx, AUTH_DIGEST_DELIM); MD5UpdateBuffer(Md5Ctx, NonceCount); MD5UpdateBuffer(Md5Ctx, AUTH_DIGEST_DELIM); MD5UpdateBuffer(Md5Ctx, CNonce); MD5UpdateBuffer(Md5Ctx, AUTH_DIGEST_DELIM); MD5UpdateBuffer(Md5Ctx, Qop); // MD5UpdateBuffer(Md5Ctx, AUTH_DIGEST_DELIM); // == removed end; MD5UpdateBuffer(Md5Ctx, AUTH_DIGEST_DELIM); //== added MD5UpdateBuffer(Md5Ctx, HA2Hex); MD5Final(RespHash, Md5Ctx); Response := MD5DigestToLowerHexA(RespHash); { V1.01 } end; {code} @Paul: Does that fix the issue? Also in the curl-7.23.1 source code I found a very interesting note: /* So IE browsers v7 cut off the URI part at the query part when they evaluate the MD5 and some (IIS?) servers work with them so we may need to do the Digest IE-style. Note that the different ways cause different MD5 sums to get sent. Apache servers can be set to do the Digest IE-style automatically using the BrowserMatch feature: http://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#msie Further details on Digest implementation differences: http://www.fngtps.com/2006/09/http-authentication Likely we have to add an additional option DigestAuthIEStyle. -- *Paul Read* Partner and Senior Engineer nSolve Ltd http://www.nsolve.com/?empr Tel: +44 (0)845 8626777 Tel: +44 (0)1993 402011 Tel (US): +1 617 273 2304 nSolve http://www.nsolve.com/?empr nCall http://www.nsolve.com/nCall-overview.shtml?empr nTasktic http://www.ntasktic.com/?empr -- 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] Digest authentication via THttpCli?
Please post the server challenge, What does this look like? does it by any chance request auth-int? auth-int is not supported yet. I don't see 'auth-int' within the packets but maybe I am looking in the right area. The first response from the server is: HTTP/1.1 401 Unauthorized Server: Polycom SoundPoint IP Telephone HTTPd Date: SAT, 07 JAN 2012 08:36:26 GMT Connection: close WWW-Authenticate: Digest realm=PUSH Authentication, nonce=132577494, algorithm=MD5 Content-type: text/html !DOCTYPE HTML PUBLIC -//IETF//DTD HTML 2.0//EN htmlheadtitle401 Unauthorized/title/headbody Authorization failed. /body/html Many thanks for your suggestions and help so far Paul On 07/01/2012 08:25, Arno Garrels wrote: Paul Read wrote: I was using version 708 using the latest (721) I now at least get the response to the 401 being sent back :-) But still the request is rejected by the server. Wireshark shows that the digest authorization response calculated by ICS is different to that calculated by cURL. (THe nonce given was the same for ICS and cURL). The cURL response is accepted, the ICS response is not. cURL: Digest username=\bob\, realm=\PUSH Authentication\, nonce=\132577494\, uri=\/push\, response=\ce032cf8dad4898084e1a3f7f34148c8\, algorithm=\MD5\ ICS: Digest username=\bob\,realm=\PUSH Authentication\,nonce=\132577494\,uri=\/push\,response=\7e843d8e80bd9265b467916afbc9cb2e\ How can I be sure ICS is using MD5 and not MD4 or something else? It does use MD5, see digest source in OverbyteIcsDigestAuth.pas. As per RFC 2617 MD5 is the default algorithm and optionally (some browsers don't send it either): algorithm A string indicating a pair of algorithms used to produce the digest and a checksum. If this is not present it is assumed to be MD5. Also I recently tested digest authentication against various proxy servers successfully. Please post the server challenge, does it by any chance request auth-int? auth-int is not supported yet. -- 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] Digest authentication via THttpCli?
Still struggling to post data via THttpCli using Digest Authentication. Looking via Wireshark I can see that THttpCli did not response to the 401 Unauthorized sent by the server, so the data I want to send does not get through (whilst if I use cURL it works fine). I have configured THttpCli like this: Username = 'bob' Password = '1234' ContentTypePost = 'application/x-com-polycom-spipx' RequestVer = '1.1' FollowRelocation = True ServerAuth = httpAuthDigest SocksAuthentication = socksNoAuthentication ProxyAuth = httpAuthNone Options = [] URL = http://192.168.1.155/push;; RcvdStream = NULL; SendStream = DataOut; And then call THttpCli-Post(); What more should I be doing? Many thanks Paul On 05/01/2012 22:42, Paul Read wrote: The server I am trying to connect to, via my C++Builder 2007 application using ICS, requires Digest Authentication. To use THttpCli do I simply set the Username and Password properties, set the ServerAuth property to httpAuthDigest and then call SendStream? Many thanks Paul -- 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] Digest authentication via THttpCli?
What ICS version do you use? THttpCli got some fixes recently related to authentication AFAIR. Try latest ICSv7 from here: http://wiki.overbyte.be/wiki/index.php/ICS_Download I was using version 708 using the latest (721) I now at least get the response to the 401 being sent back :-) But still the request is rejected by the server. Wireshark shows that the digest authorization response calculated by ICS is different to that calculated by cURL. (THe nonce given was the same for ICS and cURL). The cURL response is accepted, the ICS response is not. cURL: Digest username=\bob\, realm=\PUSH Authentication\, nonce=\132577494\, uri=\/push\, response=\ce032cf8dad4898084e1a3f7f34148c8\, algorithm=\MD5\ ICS: Digest username=\bob\,realm=\PUSH Authentication\,nonce=\132577494\,uri=\/push\,response=\7e843d8e80bd9265b467916afbc9cb2e\ How can I be sure ICS is using MD5 and not MD4 or something else? Paul On 06/01/2012 18:20, Arno Garrels wrote: RTT wrote: On 06-01-2012 17:31, Arno Garrels wrote: What do you mean by cURL? http://curl.haxx.se/ :-) I thought it's some kind of URL/URI I never heard of. -- 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] Digest authentication via THttpCli?
Stepping through ICS source I can see AuthDigestCalcResponse is called and the MD5 response is calculated. I note Qop is empty. What aspects of THttpCli can effect the calculated digest response? Paul On 06/01/2012 22:27, Paul Read wrote: What ICS version do you use? THttpCli got some fixes recently related to authentication AFAIR. Try latest ICSv7 from here: http://wiki.overbyte.be/wiki/index.php/ICS_Download I was using version 708 using the latest (721) I now at least get the response to the 401 being sent back :-) But still the request is rejected by the server. Wireshark shows that the digest authorization response calculated by ICS is different to that calculated by cURL. (THe nonce given was the same for ICS and cURL). The cURL response is accepted, the ICS response is not. cURL: Digest username=\bob\, realm=\PUSH Authentication\, nonce=\132577494\, uri=\/push\, response=\ce032cf8dad4898084e1a3f7f34148c8\, algorithm=\MD5\ ICS: Digest username=\bob\,realm=\PUSH Authentication\,nonce=\132577494\,uri=\/push\,response=\7e843d8e80bd9265b467916afbc9cb2e\ How can I be sure ICS is using MD5 and not MD4 or something else? Paul On 06/01/2012 18:20, Arno Garrels wrote: RTT wrote: On 06-01-2012 17:31, Arno Garrels wrote: What do you mean by cURL? http://curl.haxx.se/ :-) I thought it's some kind of URL/URI I never heard of. -- 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] Digest authentication via THttpCli?
The server I am trying to connect to, via my C++Builder 2007 application using ICS, requires Digest Authentication. To use THttpCli do I simply set the Username and Password properties, set the ServerAuth property to httpAuthDigest and then call SendStream? Many thanks Paul -- 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] HTTP SSL Server vs p7b certificate's format
Hi Arno, We also have problems with the new certificates. Converted to .pem format, it contains only a private key and a single certificate section. It only works using an ISA server processing the SSL... Paul - Original Message - From: Arno Garrels arno.garr...@gmx.de To: ICS support mailing twsocket@elists.org Sent: Thursday, October 06, 2011 4:53 PM Subject: Re: [twsocket] HTTP SSL Server vs p7b certificate's format ROQUES Guillaume wrote: And ICS logger says : 15:57:49:896 InitCtx OpenSSL version: OpenSSL 0.9.8h 28 May 2008 15:57:49:897 error:0906D06C:PEM routines:PEM_read_bio:no start line error:140B0009:SSL routines:SSL_CTX_use_PrivateKey_file:PEM lib So I checked MyCertificate.pem and I've got 3 blocks : Without a private key it doesn't work. InitContext raises an exeption in such case. The private key has to be converted to PEM format as well, preferably to a separate PEM file in your case and property SslPrivKeyFile should point to it. BTW: If you would not eat exceptions you would have got that error message sooner and easier. -- 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] Multithreaded server not triggering SessionAvailable event.
Hi, I've been forced down the Multi-threaded server route as I'm using a client's API that only works when on its own connection thread. Everything has been working fine except for an issue I get that when the PC is busy with multiple connections, some new connections don't fire the SessionAvailable event so I'm not aware of the connection. SysInternals ProcessExplorer reports the connections as established but there's no way I can access them. The problem is that the client has no timeout so remains connected permanently. Even when I stop the server from listening the connect remains open. Has anyone has a similar issue? Is there a way I can get a list of active sockets talking to my app similar to ProcessExplorer? Regards, Paul Howes -- 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] Triggering DataAvailable
Hi, I'm using TWSocketServer to handle multiple incoming connections from a client's embedded unit. Unfortunately the remote unit has a few limitations; the main one being that it can establish an IP connection to a server but cannot send data until the server requests it. This means that although the OnClientConnect function gets called, the OnDataAvailable does not. I had put a line of code in the OnClientConnect to trigger the OnDataAvailable function but this seems to be blocking other connections. My questions are:- i)Is there a way to trigger the OnDataAvailable function by post a message on the socket. ii) Is there a better way to do this without going to a threaded model. Many thanks in advance. Paul Howes -- 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] SSL certificates changed ?
I have a problem with a client that has renewed their certificate. Comparing the old and new certificates, there's a new section added. The new certificated has 2 sections : Bag Attributes: Empty Attributes Anyone knows what I need to change ? Thanks, Paul -- 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] HttpClient download and Progress Bar
Hi, I'm trying to have a progress bar working during a file download by HttpClient.Get (and HttpClient.RcvdStream). I've seen the OnDocData that seems to receive the length of data downloaded. Unfortunaly, the data length isn't really the size of the piece of file downloaded because the packed received include the HTTP protocol and the data. Is a way to know : - the size of the entire file (before starting the download) - the size of all data (I mean the size of the file piece received and not the size of the entire packet received). Thanks JP -- 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] HttpClient download and Progress Bar
Le 09/01/2011 15:49, Arno Garrels a écrit : Jean-Paul Passama wrote: Hi, I'm trying to have a progress bar working during a file download by HttpClient.Get (and HttpClient.RcvdStream). I've seen the OnDocData that seems to receive the length of data downloaded. Unfortunaly, the data length isn't really the size of the piece of file downloaded because the packed received include the HTTP protocol and the data. Is a way to know : - the size of the entire file (before starting the download) Quoted from http://www.rfc-editor.org/rfc/rfc2068.txt: An HTTP/1.1 server may also establish persistent connections with HTTP/1.0 clients upon receipt of a Keep-Alive connection token. However, a persistent connection with an HTTP/1.0 client cannot make use of the chunked transfer-coding, and therefore MUST use a Content-Length for marking the ending boundary of each message. So it should be possible to force the server to send a content-length header. In event OnDocBegin property ContentLength should return that value. In the Event OnDocBegin , no such property (ContentLength) : procedure TMyForm.HttpCli1DocBegin(Sender: TObject); And THttpClient doesn't have this property. So where I could retrieve this property from ? Thank you JP -- 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] HttpClient download and Progress Bar
Le 09/01/2011 16:08, Jean-Paul Passama a écrit : Le 09/01/2011 15:49, Arno Garrels a écrit : Jean-Paul Passama wrote: Hi, I'm trying to have a progress bar working during a file download by HttpClient.Get (and HttpClient.RcvdStream). I've seen the OnDocData that seems to receive the length of data downloaded. Unfortunaly, the data length isn't really the size of the piece of file downloaded because the packed received include the HTTP protocol and the data. Is a way to know : - the size of the entire file (before starting the download) Quoted from http://www.rfc-editor.org/rfc/rfc2068.txt: An HTTP/1.1 server may also establish persistent connections with HTTP/1.0 clients upon receipt of a Keep-Alive connection token. However, a persistent connection with an HTTP/1.0 client cannot make use of the chunked transfer-coding, and therefore MUST use a Content-Length for marking the ending boundary of each message. So it should be possible to force the server to send a content-length header. In event OnDocBegin property ContentLength should return that value. In the Event OnDocBegin , no such property (ContentLength) : procedure TMyForm.HttpCli1DocBegin(Sender: TObject); And THttpClient doesn't have this property. So where I could retrieve this property from ? Thank you JP Sorry for that message, I tried and it works : procedure TClubFTP.HttpCli1DocBegin(Sender: TObject); var x : integer; begin x := (Sender as THttpCli).ContentLength; if (x -1) and (SizeFile = 0) then begin SizeFile := x; end; end; The ProgressBar works with RcvdStream.Position procedure TClubFTP.HttpCli1DocData(Sender: TObject; Buffer: Pointer; Len: Integer); var x : longint; begin x := HttpCli1.RcvdStream.Position * 100 div SizeFile; if x 0 then PB.Position := x; end; Thank you JP -- 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] Socket Handle Value
Hi, I'll try to give a quick explanation of my project first. I have a TWSocketServer listening for connection on a port. I use the normal client connect / disconnect methods as per the examples. I have two types of device connect even minute or so. The first device opens a connection, sends an XML stream and then disconnects. The second opens a connection but does nothing else. I then have to pass the internal socket handle to an API (not mine so I don't know anything about its coding). Once the API function completes I have to close the socket on the server end. I do this using the CloseDelayed function. I do all of this from within the ClientConnect event since that's the only time I get anything fire for this type of device. My question is that when I run a test using only the first type of device I notice that the socket handle numbers stay lowish (600 - 800) with lots of reuse. When I test using the second type the handles increment into the 100k's with little reuse. The TWSocketServer component suggests everything is closing ok and had no unexpected open clients. So is everything ok and this is just a winsock way of doing things or is something going on that I need to be aware of. Am I ok calling CloseDelayed within the connect event? Many thanks in advance, I hope I've explained my app in enough detail. -- 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] Cc: with TSmptClient ?
Hi all, Don't find how to send a message with 1 receiver + some others receivers in Cc: Tried to add Cc: receivers in HdrCc but doesn't work, neither RcptNames.Add('Cc:myaddr...@serveur.com') Any ideas ? Thanks JP -- 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] Cc: with TSmptClient ?
Fredrik Larsson a écrit : Doesn't HdrCC := 'n...@none.com;sec...@none.com'; Work? No. -Original Message- From: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] On Behalf Of Jean-Paul Passama Sent: den 19 februari 2010 17:13 To: twsocket@elists.org Subject: [twsocket] Cc: with TSmptClient ? Hi all, Don't find how to send a message with 1 receiver + some others receivers in Cc: Tried to add Cc: receivers in HdrCc but doesn't work, neither RcptNames.Add('Cc:myaddr...@serveur.com') Any ideas ? Thanks JP -- 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] Cc: with TSmptClient ?
Arno Garrels a écrit : Jean-Paul Passama wrote: Hi all, Don't find how to send a message with 1 receiver + some others receivers in Cc: Tried to add Cc: receivers in HdrCc but doesn't work, neither RcptNames.Add('Cc:myaddr...@serveur.com') RcptNames.Add('myaddr...@serveur.com') This adds recipients to the list of recipients, has nothing to to with the headers. Know that, but you don't explain how to indicate a CC: receiver. Take a look at the OverbyteIcsMailSnd demo. -- 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
Re: [twsocket] HttpCli TransferEncoding
- Original Message - From: Francois PIETTE francois.pie...@skynet.be To: ICS support mailing twsocket@elists.org Sent: Thursday, February 04, 2010 9:00 PM Subject: Re: [twsocket] HttpCli TransferEncoding Don't forget about proxies and firewalls. They probably has also to support it It should be possible imho. it's like sending a large file in pieces. Not exactly. Any device analysing the content has to decode chunks. Chunked encoded can be used both ways: client-- server and server -- client http://en.wikipedia.org/wiki/Chunked_transfer_encoding Paul -- 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] HttpCli TransferEncoding
I can't get the client working with it. httpCli.TransferEncoding is a readonly property. How can I set the transfer encoding to chunked and send seperate chunks ? thx, Paul -- 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] HttpCli TransferEncoding
So it's currently impossible with THttpCli :-( I should at least be able to send substreams without ending the post request, but haven't found a way to do this yet. Paul - Original Message - From: Arno Garrels arno.garr...@gmx.de To: ICS support mailing twsocket@elists.org Sent: Thursday, February 04, 2010 5:18 PM Subject: Re: [twsocket] HttpCli TransferEncoding Paul wrote: I can't get the client working with it. httpCli.TransferEncoding is a readonly property. It is server's TransferEncoding, that's why it's read only. How can I set the transfer encoding to chunked and send seperate chunks ? THttpCli supports chunked encoding when it receives such data from a server. I don't know whether it's supported with posted data from clients to servers at all. -- 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
Re: [twsocket] HttpCli TransferEncoding
- Original Message - From: Arno Garrels arno.garr...@gmx.de I wonder what you want to achieve? speed. If you managed to keep one conection alive by sending an infinite data stream it won't ensure that the other connection, your work connection, won't be disconnected nevertheless. Should be possible if you write both server and client though. Paul -- 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] HttpCli TransferEncoding
If I got you right, you use ICS HTTP server and it disconnects the connections, right? If you are on v7 I hope you noticed that the HTTP server component got a new timeout feature that disconnects clients even when they established Keep-Alive connections? It's ON by default. I use a modified version. I'm trying to send a never ending stream in chunks. Each chunk contains the length of the substream, so I should be able decode it on the fly on the server. At least, that's what I'm trying to do. If I do this the normal way, some messages are received too late, even with connection keep-alive. Google is currently working on a new protocol (SPDY) to overcome this problem. With Http(s), you have to send a new request each time for each message and there is a huge delay if multiple proxies are in between. Paul -- 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] HttpCli TransferEncoding
Don't forget about proxies and firewalls. They probably has also to support it It should be possible imho. it's like sending a large file in pieces. Paul -- 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] HttpCli TransferEncoding
And you never know what those proxies do. That makes me believe that HTTP isn't the right protocol for the job. I wish I had another choise, but I'm not. In the end, only https is allowed. Paul -- 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] HttpCli TransferEncoding
Not exactly. Any device analysing the content has to decode chunks. I still don't get it right then. What is the problem with sending a large file and pause the transfer for a few seconds in between ? Paul -- 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] Send data as a never ending document
Are you using chunked transfer encoding, or something else? That's what I'm doing, at least I'm trying to, but it's still not working. Do you have an example sending it with a THttpCli ? regards, Paul -- 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] Send data as a never ending document
I've been searching to send http-messages to a THtppServer as a never ending document to avoid delays between messages caused by proxies in between. No luck so far. Can it be done with ICS ? thx, Paul -- 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] Send data as a never ending document
Found it, I forgot to set linemode properly :-( Paul -- 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] Threaded http(s) server
Does anyone have an example of it ? thx, Paul -- 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: IPv4 address shortage reaching critical stage
Just curious, why? AFAIK Ip6 is not compatible to Ip4, so why not implement a new branch? Or is the idea that one component should be able to handle all? albert I think so--another branch will cause a lot of rework for future updates, wouldn't it? You can't make a version for IPv6 only. It should handle both IPv4 and IPv6 because IPv4 will still be used for a long time. Paul -- 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] http design problem
I'm testing an application that has to control a remote machine. The communication goes through an intermediate http server that connects 2 http clients. A--Server--B-machine computer A controls computer B wich controls the machine. When computer B is located in the US, some message aren't delivered fast enough. This is because of the nature of http: the connection is interrupted after each message. Is it possible to stream message from A to B thru a server without disconnecting at all, f.i using a never ending stream ? Paul -- 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] http design problem
Yes, using HTTP/1.1 you have perstant connexions. See Keep-Alive in the source code. That's what I'm using, but it's not the same. When I post a stream (10k as test) to the server which then sends it to the other computer, it's about 90 times faster then sending 1000 10byte-strings. of couse, there's a little overhead this way, although the head part is almost empty. After sending a string, there is a diconnect, even with keep-alive and I can see a 30 ms latency (to the US) for each request. It's the nature of http (google is working on a new implementation that doesn't have this limit, but this can take years before it's accecpted). Normally, this 30ms latency isn't a problem, but for this application, it is and I need a different approach. Paul -- 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] http design problem
I don't agree with you. HTTP protocol has all support for real keep alive connections. request can even be sent before the previous answer has been received. BUT most commercial webserver do break the connection very quickly. Probably to be able to support a large number of clients. If you write the server part using ICS, then you should not be faced with this problem. Both client and server are ICS .. How many proxies are in between that slow down each request ? This could be bypassed when a never-ending stream can be used. Paul -- 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] http design problem
Well, proxies may also break the connections. Never had problems with that, but new requests are delayed somehow. Paul -- 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: IPv4 address shortage reaching critical stage
- Original Message - From: Francois PIETTE francois.pie...@skynet.be To: ICS support mailing twsocket@elists.org Sent: Tuesday, January 19, 2010 8:17 PM Subject: Re: [twsocket] OT: IPv4 address shortage reaching critical stage I only have an approximate idea about tthe work to be done. Anyway, I would start coding when 3000,- EUR are collected. I think it's better to start now and make it a separate version that users can buy and make it public when you received your target. Not everyone would spend money not knowing that this version will ever become available. Paul -- 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] OT: IPv4 address shortage reaching critical stage
http://news.zdnet.com/2100-9595_22-385195.html?tag=nl.e589 Any progress on IPv6 ? Paul -- 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] AV in EncryptPublicRSA()
Hi all, I'm trying to convert a D7 program to D2009, but I get multiple AV's in this function. Works fine in D7. function EncryptPublicRSA( X : TX509Base; InBuf : Pointer; InSize : Cardinal; OutBuf : Pointer; var OutSize : Cardinal): Boolean; var Len : Word; PubKey: PEVP_PKEY; BlockSize, Res : Integer; InBufPtr, OutBufPtr : PAnsiChar; begin Result := FALSE; if not Assigned(X) then raise Exception.Create('Cert not assigned'); PubKey := f_X509_get_pubkey(X.X509); if not Assigned(PubKey) then raise Exception.Create('Public key not assigned'); if PubKey^.type_ EVP_PKEY_RSA then raise Exception.Create('Not a RSA key'); BlockSize := f_EVP_PKEY_size(PubKey); == multiple AV's here { Calculate the required result buffer size } if InSize = BlockSize - 11 then Res := BlockSize else Res := (InSize div (BlockSize - 11) + 1) * BlockSize; if (OutSize = 0) or (InSize = 0)or (InBuf = nil) or (OutBuf = nil) or (OutSize Res) then begin OutSize := Res; Exit; end; InBufPtr := InBuf; OutBufPtr := OutBuf; OutSize := 0; repeat if InSize BlockSize - 11 then Len := BlockSize - 11 else Len := InSize; if Len 0 then begin Res := f_RSA_public_encrypt( Len, InBufPtr, OutBufPtr, PubKey^.rsa, RSA_PKCS1_PADDING); if Res BlockSize then raise Exception.Create('Error: Ciphertext should match length of key'); Dec(InSize, Len); Inc(InBufPtr, Len); Inc(OutBufPtr, Res); Inc(OutSize, Res); end; until InSize = 0; Result := TRUE; end; any idea's welcome thanks, Paul -- 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] AV in EncryptPublicRSA()
- Original Message - From: Arno Garrels arno.garr...@gmx.de Is f_EVP_PKEY_size assigned, correct function pointer? why shouldn't it, it's declared in OverbyteIcsLibeayEx or should I explicitly call LoadLibeayEx? Paul -- 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] AV in EncryptPublicRSA()
Yes, LoadLibeayEx has to be called at least once to load Openssl, and the original EncryptPublicRSA() takes care of this. Ok, no AV's ,but I'm still not where I want :-( I'm using OpenSSL to encrypt a text .. Paul -- 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] AV in EncryptPublicRSA()
I got it working now, but had to add the namespace: OverbyteIcsSslX509Utils.CreateSelfSignedCert() Paul -- 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] AV in EncryptPublicRSA()
Hi Arno, I got it working now (see my previous mail) Thanks, Paul -- 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] OS TWSOCKET
Tou can get them here http://lists.elists.org/pipermail/twsocket/ Paul - Original Message - From: Signed Source® Project dan...@signedsource.com To: twsocket@elists.org Sent: Wednesday, December 30, 2009 9:53 AM Subject: [twsocket] OS TWSOCKET Hi guys, I have changed my os to Windows 7 and it unfortunately doesn't include windows mail anymore. I have installed Mozilla thunderbird and can't import my old account or mails back. Can you please inform, How can I set twsocket to get mails? I can't get any mails from twsocket with this new os and mozilla thunderbird. My mail app is working fine. -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 -- 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] Use of twsocket in thttpserver application
My socket connection to other programs is done in the main thread. Should not be a problem, but it could slow down the server. After I call connect I call application processmessages until I get connected and then I close. Do you think this could be interfering with the HttpServer component logic? Calling Application.ProcessMessages is very dangerous and is not neccesary at all. I could disturb the message pumps used by all async components. It is most likely the cause of the problems you have. Paul -- 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] Use of twsocket in thttpserver application
Each time my webserver needs to nudge one of the other applications then I guess I should start a thread to do this. Not always, but when it has lenghty operations to perform. Keep in mind that creating a thread takes its time too. If you have to create a thread frequently, it's better to create a continuous thread and just add a new request to an input queue. If you need resulting data from the thread, then you can create an output queue also (producer-consumer Q's). This is an excellent way if time is critical. Paul -- 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] Slightly OT: Future of web: Google pespective (SPDY)
Https over SCTP would be a huge improvement .. Paul - Original Message - From: Fastream Technologies ga...@fastream.com To: ICS support mailing twsocket@elists.org Sent: Monday, November 23, 2009 1:19 PM Subject: [twsocket] Slightly OT: Future of web: Google pespective (SPDY) Hello, http://dev.chromium.org/spdy/ http://dev.chromium.org/spdy/indicates future of web with some improvements over HTTP(S) such as header compression. I believe this could well improve the web and ICS as well. Best Regards, SZ -- 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] Future plans of ICS
IPv6 would be nice too :) Paul -- 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] SSL Verify may fail if twocertswithsamesubjectareinthe CA lookup
- Original Message - From: Arno Garrels arno.garr...@gmx.de That doesn't work. If you verified a cert that was isued by the older CA cert the new one was found first and verify would fail as well. The problem is that they first lookup the isuer _name_ in the CA store and if a matching cert was found, compare it with the one being verified, which may be a different certificate that just owns the same subject name. It becomes clear when you take a look at their source code. From X509_vfy.c: [..] /* we have a self signed certificate */ if (sk_X509_num(ctx-chain) == 1) { /* We have a single self signed certificate: see if * we can find it in the store. We must have an exact * match to avoid possible impersonation. */ ok = ctx-get_issuer(xtmp, ctx, x); if ((ok = 0) || X509_cmp(x, xtmp)) { ctx-error=X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT; [..] This means a bug in OpenSsl. All certs of the same CA should be verified to find a match before returning an error I think it's not legal to alter the source though... Paul. -- 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] SSL Verify may fail if two certs with same subject arein the CA lookup
They've done this before. I always add my own CA list to avoid these problems. Paul - Original Message - From: Arno Garrels arno.garr...@gmx.de To: twsocket@elists.org Sent: Saturday, October 10, 2009 3:51 PM Subject: [twsocket] SSL Verify may fail if two certs with same subject arein the CA lookup Hi, VeriSign issued some different CA certificates with the same subject (see below). One of such a pair will always fail with error X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT. However these certificates are part of the Windows Root Certificate Program: http://support.microsoft.com/?scid=kb%3Ben-us%3B931125 (Posted this message to the OpenSSL list as well) -- Arno Garrels -BEGIN CERTIFICATE- MIIDAjCCAmsCEDnKVIn+UCIy/jLZ2/sbhBkwDQYJKoZIhvcNAQEFBQAwgcExCzAJ BgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xh c3MgMSBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcy MTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3Jp emVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMB4X DTk4MDUxODAwMDAwMFoXDTE4MDUxODIzNTk1OVowgcExCzAJBgNVBAYTAlVTMRcw FQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMSBQdWJsaWMg UHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEo YykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5 MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMIGfMA0GCSqGSIb3DQEB AQUAA4GNADCBiQKBgQCq0Lq+Fi24g9TK0g+8djHKlNgdk4xWArzZbxpvUjZudVYK VdPfQ4chEWWKfo+9Id5rMj8bhDSVBZ1BNeuS65bdqlk/AVNtmU/t5eIqWpDBucSm Fc/IReumXY6cPvBkJHalzasab7bYe1FhbqZ/h8jit+U03EGI6glAvnOSPWvndQID AQABMA0GCSqGSIb3DQEBBQUAA4GBAIv3GhDOdlwHq4OZ3BeAbzQ5XZg+a3Is4cei e0ApuXiIukzFo2penm574/ICQQxmvq37rqIUzpLzojSLtLK2JPLl1eDI5WJthHvL vrsDi3xXyvA3qZCviu4Dvh0onNkmdqDNxJ1O8K4HFtW+r1cIatCgQkJCHvQgzKV4 gpUmOIpH -END CERTIFICATE- -BEGIN CERTIFICATE- MIIDAjCCAmsCEEzH6qqYPnHTkxD4PTqJkZIwDQYJKoZIhvcNAQEFBQAwgcExCzAJ BgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xh c3MgMSBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcy MTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3Jp emVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMB4X DTk4MDUxODAwMDAwMFoXDTI4MDgwMTIzNTk1OVowgcExCzAJBgNVBAYTAlVTMRcw FQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMSBQdWJsaWMg UHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEo YykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5 MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMIGfMA0GCSqGSIb3DQEB AQUAA4GNADCBiQKBgQCq0Lq+Fi24g9TK0g+8djHKlNgdk4xWArzZbxpvUjZudVYK VdPfQ4chEWWKfo+9Id5rMj8bhDSVBZ1BNeuS65bdqlk/AVNtmU/t5eIqWpDBucSm Fc/IReumXY6cPvBkJHalzasab7bYe1FhbqZ/h8jit+U03EGI6glAvnOSPWvndQID AQABMA0GCSqGSIb3DQEBBQUAA4GBAKlPww3HZ74sy9mozS11534Vnjty637rXC0J h9ZrbWB85a7FkCMMXErQr7Fd88e2CtvgFZMN3QO8x3aKtd1Pw5sTdbgBwObJW2ul uIncrKTdcu1OofdPvAbT6shkdHvClUGcZXNY8ZCaPGqxmMnEh7zPRW1F4m4iP/68 DzFc6PLZ -END CERTIFICATE- -- 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] SSL Verify may fail if two certs with samesubjectarein the CA lookup
But how to tell your customers that you do not support all certs of the MS Root Certificate Program?? That's unexplanable to a user :-( If possible, you could add the trouble CA's yourself and import all others. I only had troubles with Verisign. Paul -- 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] SSL Verify may fail if two certs withsamesubjectarein the CA lookup
Correction (just for the record), they do not include them that's true, however when they are added to the store they are handled correctly. What if you add new CA's at the beginning of the list instead of append it to the end ? If OpenSsl searches the list and find the correct CA first, then the old CA won't probably be checked at all Paul -- 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] SSL Verify may fail if two certswithsamesubjectarein the CA lookup
That's no solution, since once those different certificates with the same name (subjectOneline) are included in the trusted CAs, verify will fail on one of those 'dups', depending on which one was found first. You could have a solution here: If you build a list of all certificates to import and sort then by filedate (most current date on top) then the latest CA will always be found first Paul -- 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] Need some help with OverbyteIcsLibEayEx
I've use ssl to encrypt/decrypt strings with D7/ ICS-V5 and want to convert it to D2009 I get an AV when trying to decrypt a string in a call to the dll. What am I doing wrong here ? When do I have to use ansi or unicode ? Paul I'm using these routines : Const RSA_PKCS1_PADDING = 1; function DecryptPrivateRSA( X : TX509Base; InBuf : Pointer; InSize : Cardinal; OutBuf : Pointer; var OutSize : Cardinal): Boolean; var Len : Word; PrivKey : PEVP_PKEY; BlockSize, Res : Integer; InBufPtr, OutBufPtr : PAnsiChar; begin Result := FALSE; if not Assigned(X) then exit; //raise Exception.Create('Cert not assigned'); PrivKey := X.PrivateKey; if PrivKey = nil then exit; //raise Exception.Create('Private key not loaded'); if PrivKey^.type_ EVP_PKEY_RSA then exit; //raise Exception.Create('Not a RSA key'); Blocksize := f_EVP_PKEY_size(PrivKey); if (OutSize = 0) or (InSize = 0) or (InBuf = nil) or (OutBuf = nil) or (InSize OutSize) then begin OutSize := InSize; Exit; end; OutSize := 0; InBufPtr := InBuf; OutBufPtr := OutBuf; repeat if InSize BlockSize then Len := BlockSize else Len := InSize; if Len 0 then begin Res := f_RSA_private_decrypt( error here Len, InBufPtr, OutBufPtr, PrivKey^.rsa, RSA_PKCS1_PADDING); Dec(InSize, Len); Inc(InBufPtr, Len); Inc(OutBufPtr, Res); Inc(OutSize, Res); end; until InSize = 0; Result := TRUE; end; function DecryptUrl(Password, DecryptPem, UrlFName: ansistring): ansistring; var Buf : Pointer; Len : cardinal; S : ansistring; X : TX509Base; Fname : ansistring; Strm : TFileStream; I : Integer; begin result:= ''; X := TX509Base.Create(nil); try try if not FileExists(UrlFName) then begin ShowMessage('Url file missing'); // RpMessageDlg('RemotePass', msgYes, msgNo, 'Url file missing', rpmOK); exit; end; Strm:= TFileStream.Create(UrlFName, fmOpenRead); try Strm.ReadBuffer(I, SizeOf(Integer)); SetLength(S, I); Strm.ReadBuffer(S[1],I); finally Strm.Free; end; except end; X.PrivateKeyLoadFromPemFile(DecryptPem, Password); Len:= length(s); GetMem(Buf, Len); Move(S[1], buf^, Len); if DecryptPrivateRSA(X, Buf, Len, @S[1], Len) then begin SetLength(S, Len); FreeMem(Buf); end else begin S:= ''; ShowMessage('Invalif Key file'); end; finally X.Free; end; result:= S; end; -- 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] 5000+ Connections TCP Server
I've been reading through the mail archieves and would like to know if there are any tips / example code for creating a TCP server that can handle high (5000+) simultaneous connections. It seems the method to assign upto 500 connections per thread seems to be the best method. Is there an example of how to develop the server so that a connection can be assigned to a certain thread. Not yet, but you are not the first to ask. The problem is ICS is written and supported by volunteers, and unless those volunteers have new projects that need new features, there needs to be an incentive for the time needed to be allocated. My application is a server that will handle connections from many thousands on devices sending an XML stream (around 5 - 100k in size) at set intervals. This XML is stored to a DB for processing at a later date. It is likely that in the future there will be many thousands of these devices sending information. Are you planning on writing thousands of streams to the database simultaneously in real time, or is thousands of open and idle connections sending XML once a minute, or once an hour or something? Is this two way so the originator gets a response from the database, or one-way so data is simply collected and can be queued before being written. Potentially there will be 1000's of streams opening, sending data and then closing evey 15 minuntes. Writing to a database is intensive, using ADO I believe each connection uses it's own thread, so you can end up with thousands of threads running on the server, in addition to your own threads. The data will be written to DB (file could be used if better performance) and confirmation sent back to the client indicating everything was stored correctly. If you are only collecting data, you may want to look at my ComCap application, which uses ICS to handle up to 400 streams using a single thread, and will parse and write data from those streams to a SQL database. It has been tested with 250 streams being written to files (created by the related ComGen tool) but not 250 database connections! http://www.magsys.co.uk/comcap/ Angus Another possibility is to have multiple servers listening on different ports. If each server ran on a seperate thread would this increase load handling? The only problems is that all connections would be incoming to the same port so I'd need to redirect traffic from port x to the servers on port y / z depending on which server had enough free load. Is this something that is possible? -- 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] Check SSL certificate
Why was it a problem? You would maintain a CA bundle certificate file that included virtually all known, serious CA root and intermediate certificates. the problem is now that I need the most common CA's. I currently only have VeriSign and GlobalSign and I don't know what the most common are (for enterprise customers only) The application would ship with this file and/or download it from your website if (an update was) required. That would be the customers website which I have no control over and believe me, every step they have to do themselves results in a lot of not so friendly mails ... Self-signed certificates have to be accepted/trusted once by users, for a persistent trust add them to the certificate directory. Self-signed certificates are not allowed here Maintaining all implemantations is not an easy task. A customer implementation is splitted over several locations and a typical implementation has about 12 different servers worldwide, has about 20 different applications and about 70 webservices working together. Of course, each customer has it's own url's and certificates. It's not that we can't set our own specifications though: for the certificates we can give them a choise of the supported CA's from which they can choose. I don't want to limit the choise between VeriSign and GlobalSign either. Do you know where I can find the most common CA's ? thanks Paul -- 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] Check SSL certificate
It's possible to download and install all certs of the Windows root certificate program: http://support.microsoft.com/?scid=kb%3Ben-us%3B931125x=14y=13 (or google for KB931125) They are a lot! thanks a lot, Paul -- 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] Check SSL certificate
I've always checked ssl-certificates with a known CA in my applications. I want users to automatically check certificates within their own implementation. Some of them uses different CA's for their servers and webservices. How can I check these different certificatites without any notification popup (except on invalid certs) ? thanks, Paul -- 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] Check SSL certificate
One not 100% reliable workaround would be to create a new bundle PEM certificate file from the windows certificate stores when the app starts before the context is initialized (see PemTool demo). However if the CA certificate was not yet in the local Windows store this method won't work :( I've done in that a few applications, but I thought there would be a better way. This is for a small application that is downloaded for each run and I added the CA the company uses to keep the exe as small as possible Some of our clients go CA shopping, so you never know the CA to check. You centainly don't want to know their answers whenever this happens, especially enterprise clients... thanks, Paul -- 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] Check SSL certificate
Another idea was to mimic the MS certificate server. The application could download a missing certificate from your website. Is not save when you don't where you are downloading it from (I have no control of what our clients are doing) I can imagine the trouble, however OpenSSL was choosen as the SSL implementation with cross platform support in mind, I still think this was a good decision. It still is. Maybe I will add the most common CA's . Enterprise clients usually use GlobalSign, VeriSign, .. Is it better to add them seperately and use RpSslContext.SslCAPath or combine them as CRLF separated certs in a single file using RpSslContext.SslCAFile ? If I import the certificates, the exe will grow with ~ 130kB and that's unacceptable for 1 application Paul -- 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] 10K timers demo and a new timer class (ICS V7)
I'll probably need new glasses, but where can I find the MiscDemos folder ? Paul - Original Message - From: Arno Garrels arno.garr...@gmx.de To: ICS support mailing twsocket@elists.org Sent: Friday, July 31, 2009 9:30 PM Subject: [twsocket] 10K timers demo and a new timer class (ICS V7) Hi all, I uploaded a new timer class and a demo to the repository this week. My idea is to use TIcsThreadTimer for bandwidth control at the root. Francois and myself already tested it and it seems stable, however I appreciated if more testers confirmed it's bug free and solid enough to be implemented as the default timer for bandwidth control in the base socket component. The demo includes a loop option, which can be used to let it run over night preferable in the IDE under the debugger. Description: TIcsThreadTimer implements a custom timer class. In doesn't use windows API timers but sends custom timer messages to an already existing ICS-window from one or more threads. It uses resources (handles) very sparingly so 10K timers are virtually possible, see OverbyteIcsThreadTimerDemo. The demo is in MiscDemos folder. http://wiki.overbyte.be/wiki/index.php/FAQ#How_to_get_ICS Please post your test results and thoughts to this list, thank's a lot! -- Arno Garrels [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html -- 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] ICS V7 bug ?
- Original Message - From: Arno Garrels arno.garr...@gmx.de Every new version grows a bit, MinGW produces rather large binaries, however they do not depend on MS distributables. The smallest libraries can be built with good old VS6, the libraries distributed with Subversion server are AFAIR built with VS6. is there much change with V 0.9.7 which works fine with D7 ? Are the new in ICS V7 calls to the dll's that are not called at all in ICS V5? If not, then I could use the old ssl-dll's. Paul -- 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] ICS V7 bug ?
I always put the libraries in the application folder. For one application, I probably need to switch to another library. I tested RTC yesterday (RealThinClient). It can use commercial SSL libraries like SecureBlackBox of which I have a license of an older version. But after a simple test , I'll discard RTC ICS with SSL was twice as fast as RTC with plain http. It's not so thin either, the compiled exe was 126 kb larger and there's another 200kb for SecureBlackBox , but the complete package would be smaller because I don't need openSsl . Using cab compression, the 2 openSSl libraries are still 613 kB Paul - Original Message - From: Arno Garrels arno.garr...@gmx.de To: ICS support mailing twsocket@elists.org Sent: Sunday, July 26, 2009 10:02 AM Subject: Re: [twsocket] ICS V7 bug ? Angus Robertson - Magenta Systems Ltd wrote: Here is an article from Microsoft concerning the msvcr71.dll and where to place it. Another case of DLL hell. The only safe way to install an ICS SSL application is to install the two or three SSL and runtime DLLs in the same directory as the program. Otherwise you may get conflicts with other applications also using OpenSSL but using different SSL version DLLs that are either installed in the windows directory or available via a path (as is Subversion). I learnt this the hard way, installing Subversion broke one of my servers. Several FTP clients also use OpenSSL. I recently managed to build OpenSSL with C++ Builder, so one was able link .obj files rather than the libraries, though I'm not sure whether OpenSSL license allowed this for closed-source applications. -- 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
Re: [twsocket] ICS V7 bug ?
Hi Francois, - Original Message - From: Francois Piette francois.pie...@skynet.be To: ICS support mailing twsocket@elists.org Sent: Friday, July 24, 2009 11:43 AM Subject: Re: [twsocket] ICS V7 bug ? If it is not reproductible on your PC, it is likey that the cause is not in D2009-ICSV7 but in a race condition. One of the most difficult bug type to find ! I now have comfirmation of several clients that https is broken. I've submitted them with simple testprograms (D7-IcsV5 and D2009 Ics-V7) that does a simple GET request to a webservice. The testprogram compiled with D2009-IcsV7 fails on those computers (only https) The probem is in Ics-V7 Paul -- 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] ICS V7 bug ?
I just finisched converting a lage project to D2009 and thought all went fine. I have no problems here with new fast PC's. The server is ICS-http with a hardware SSL ofloader, so no problems there either. The problem came when we asked some of our client to test the new beta version ... All clients with an older PC and fast connection to the server have problems, even with a simple testprogam that just does a simple GET request to a https webservice. All they get is a statuscode = 0, which doesn't make sense anyways. You can start converting it to BCB2010 which isn't that hard, but you have to wait for the releasse until this has been fixed Paul - Original Message - From: Fastream Technologies ga...@fastream.com To: ICS support mailing twsocket@elists.org Sent: Saturday, July 25, 2009 3:50 PM Subject: Re: [twsocket] ICS V7 bug ? Hello Paul, Our reverse proxy is v7 under BCB2007. So might not have been an exact reproduction anyway... But we plan to upgrade our compiler to BCB2010 (Unicode) so this is interesting. Regards, SZ On Sat, Jul 25, 2009 at 3:41 PM, Paul paul.blommae...@telenet.be wrote: Hi Francois, - Original Message - From: Francois Piette francois.pie...@skynet.be To: ICS support mailing twsocket@elists.org Sent: Friday, July 24, 2009 11:43 AM Subject: Re: [twsocket] ICS V7 bug ? If it is not reproductible on your PC, it is likey that the cause is not in D2009-ICSV7 but in a race condition. One of the most difficult bug type to find ! I now have comfirmation of several clients that https is broken. I've submitted them with simple testprograms (D7-IcsV5 and D2009 Ics-V7) that does a simple GET request to a webservice. The testprogram compiled with D2009-IcsV7 fails on those computers (only https) The probem is in Ics-V7 Paul -- 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] ICS V7 bug ?
Hi Arno, I've tried with a limiter, but that's useles if you only do a simple get request. I'll send you the test. Paul - Original Message - From: Arno Garrels arno.garr...@gmx.de To: ICS support mailing twsocket@elists.org Sent: Saturday, July 25, 2009 4:16 PM Subject: Re: [twsocket] ICS V7 bug ? Without information nobody is able to help. If you think the error triggers with slower connections you may want to try http://www.netlimiter.com/ to limit bandwith. If you have a simple test case (source code) you are welcome to send me a copy. Without a repeatable test case a possible issue cannot be fixed. -- 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
Re: [twsocket] ICS V7 bug ?
Can you publish the test program and everything needed to reproduce the bug ? not for the moment, I can't publish it myself (no access), but I can add the routine here I've sent the complete source to Arno If the bug occurs only on some computers, it is likely that it comes from those computers. What is the common point between those computers ? Which OS version, winsock and so on? Do they have the same OpenSSL DLL ? No, it's specific : on slower PC's 2Ghz. All were XP SP2 All have the same Dll's, they were supplied with the testprogram (9.8.i) The same program with D7-ICSV5 works averywhere this is the routine used : function TfrmMain.LoadServersConfig: integer; begin try HttpLocCli.Proxy := ''; HttpLocCli.ProxyPort := '8080'; HttpLocCli.ProxyUsername := ''; HttpLocCli.ProxyPassword := ''; HttpLocCli.RcvdStream:= TMemoryStream.Create; try HttpLocCli.URL:= 'https://betacfg.remotepass.com/unatpreinstall.aspx'; T1:= GetTickCount; HttpLocCli.Get; T2:= GetTickCount; label2.Caption:= 'Time ms : ' + IntToStr(T2-T1); result:= HttpLocCli.StatusCode; finally HttpLocCli.RcvdStream.Free; end; except Result:= -1; end; end; -- 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] ICS V7 bug ?
What about LSP ? Do you have the opportunity to run your sample program on a VMWare virtual machine running on one of those computers ? WMWare Player is free of charge. No, the users are just using computers at work. I don't think they can even think of doing that. There's only one person I can ask to test during the weekend (standby for the weekend) You also talked about a hardware acceleration. Does the issue happend when it is used ? It has been in use for about 15 months now and the current applications (D7-ICSV5) have no problems with it on the same problem-PC's If yes, try without. No way we can do that. The servers are located in a center where we have no access at all. And I'm 100% sure they won't allow it either: it would affect other servers from other companies also I know it's a pain in the @ss to test this. I only know all these clients also have a fast internet connection, but I'm not sure it has anything to do with it. The same testprogram with D7-ICSV5 has no problems at all. Paul -- 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] ICS V7 bug ?
a testresult : both correct SSl dll's are available! 19:00:19:109 State = httpNotConnected 19:00:19:109 Login betacfg.remotepass.com 19:00:19:109 State = httpDnsLookup 19:00:19:140 State = httpDnsLookupDone 19:00:19:140 connect to 62.213.206.217/443 19:00:19:140 TWSocket will connect to 62.213.206.217:443 19:00:19:156 SessionConnected 19:00:19:156 State = httpConnected 19:00:19:156 State = httpWaitingHeader 19:00:19:156 7 header lines to send GET /unatpreinstall.aspx HTTP/1.1 Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */* Connection: Keep-alive User-Agent: Mozilla/4.0 (compatible; MSIE 4.0) Host: betacfg.remotepass.com:443 Pragma: no-cache Proxy-Connection: Keep-alive 19:00:19:156 00A01FD0 PutDataInSslBuffer 212 len 257 [1] 19:00:19:156 00A01FD0 SslTryToSend 212 19:00:19:156 SendRequest Done 19:00:19:156 00A01FD0 StartSslHandshake 212 19:00:19:203 00A01FD0 Fatal error SSL handshake 212 EIcsLibeayException Unable to load LIBEAY32.DLL. Error #0 19:00:19:203 SessionClosed Error: 10053 19:00:19:203 State = httpReady 19:00:19:203 PrepareNTLMAuth end, FStatusCode = 0 FProxyAuthNTLMState=0 FAuthNTLMState=0 19:00:19:203 PrepareNTLMAuth end, FStatusCode = 0 FProxyAuthNTLMState=0 FAuthNTLMState=0 19:00:19:203 RequestDone -- 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] ICS V7 bug ?
Wow, It works now with new ssl dll's But now I have another problem : The new dll's are 630 kB larger then the one's I have (same version 0.9.8.9). No problem for most applications execpt for 1: it has to downloaded for every run. The link to version 9.8.h on the webpage doesn't exist. Was this a more compact one then version 9.8.i ? Paul - Original Message - From: Arno Garrels arno.garr...@gmx.de To: ICS support mailing twsocket@elists.org Sent: Saturday, July 25, 2009 7:20 PM Subject: Re: [twsocket] ICS V7 bug ? Paul wrote: a testresult : both correct SSl dll's are available! If you don't use the libraries from http://wiki.overbyte.be/wiki/index.php/FAQ#How_to_get_ICS they may depend on some MS-libraries not available on the target computer. Anyway I would always initialize OpenSSL explicitly by a call to SslContext.InitContext or in a multi-threaded application by setting SslStaticLock.Enabled to TRUE in main thread before the first connection attempt. This will raise an exception if something went wrong with context initialization outside the THttpCli code. -- Arno Garrels 19:00:19:109 State = httpNotConnected 19:00:19:109 Login betacfg.remotepass.com 19:00:19:109 State = httpDnsLookup 19:00:19:140 State = httpDnsLookupDone 19:00:19:140 connect to 62.213.206.217/443 19:00:19:140 TWSocket will connect to 62.213.206.217:443 19:00:19:156 SessionConnected 19:00:19:156 State = httpConnected 19:00:19:156 State = httpWaitingHeader 19:00:19:156 7 header lines to send GET /unatpreinstall.aspx HTTP/1.1 Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */* Connection: Keep-alive User-Agent: Mozilla/4.0 (compatible; MSIE 4.0) Host: betacfg.remotepass.com:443 Pragma: no-cache Proxy-Connection: Keep-alive 19:00:19:156 00A01FD0 PutDataInSslBuffer 212 len 257 [1] 19:00:19:156 00A01FD0 SslTryToSend 212 19:00:19:156 SendRequest Done 19:00:19:156 00A01FD0 StartSslHandshake 212 19:00:19:203 00A01FD0 Fatal error SSL handshake 212 EIcsLibeayException Unable to load LIBEAY32.DLL. Error #0 19:00:19:203 SessionClosed Error: 10053 19:00:19:203 State = httpReady 19:00:19:203 PrepareNTLMAuth end, FStatusCode = 0 FProxyAuthNTLMState=0 FAuthNTLMState=0 19:00:19:203 PrepareNTLMAuth end, FStatusCode = 0 FProxyAuthNTLMState=0 FAuthNTLMState=0 19:00:19:203 RequestDone -- 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] ICS V7 bug ?
For that one application, it currently uses dll's version 0.97 (Ics V5) They are 782kb/156 kb and all works fine on every PC The new ones for Ics V7 are 1498/307 kb. A huge difference to get the same result .. Paul - Original Message - From: Angus Robertson - Magenta Systems Ltd an...@magsys.co.uk To: twsocket@elists.org Sent: Saturday, July 25, 2009 8:27 PM Subject: Re: [twsocket] ICS V7 bug ? Wow, It works now with new ssl dll's But now I have another problem : The new dll's are 630 kB larger then the one's I have (same version 0.9.8.9). The original two SSL DLLs are dependent upon msvcr71.dll which is a Microsoft runtime DLL sized at 340K, and you have to have distribute that DLL with your application or take pot luck the client has some uncorrupted version already. So you either distribute three DLLs, or the version that Arno suggested which does need any Microsoft runtimes because they are compiled with a non-Microsoft compiler, but which creates slightly larger code. 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] ICS V7 bug ?
I have a few error reports of an application compiled with D2009. I've made a few testprograms to get the source of the error. On startup, a small xml is downloaded and this goes wrong with D2009-ICSV7. The returned statuscode = 0. The same testprogram compiled with D7-ICSV5 works fine. I can't replicate it on my development PC: it works fine here. The websevice is behind a hardware SSL decryptor. Any ideas ? Does ICSV7 need more processor power ? thanks, Paul -- 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] ICS V7 bug ?
Hi Francois, I think it's processing power. I have now 2 client that have a pc which is +/- 3/4 years old. It fails on both. Newer PCs fine. So this is a probably a race condition problem in ICS V7 Paul - Original Message - From: Francois Piette francois.pie...@skynet.be To: ICS support mailing twsocket@elists.org Sent: Friday, July 24, 2009 11:43 AM Subject: Re: [twsocket] ICS V7 bug ? I have a few error reports of an application compiled with D2009. I've made a few testprograms to get the source of the error. On startup, a small xml is downloaded and this goes wrong with D2009-ICSV7. The returned statuscode = 0. The same testprogram compiled with D7-ICSV5 works fine. I can't replicate it on my development PC: it works fine here. The websevice is behind a hardware SSL decryptor. Any ideas ? If it is not reproductible on your PC, it is likey that the cause is not in D2009-ICSV7 but in a race condition. One of the most difficult bug type to find ! Does ICSV7 need more processor power ? Compared to what ? Anything compiled with D2009 requires au little bit more power than when compiled with previous releases since unicode string are doubled in size compared to AnsiString and there are a lot of conversions here and there. -- 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] ICS V7 bug ?
I'm now sure it's an ICS-SSL bug I've asked them to check on http and https. Https fails. We all seem to have the same ISP. upload speed is 1.25 MB/s Paul -- 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] ICS V7 bug ?
It's very difficult to ask a client to install a reverse proxy to test. I have no problems here. I should find a client with an older PC with a lower speed internet connection to see if it works there. We all have the same :25MB/s download and 1.25MB/s upload. anyone here has a lower speed connection and an older PC (2Ghz or less) ? I can send the test program Paul - Original Message - From: Fastream Technologies ga...@fastream.com To: ICS support mailing twsocket@elists.org Sent: Friday, July 24, 2009 12:23 PM Subject: Re: [twsocket] ICS V7 bug ? Hello, Maybe you should put our ICS reverse proxy in front to see if it is ICSv7 that is failing: www.iqreverseproxy.com . Easy to configure with GUI and has 30-days trial. Regards, SZ On Fri, Jul 24, 2009 at 1:13 PM, Paul paul.blommae...@telenet.be wrote: I'm now sure it's an ICS-SSL bug I've asked them to check on http and https. Https fails. We all seem to have the same ISP. upload speed is 1.25 MB/s Paul -- 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] ICS V7 bug ?
Maybe you can use a virtual machine to have something slower ? Maybe you can do a large upload/download during you testing so that the internet looks slow ? A client has tested during a 100mb file download. The result is still the same. Paul -- 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] ICS V7 bug ?
Tested it on my PC also during a 100MB download, but here everything works correct Paul -- 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] Ipv6
Are there any plans for the near future ? Paul - Original Message - From: Francois Piette francois.pie...@skynet.be To: ICS support mailing twsocket@elists.org Sent: Tuesday, July 14, 2009 11:53 AM Subject: Re: [twsocket] Ipv6 Any plans yet ? Not yet. btw: Does OpenSSL support IPv6 ? -- francois.pie...@overbyte.be Author of ICS (Internet Component Suite, freeware) Author of MidWare (Multi-tier framework, freeware) 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] Ipv6
I don't think it's very urgent, but the complaint I got from a US customer says that it's use is on the way. Paul - Original Message - From: Arno Garrels arno.garr...@gmx.de No, not as long as there are people using and supporting it actively. However users will move to another component suite when they need basic features not included in ICS. IMO IPv6 will become such a basic feature rather soon. Competitors of ICS already support IPv6. -- 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] Ipv6
Any plans yet ? I got my first complaint from a customer Paul -- 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] Primary DNS suffix
Is it possible to get this using ICS ? thanks, Paul -- 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] OT: WinHttp proxy detection
I'm trying to get the IE proxy settings using WinHttp in the sample, WinHttpGetIEProxyConfigForCurrentUser works as expected, but WinHttpGetProxyForUrl always fails with errocode 87 (ERROR_INVALID_PARAMETER) The call WinHttpGetProxyForUrl is neccesary with pac/wpad scripts Anyone has an idea ? Maybe there's something wrong with the C++ conversion ? MS link: http://msdn.microsoft.com/en-us/library/aa384122(VS.85).aspx thanks, Paul program sample: the program has a button and a Memo uses procedure ShowInfo(S: string); begin frmMain.Memo1.Lines.Add(S); end; function GetProxyForUrl(Url: string; var Proxy, ProxyBypass, AutoConfigUrl: string): DWord; var HLib: THandle; Config: TWinHttpCurrentUserIEProxyConfig; AutoProxyOptions: TWinHttpAutoProxyOptions; ProxyInfo: TWinHttpProxyInfo; fDoAutoFroxy: boolean; hSession: HINTERNET; begin fDoAutoFroxy:= false; AutoProxyOptions.dwFlags:= 0; AutoProxyOptions.dwAutoDetectFlags:= 0; AutoProxyOptions.lpvReserved:= nil; AutoProxyOptions.dwReserved:= 0; Result:= 0; HLib := LoadLibrary ('winhttp.dll'); if HLib = 0 then exit; try if WinHttpProxy.WinHttpGetIEProxyConfigForCurrentUser(Config) then begin // save what we got already Proxy:= Config.lpszProxy; ProxyBypass:= Config.lpszProxyBypass; AutoConfigUrl:= Config.lpszAutoConfigUrl; ShowInfo('ProxyConfigForCurrentUser result:'); ShowInfo('Proxy = ' + Proxy); ShowInfo('ProxyBypass = ' + ProxyBypass); ShowInfo('AutoConfigUrl = ' + AutoConfigUrl); ShowInfo('AutoDetect = ' + BoolToStr(Config.fAutoDetect)); if Config.fAutoDetect then begin // IE configured for auto-detect AutoProxyOptions.dwFlags:= WINHTTP_AUTOPROXY_AUTO_DETECT; AutoProxyOptions.dwAutoDetectFlags:= WINHTTP_AUTO_DETECT_TYPE_DHCP + WINHTTP_AUTO_DETECT_TYPE_DNS_A; fDoAutoFroxy:= true; end; if Config.lpszAutoConfigUrl '' then begin // IE uses pac AutoProxyOptions.dwFlags:= AutoProxyOptions.dwFlags + WINHTTP_AUTOPROXY_CONFIG_URL; AutoProxyOptions.lpszAutoConfigUrl:= Config.lpszAutoConfigUrl; fDoAutoFroxy:= true; end; end else begin // IE proxy config not available - try auto-detection AutoProxyOptions.dwFlags:= WINHTTP_AUTOPROXY_AUTO_DETECT; AutoProxyOptions.dwAutoDetectFlags:= WINHTTP_AUTO_DETECT_TYPE_DHCP + WINHTTP_AUTO_DETECT_TYPE_DNS_A; fDoAutoFroxy:= true; end; if fDoAutoFroxy then try // we need to create a temp internet session hSession:= WinHttpOpen(nil, WINHTTP_ACCESS_TYPE_NO_PROXY, nil, nil, 0); ShowInfo('Auto Detect'); // automatically supply client domain credentials AutoProxyOptions.fAutoLogonIfChallenged:= true; if WinHttpProxy.WinHttpGetProxyForUrl(hSession, PWideChar(Url), AutoProxyOptions, ProxyInfo) then begin Proxy:= ProxyInfo.lpszProxy; end else result:= GetLastError; finally WinHttpCloseHandle(hSession); end; finally FreeLibrary (HLib); end; end; procedure TfrmMain.Button1Click(Sender: TObject); var Proxy, ProxyBypass, AutoConfigUrl: string; ErrCode: DWord; begin ErrCode:= GetProxyForUrl('https://www.microsoft.com/en/us/default.aspx', ProxyBypass, AutoConfigUrl); ShowInfo('ErrCode = ' + IntToStr(ErrCode)); end; //-- //unit with WinHttp const and function calls: unit WinHttpProxy; interface uses Windows; type HINTERNET = Pointer; PWinHttpProxyInfo = ^TWinHttpProxyInfo; TWinHttpProxyInfo = record dwAccessType: DWORD;// see WINHTTP_ACCESS_ types below lpszProxy : LPWSTR; // proxy server list lpszProxyBypass : LPWSTR; // proxy bypass list end; PWinHttpAutoProxyOptions = ^TWinHttpAutoProxyOptions; TWinHttpAutoProxyOptions = record dwFlags : DWORD; dwAutoDetectFlags : DWORD; lpszAutoConfigUrl : LPWSTR; //PWideChar; lpvReserved : Pointer; dwReserved: DWORD; fAutoLogonIfChallenged: BOOL; end; PWinHttpCurrentUserIEProxyConfig = ^TWinHttpCurrentUserIEProxyConfig; TWinHttpCurrentUserIEProxyConfig = record fAutoDetect : boolean; lpszAutoConfigUrl : LPWSTR; //PWideChar; lpszProxy : LPWSTR; //PWideChar; lpszProxyBypass : LPWSTR; //PWideChar; end; const winhttpdll = 'winhttp.dll'; WINHTTP_ACCESS_TYPE_DEFAULT_PROXY = 0; WINHTTP_ACCESS_TYPE_NO_PROXY= 1
Re: [twsocket] OT: Message processing with modal form shown
Sometimes, obviously randomly, it happens that if a modal form is shown (nothing else but shown, nothing blocking) timer messages are not processed, any idea why? Background: In the timer event I look for items in a log-list and display them in a TMemo. I have never had problems with that. Maybe the update in the TMemo is blocking the form's message loop. Paul -- 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] TMimeDecode
Hi, I'm trying to use TMimeDecode (ICS v6 RC1 in C++ RAD Studio 2009) and get no result. The Pascal demo crashes when I attempt to decode. I have tried the ICS v5 release using BDS 2006 and everything works as required. Are there any fixes I can apply? Regards, Paul. -- 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] vFAQ - SMTPCli - Component not ready
Possibly you need breaks? :-) switch(RqType) { case smtpConnect: SMTP-Helo(); break; case smtpHelo: SMTP-MailFrom(); break; case smtpEhlo: SMTP-Auth(); break; case smtpAuth: SMTP-MailFrom(); break; case smtpMailFrom: SMTP-RcptTo(); break; case smtpRcptTo: SMTP-Data(); break; case smtpData: SMTP-Quit(); break; } Ole Braad-Sørensen skrev: I know this is a vFAQ, but please read anyway :-) Using Codegear C++2009, I have tried to use the example Mailsnd. My code: SMTP-Host = Data-TAoplysning-FieldByName(Mailserver)-AsString; SMTP-Port = Data-TAoplysning-FieldByName(Port)-AsInteger; SMTP-SignOn = Data-TAoplysning-FieldByName(Email1)-AsString; SMTP-FromName = Data-TAoplysning-FieldByName(Firma)-AsString; SMTP-HdrFrom = Data-TAoplysning-FieldByName(Email1)-AsString; SMTP-HdrTo = Edit1-Text; SMTP-HdrSubject = Edit3-Text; SMTP-AuthType = smtpAuthNone; SMTP-Username = Data-TAoplysning-FieldByName(Brugernavn)-AsString; SMTP-Password = Data-TAoplysning-FieldByName(MailKodeord)-AsString; SMTP-HdrPriority = smtpPriorityNone; SMTP-ConfirmReceipt = false; SMTP-RcptName-Clear(); SMTP-RcptNameAdd(Edit2-Text,Edit3-Text,Edit4-Text); SMTP-MailMessage = Memo1-Lines; SMTP-Connect(); And the code for RequestDone: switch(RqType) { case smtpConnect: SMTP-Helo(); case smtpHelo: SMTP-MailFrom(); case smtpEhlo: SMTP-Auth(); case smtpAuth: SMTP-MailFrom(); case smtpMailFrom: SMTP-RcptTo(); case smtpRcptTo: SMTP-Data(); case smtpData: SMTP-Quit(); } When using above code I get the famous error Component not ready and the mail-server log show: May 11 07:40:24 apollon sendmail[19691]: n4B5eNZs019691: [192.168.1.1] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA I know I am missing something, but can't figure out what... Any ideas of what I should look for...? Regards: Ole Braad-Sorensen www.foldrenser.dk -- 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] Proxy question OverbyteICSHttpstst...
Hello, I'm testing OverbyteICSHttpstst GET that is failing when passed through Squid Proxy 2.7. The request is successful when used without the proxy. The request is successful using Firefox or IE using the Proxy. Following is the log generated by the failed request in OverbyteICSHttpstst. If you notice something that might help me understand why this is failing please let me know. The request seems to be handled by the proxy (at least initially) successfully, and then SSL handshake to the site also seems to be successful, but from what I can tell the GET never makes it to the host. Thanks, Paul Connecting... 13:54:50:800 State = httpNotConnected 13:54:50:800 Login 192.168.123.29 13:54:50:800 State = httpDnsLookup 13:54:50:800 State = httpDnsLookupDone 13:54:50:800 connect to 192.168.123.29/3128 13:54:50:800 TWSocket will connect to 192.168.123.29:3128 13:54:50:800 SessionConnected 13:54:50:815 State = httpConnected 13:54:50:815 State = httpWaitingProxyConnect 13:54:50:815 5 header lines to send CONNECT thesite.domain.com:443 HTTP/1.1 User-Agent: Mozilla/4.0 (compatible; ICS; MSIE 4.0) Host: thesite.domain.com:443 Proxy-Connection: Keep-Alive Content-Length: 0 cmd CONNECT thesite.domain.com:443 HTTP/1.1 cmd User-Agent: Mozilla/4.0 (compatible; ICS; MSIE 4.0) cmd Host: thesite.domain.com:443 cmd Proxy-Connection: Keep-Alive cmd Content-Length: 0 cmd 13:54:50:815 009DD874 PutDataInSendBuffer 3808 len 179 [1] 13:54:50:831 009DD874 TryToSend 3808 13:54:50:831 SendRequest Done 13:54:50:831 009DD874 TryToSend 3808 13:54:50:831 009DD874 TryToSend 3808 13:54:50:940 Data available. Len=39 13:54:50:956 Proxy connected: HTTP/1.0 200 Connection established 13:54:50:956 Start SSL handshake 13:54:50:956 009DD874 StartSslHandshake 3808 13:54:50:956 009DD874 InitSSLConnection 3808 13:54:50:956 009DD874 BIO_ctrl(sslbio, BIO_C_SET_SSL, BIO_NOCLOSE, 0xDD3330) = 1 [2] 13:54:50:956 ICB SSL_CB_HANDSHAKE_START 13:54:50:971 ICB SSL_connect: before/connect initialization 13:54:50:971 ICB SSL_connect: SSLv2/v3 write client hello A 13:54:50:971 ICB SSL_connect: error in SSLv2/v3 read server hello A 13:54:50:971 009DD874 BIO_read(sslbio, 0x1, 0) = -1 [3] 13:54:50:971 009DD874 BIO_should_retry(sslbio) = 1 [4] 13:54:50:971 009DD874 TriggerEvent sslFdRead 3808 13:54:50:987 009DD874 TriggerEvent sslFdWrite 3808 13:54:50:987 SslAsyncSelect 3808, 1 FD_READ 13:54:50:987 009DD874 TCustomSslWSocket.Do_FD_READ 3808 13:54:50:987 009DD874 BIO_ctrl_get_read_request(nbio) = 7 [5] 13:54:50:987 009DD874 Winsock recv( 3808, 0x12DD4C, 7, 0) = -1 [6] 13:54:50:987 009DD874 TriggerEvents 3808 SslState: SSL_ST_INIT // MayFD_Read=0 MayDoRecv=-1 MayFD_Write=-1 MaySslTryToSend=-1 bSslAllSent=-1 bAllSent=-1 13:54:51:003 009DD874 BIO_ctrl_pending(nbio) = 88 [7] 13:54:51:003 009DD874 BIO_ctrl_get_write_guarantee(nbio) = 4096 [8] 13:54:51:003 SslAsyncSelect 3808, 2 FD_WRITE 13:54:51:003 009DD874 TCustomSslWSocket.Do_FD_WRITE 3808 13:54:51:003 009DD874 BIO_ctrl_pending(nbio) = 88 [9] 13:54:51:003 009DD874 BIO_read(nbio, 0x12BD64, 88) = 88 [10] 13:54:51:018 009DD874 my_RealSend (0xEE0, 1228132, 88) = 88 [11] 13:54:51:018 009DD874 BIO_ctrl_pending(nbio) = 0 [12] 13:54:51:018 009DD874 TriggerEvents 3808 SslState: SSL_ST_INIT // MayFD_Read=0 MayDoRecv=-1MayFD_Write=-1 MaySslTryToSend=-1 bSslAllSent=-1 bAllSent=-1 13:54:51:018 009DD874 BIO_ctrl_pending(nbio) = 0 [13] 13:54:51:018 009DD874 BIO_ctrl_get_write_guarantee(nbio) = 4096 [14] 13:54:51:018 009DD874 TCustomSslWSocket.Do_FD_WRITE 3808 13:54:51:034 009DD874 BIO_ctrl_pending(nbio) = 0 [15] 13:54:51:034 009DD874 BIO_read(nbio, 0x12BD70, 0) = 0 [16] 13:54:51:034 009DD874 TriggerEvents 3808 SslState: SSL_ST_INIT // MayFD_Read=0 MayDoRecv=-1 MayFD_Write=-1 MaySslTryToSend=-1 bSslAllSent=-1 bAllSent=-1 13:54:51:034 009DD874 BIO_ctrl_pending(nbio) = 0 [17] 13:54:51:034 009DD874 BIO_ctrl_get_write_guarantee(nbio) = 4096 [18] 13:54:51:034 009DD874 TCustomSslWSocket.Do_FD_WRITE 3808 13:54:51:050 009DD874 BIO_ctrl_pending(nbio) = 0 [19] 13:54:51:050 009DD874 BIO_read(nbio, 0x12BD70, 0) = 0 [20] 13:54:51:065 009DD874 TriggerEvents 3808 SslState: SSL_ST_INIT // MayFD_Read=0 MayDoRecv=-1 MayFD_Write=-1 MaySslTryToSend=-1 bSslAllSent=-1 bAllSent=-1 13:54:51:065 009DD874 BIO_ctrl_pending(nbio) = 0 [21] 13:54:51:065 009DD874 BIO_ctrl_get_write_guarantee(nbio) = 4096 [22] 13:54:51:143 009DD874 TCustomSslWSocket.Do_FD_READ 3808 13:54:51:143 009DD874 BIO_ctrl_get_read_request(nbio) = 7 [23] 13:54:51:143 009DD874 Winsock recv( 3808, 0x12DD74, 7, 0) = 7 [24] 13:54:51:159 009DD874 BIO_write(nbio, 0x12DD74, 7) = 7 [25] 13:54:51:159 009DD874 BIO_ctrl(nbio, BIO_CTRL_FLUSH, 0, 0x0) = 1 [26] 13:54:51:159 ICB SSL_connect: error in SSLv3 read server hello A 13:54:51:159 ICB SSL_connect: error in SSLv3 read server hello A 13:54:51:159 009DD874 BIO_read(sslbio, 0x1, 0) = -1 [27] 13:54:51:159 009DD874 BIO_should_retry(sslbio) = 1 [28] 13:54:51:175 009DD874
Re: [twsocket] OT: WM_USER or WM_APP
Hi Wilfried, use starting from WM_USER. You don't have to worry because you send / post messages to specific windows, so the right window will receive it. I know, but the problem is that the VCL can also post messages to the same window, especially 3rd party components. Paul -- 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] THttpCli exception handling in async mode
I'm trying to handle exceptions of all httpcli into a single procedure. I've have used HttpCli.CtrlSocket.onBgException, but this not fired at all. When I click twice on Button1, I get an error 'HttpCli is busy'. This is normal, but I wan't to intercept this. How ? Paul procedure TForm13.FormCreate(Sender: TObject); begin HttpCli1.CtrlSocket.OnBgException:= BGException; end; procedure TForm13.BGException(Sender: TObject; E: Exception; var CanClose: boolean); begin CanClose:= true; beep; end; procedure TForm13.Button1Click(Sender: TObject); begin HttpCli1.URL:= 'http://www.google.com/'; HttpCli1.RcvdStream:= TMemoryStream.create; HttpCli1.GetASync; end; procedure TForm13.HttpCli1RequestDone(Sender: TObject; RqType: THttpRequest; ErrCode: Word); begin HttpCli1.RcvdStream.Free; HttpCli1.RcvdStream:= nil; end; -- 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