Re: [twsocket] Report a strange problem about using TsslHttpCli(ICSv7)in Delphi 2010 thread.
Hoho, Many thanks. These code exactly worked. Why the same code don't have problem in Delphi 7? Can you fix these code to ICS source? Arno Garrels wrote: isgbuddy wrote: You don't need a Chinese windows. You just install East Asian input method in your windows. Then you will get this issue. Ok, finally it repeated. The problem is that the thread requires a message pump if it owns a window. It is _neither_ a problem related to ICS nor to Delphi! You'll see the same freeze when you create a window by calling Classes.AllocateHwnd(). Uncomment the commented lines below to make it working: unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) Button1: TButton; Edit1: TEdit; procedure FormCreate(Sender: TObject); private { Private declarations } public { Public declarations } end; TTestThread = class(TThread) private FHandle : HWND; procedure WndProc(var MsgRec: TMessage); protected procedure Execute;override; end; var Form1: TForm1; implementation {$R *.dfm} { TTestThread } procedure TTestThread.WndProc(var MsgRec: TMessage); begin MsgRec.Result := DefWindowProc(FHandle, MsgRec.Msg, MsgRec.wParam, MsgRec.lParam); end; procedure TTestThread.Execute; var Msg: TMsg; begin // PeekMessage(Msg, 0, 0, 0, PM_NOREMOVE); // Initialize thread's message queue FHandle := Classes.AllocateHWnd(WndProc); // Create a hidden window {while not Terminated do begin while PeekMessage(Msg, 0, 0, 0, PM_REMOVE) do begin if Msg.message = WM_QUIT then Terminate else begin TranslateMessage(Msg); DispatchMessage(Msg); end; end;} Sleep(1000); end; end; procedure TForm1.FormCreate(Sender: TObject); begin with TTestThread.Create(true) do Resume; 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 -- 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] Report a strange problem about using TsslHttpCli(ICSv7)in Delphi 2010 thread.
isgbuddy wrote: Hoho, Many thanks. These code exactly worked. Why the same code don't have problem in Delphi 7? Can you fix these code to ICS source? My code below does not work with Delphi 7 as well. You probably used ICS V5 with Delphi 7. I guess that the V5 components did not create their hidden window in the constructor but later when the window is actually needed. Using ICS in a thread anyway requires a working message pump, so I don't know whether it was a real improvement if we created the hidden window at some later time. Note that ICS creates one or more hidden windows and once a window is created there must exist a working message pump, otherwise entire application may freeze. -- Arno Garrels Arno Garrels wrote: isgbuddy wrote: You don't need a Chinese windows. You just install East Asian input method in your windows. Then you will get this issue. Ok, finally it repeated. The problem is that the thread requires a message pump if it owns a window. It is _neither_ a problem related to ICS nor to Delphi! You'll see the same freeze when you create a window by calling Classes.AllocateHwnd(). Uncomment the commented lines below to make it working: unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) Button1: TButton; Edit1: TEdit; procedure FormCreate(Sender: TObject); private { Private declarations } public { Public declarations } end; TTestThread = class(TThread) private FHandle : HWND; procedure WndProc(var MsgRec: TMessage); protected procedure Execute;override; end; var Form1: TForm1; implementation {$R *.dfm} { TTestThread } procedure TTestThread.WndProc(var MsgRec: TMessage); begin MsgRec.Result := DefWindowProc(FHandle, MsgRec.Msg, MsgRec.wParam, MsgRec.lParam); end; procedure TTestThread.Execute; var Msg: TMsg; begin // PeekMessage(Msg, 0, 0, 0, PM_NOREMOVE); // Initialize thread's message queue FHandle := Classes.AllocateHWnd(WndProc); // Create a hidden window {while not Terminated do begin while PeekMessage(Msg, 0, 0, 0, PM_REMOVE) do begin if Msg.message = WM_QUIT then Terminate else begin TranslateMessage(Msg); DispatchMessage(Msg); end; end;} Sleep(1000); end; end; procedure TForm1.FormCreate(Sender: TObject); begin with TTestThread.Create(true) do Resume; 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 -- 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] Report a strange problem about using TsslHttpCli(ICSv7)in Delphi 2010 thread.
OK. Anyway, Thank for your help. Arno Garrels wrote: isgbuddy wrote: Hoho, Many thanks. These code exactly worked. Why the same code don't have problem in Delphi 7? Can you fix these code to ICS source? My code below does not work with Delphi 7 as well. You probably used ICS V5 with Delphi 7. I guess that the V5 components did not create their hidden window in the constructor but later when the window is actually needed. Using ICS in a thread anyway requires a working message pump, so I don't know whether it was a real improvement if we created the hidden window at some later time. Note that ICS creates one or more hidden windows and once a window is created there must exist a working message pump, otherwise entire application may freeze. -- Arno Garrels Arno Garrels wrote: isgbuddy wrote: You don't need a Chinese windows. You just install East Asian input method in your windows. Then you will get this issue. Ok, finally it repeated. The problem is that the thread requires a message pump if it owns a window. It is _neither_ a problem related to ICS nor to Delphi! You'll see the same freeze when you create a window by calling Classes.AllocateHwnd(). Uncomment the commented lines below to make it working: unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) Button1: TButton; Edit1: TEdit; procedure FormCreate(Sender: TObject); private { Private declarations } public { Public declarations } end; TTestThread = class(TThread) private FHandle : HWND; procedure WndProc(var MsgRec: TMessage); protected procedure Execute;override; end; var Form1: TForm1; implementation {$R *.dfm} { TTestThread } procedure TTestThread.WndProc(var MsgRec: TMessage); begin MsgRec.Result := DefWindowProc(FHandle, MsgRec.Msg, MsgRec.wParam, MsgRec.lParam); end; procedure TTestThread.Execute; var Msg: TMsg; begin // PeekMessage(Msg, 0, 0, 0, PM_NOREMOVE); // Initialize thread's message queue FHandle := Classes.AllocateHWnd(WndProc); // Create a hidden window {while not Terminated do begin while PeekMessage(Msg, 0, 0, 0, PM_REMOVE) do begin if Msg.message = WM_QUIT then Terminate else begin TranslateMessage(Msg); DispatchMessage(Msg); end; end;} Sleep(1000); end; end; procedure TForm1.FormCreate(Sender: TObject); begin with TTestThread.Create(true) do Resume; 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 -- 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] OpenSsl Verify bug?
Hi, What do you think about this verify result? D:\openssl verify -CAfile TrustedCA.pem -untrusted MyServerCert.pem MyServerCert.pem MyServerCert.pem: OK TrustedCA.pem contains the issuer certs of MyServerCert.pem. -- 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] OpenSsl Verify bug?
Hi, What do you think about this verify result? D:\openssl verify -CAfile TrustedCA.pem -untrusted MyServerCert.pem MyServerCert.pem MyServerCert.pem: OK TrustedCA.pem contains the issuer certs of MyServerCert.pem. If the TrustedCA.pem file contains the root CA, what happen if you add the -propose option? -- 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] OpenSsl Verify bug?
RTT wrote: Hi, What do you think about this verify result? D:\openssl verify -CAfile TrustedCA.pem -untrusted MyServerCert.pem MyServerCert.pem MyServerCert.pem: OK TrustedCA.pem contains the issuer certs of MyServerCert.pem. If the TrustedCA.pem file contains the root CA, what happen if you add the -propose option? When -purpose isn't specified it defaults to any. When I set, for example, sslserver it makes no difference. Seems like the untrusted certificates are ignored, same happens in my Delphi code as well. -- 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] OpenSsl Verify bug?
Arno Garrels wrote: RTT wrote: Hi, What do you think about this verify result? D:\openssl verify -CAfile TrustedCA.pem -untrusted MyServerCert.pem MyServerCert.pem MyServerCert.pem: OK TrustedCA.pem contains the issuer certs of MyServerCert.pem. If the TrustedCA.pem file contains the root CA, what happen if you add the -propose option? When -purpose isn't specified it defaults to any. When I set, for example, sslserver it makes no difference. Seems like the untrusted certificates are ignored, same happens in my Delphi code as well. Just referenced that becuase the help say that Without this option no chain verification will be done so just testing to check if something in the code is being bypassed (i.e. checking list of untrusted certs) because of that. And you are sure the MyServerCert.pem is not, by mistake, self signed. -- 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] How to get certificate revocation lists with LDAP?
Hi, I'm working on a new ICS class that will hopefully ease certificate management. I'm thinking of a feature that downloads certificate revocation lists (CRL) from the URI or DirName value provided in many certs (see below). I'm a complete newbew with LDAP, was it possible to get the wanted CRL from just the DirName? Are there free LDAP components we may use in ICS? X509v3 extensions: X509v3 CRL Distribution Points: DirName:/C=US/O=Digital Signature Trust Co./OU=DST (ANX Network) CA/CN=CRL1 URI:http://ca.sia.it/secsrv/repository/CRL.der -- 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] OpenSsl Verify bug?
RTT wrote: And you are sure the MyServerCert.pem is not, by mistake, self signed. Very sure. -- 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
[twsocket] SysLog components
Hi ! I have added SysLog client and server components, and corresponding demos. Components are not included in the packages, demos are not included in samples groups, because they are at alpha stage and nevertheless may interest some users. Developped and tested with D2010. Should be OK with all other compilers as well. You can get the files from SVN repository (http://svn.overbyte.be:8443/svn/ics/branches/icsv7/ user:ics pass:ics) Files: A branches/icsv7/Delphi/Internet/OverbyteIcsSysLogClientDemo.dproj A branches/icsv7/Delphi/Internet/OverbyteIcsSysLogClientDemo.res A branches/icsv7/Delphi/Internet/OverbyteIcsSysLogClientDemo1.pas A branches/icsv7/Delphi/Internet/OverbyteIcsSysLogServerDemo.dpr A branches/icsv7/Delphi/Internet/OverbyteIcsSysLogServerDemo.dproj A branches/icsv7/Delphi/Internet/OverbyteIcsSysLogServerDemo.res A branches/icsv7/Delphi/Internet/OverbyteIcsSysLogServerDemo1.dfm A branches/icsv7/Delphi/Internet/OverbyteIcsSysLogServerDemo1.pas A branches/icsv7/Delphi/Vc32/OverbyteIcsSysLogClient.dcr A branches/icsv7/Delphi/Vc32/OverbyteIcsSysLogClient.pas A branches/icsv7/Delphi/Vc32/OverbyteIcsSysLogDefs.pas A branches/icsv7/Delphi/Vc32/OverbyteIcsSysLogServer.dcr A branches/icsv7/Delphi/Vc32/OverbyteIcsSysLogServer.pas -- francois.pie...@overbyte.be The author of the freeware multi-tier middleware MidWare The author of the freeware Internet Component Suite (ICS) http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
[twsocket] Uploading files using HTTP
Hi ! I have updated OverbyteIcsHttpPost and OverbyteIcsWebServ demos to show how to upload files with HTTP client component and receive file with HTTP server component. Actually there are two server side demos: one which is REST (http://en.wikipedia.org/wiki/Representational_State_Transfer) and one which is HTML Form with file input element. Client side use the REST part. Use your browser for HTML Form part. -- francois.pie...@overbyte.be The author of the freeware multi-tier middleware MidWare The author of the freeware Internet Component Suite (ICS) http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
[twsocket] Static link of OpenSSL libs ?
Hi, I downloaded OpenSSL source and compile it using BCB6. Now It's possible to statically link libeay32.lib and ssleay32.lib to my project and use it with ICS v6 without .dll's ? I want to compile OpenSSL directly to my .exe and avoid distributing libeay32.dll and ssleay32.dll with my app. It's possible ? Thanx for help ! --- With best regards, Max Terentiev. Business Software Products. AMS Development Team. supp...@bspdev.com -- 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] Static link of OpenSSL libs ?
Max Terentiev wrote: Hi, I downloaded OpenSSL source and compile it using BCB6. Now It's possible to statically link libeay32.lib and ssleay32.lib to my project and use it with ICS v6 without .dll's ? I want to compile OpenSSL directly to my .exe and avoid distributing libeay32.dll and ssleay32.dll with my app. It's possible ? It is, provided you do not use ICS-SSL ;-) -- Arno Garrels Thanx for help ! --- With best regards, Max Terentiev. Business Software Products. AMS Development Team. supp...@bspdev.com -- 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] Static link of OpenSSL libs ?
I downloaded OpenSSL source and compile it using BCB6. Now It's possible to statically link libeay32.lib and ssleay32.lib to my project and use it with ICS v6 without .dll's ? I want to compile OpenSSL directly to my .exe and avoid distributing libeay32.dll and ssleay32.dll with my app. It's possible ? I'm not an expert with BCB. If Delphi can call BCB compiled functions, linking the obj files produced by BCB, then it is theoretically possible to modify ICS-SSL to replace dynamyc linking by static linking. -- francois.pie...@overbyte.be The author of the freeware multi-tier middleware MidWare The author of the freeware Internet Component Suite (ICS) http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] Static link of OpenSSL libs ?
Hi, I'm not an expert with BCB. If Delphi can call BCB compiled functions, linking the obj files produced by BCB, then it is theoretically possible to modify ICS-SSL to replace dynamyc linking by static linking. Delphi should call bcb compiled functions. For example, ICS contains some bcb-compiled .obj files in \vc32\zobj123 and ICS packages are compiled and used it with no problems, right ? So, OpenSSL obj's should be works too. What should be modified in ICS-SSL to support static link of OpenSSL ? Only OverbyteIcsSSLEAY.pas or almost all ICS units ? It's should be usefull not only for me ! -- 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] Static link of OpenSSL libs ?
I'm not an expert with BCB. If Delphi can call BCB compiled functions, linking the obj files produced by BCB, then it is theoretically possible to modify ICS-SSL to replace dynamyc linking by static linking. Delphi should call bcb compiled functions. For example, ICS contains some bcb-compiled .obj files in \vc32\zobj123 and ICS packages are compiled and used it with no problems, right ? So, OpenSSL obj's should be works too. What should be modified in ICS-SSL to support static link of OpenSSL ? Only OverbyteIcsSSLEAY.pas or almost all ICS units ? Only the two units corresponding to the two OpenSSL DLLs: OverbyteIcsSSLEAY.pas and OverbyteIcsLibEAY.pas. It's should be usefull not only for me ! Probably. If you change the source code, use a conditional compilation to let the user select static or dynamic linking. -- 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