-
Content Count
2047 -
Joined
-
Last visited
-
Days Won
38
Everything posted by Angus Robertson
-
I missed the IcsAsymVerifyDigestTB name, it takes a TBytes binary digest (base 0) and casts it to PAnsiChar to pass to an OpenSSL API. ICS does not use TEncoding anywhere since it's not in old compilers, so I've no idea of the purpose of that line. ICS only uses base 1 for strings, not TBytes. Angus
-
You don't say what type OldDigest is, or which Jose function you are using, but casting and TEncoding is probably corrupting it. Try using IcsStringToTBytes instead, which is what the Jose unit uses. Angus
-
Windows versions supported by older Delphis
Angus Robertson replied to Peter J's topic in General Help
OK, QueryPerformanceCounter 'was' more accurate in the days before CPU speed could be changed dynamically <g> And might still be over a few seconds timing an algorithm. And Ticks are probably more accurate than 20 years ago with faster motherboards. Angus -
Windows versions supported by older Delphis
Angus Robertson replied to Peter J's topic in General Help
ICS has a unit that emulates GetTickCount64 using QueryPerformanceCounter on older OSs, meaning it does not wrap at 49 days as using GetTickCount instead would. QueryPerformanceCounter is also more accurate than ticks if you are timing milliseconds. But 49 days running is rare nowadays, even for servers which Microsoft will forcibly reboot to load Windows Updates unless you take severe measures to stop it. Angus -
Windows versions supported by older Delphis
Angus Robertson replied to Peter J's topic in General Help
Suggesting you support an OS you don't at least test once is not a good idea. I have a Windows 7 VM that has Delphi 6 to XE installed, and I build and run stuff with a few of those compilers occasionally, so I know it still works. Trying to support anything older is dangerous. That VM still gets some Windows security updates, so has minimal support from Microsoft. One common API to avoid for Windows 7 is GetTickCount64 which was added with Vista and Windows 2008, don't think Delphi uses it internally. Angus -
Save http-request to stream and read response from stream
Angus Robertson replied to Carsten Eider's topic in ICS - Internet Component Suite
The short answer is not easily with the ICS HTTP client components, they don't built a request nor buffer a response before processing it. The 'proper' solution would be to use the ICS proxy component as an intermediary to handle the encryption, which does give access to headers and content, but would still need changes since it would ignore the encrypted reply. If you are only taking to a specific server with limited requirements and error handling, it would be easier to write your own HTTP client I wrote a simple application 'Simple TCP Client Testing, ie HTTP headers' that uses the TIcsIpStrmLog component to send a simple HTTPS request to a server repeatedly, for heavy testing. TIcsIpStrmLog expects to send and receive text lines as used by most protocols, if your encrypted headers and content arr binary, you would need to use a simple TWSocket instead. Angus -
One common issue using the Jose functions is they use binary arguments, originally AnsiString, now TBytes, not Base64, so you need to decode Base64 first, that might explain the wrong length. I'll put an FMX version of the Jose sample on my list. Angus
-
ICS V9.3 announced
Angus Robertson replied to Angus Robertson's topic in ICS - Internet Component Suite
Sorry, no idea off hand. I did build V9.3 with D7, D2007, XE7, D10.3, D11 and D12 last week, so it builds OK for the different generations of compiler, but I can not test on every compiler. Not sure my D2010 licence still works. Angus -
The Ics.Posix.PXMessages unit was written many years ago for 32-bit MacOS, and has never been updated for 64-bit, nor tested properly with Linux. It is now obsolete, so I'll remove it from ICS shortly. No idea why I put it into the Jose unit, no messages there. Angus
-
As I said earlier, ICS has never had a working message pump for Linux, so no functions dependent on messages will work. Some changes were made to TIcsEventQueue to try and support Linux in V9.2 but did not work and were disabled for V9.3 so at least the non-message stuff loaded. So making THttpClient work is not trivial with V9.3. Angus
-
It seems six (or more) EC_Group functions were deprecated in OpenSSL 3, and some builds exclude deprecated functions. In OverbyteIcsLIBEAY.pas, suppress four lines in the table with @@EC_GROUP_set_curve_GF , @@EC_GROUP_new and EC_GROUP_clear_free and change the array size to [0..841], that will stop these four exports loading. If you get new names appearing in the exception, do the same thing. ICS now only uses EC_GROUP_get_curve_name, not the dozens of others we load. I agree only loading those exports we use would be ideal, but working out which of those 842 are not used is not trivial, and many are there for future use, or use by end user applications. Angus
-
That exception happens when ICS attempts to load all the OpenSSL exports, it would appear the OpenSSL version is missing certain EC_GROUP exports that are available in the standard 3.0 library. Unfortunately, the screen short truncates the error list, there may be lots more missing. They may be logged, can not recall if that sample has a log. Not sure if ICS uses EC_GROUPs, if not we can simply avoid loading them and the problem goes away. I've done that before. I guess I need to build a Hyper-V RedHat VM to test in my copious spare time, the issue is what other important stuff do I ignore to do that? Angus
-
I fixed all the Linux resource file build issues and wincrypt problems two months ago, and built the Linux test package yesterday with V9.3 without errors, so it sounds like your version is V9.2, try the final release. Provided your Linux project does not include TWSocket, it should work. Try building the new IcsPemTest FMX sample on Red Hat provided it has OpenSSL 3 libraries in the same path as Ubuntu. I will install Red Hat at some point, but only once most of ICS is working on Ubuntu. My testing showed putting TWSocket on a Linux format prevented that form appearing in Linux, some library function it brings in that just stops apps running, which is why I created the new IcsPemTest sample so at least something would run. Angus
-
I'm not clear which ICS version you are using, only V9.3 released yesterday builds for Linux with SSL, but only utility functions work, like creating and reading SSL/TLS certificates. I've only tested against Ubuntu 22.04, not Red Hat. ICS does not yet support TWSocket for Linux, so no protocols will work. A new cross platform message pump supporting Windows and Linus has been written, but has not yet been added to ICS V9, probably within the next six months. I'm planning to make this conditional, so Windows applications can use the existing or new message pumps. Previously ICS had a second message pump that was only supported MacOS, not Windows, which I've just removed ready for the new pump. Another ICS user tried to make the MacOS pump work under Linux, but I never managed to build ICS with the changes he submitted. Angus
-
ICS 9.3 SVN SMTP Attachment
Angus Robertson replied to chmichael's topic in ICS - Internet Component Suite
I've just tested the OverbyteIcsSslMailSnd sample in V9,3 and it's sending content and attached files as expected with the correct encoding headings. But it is not attempting to send HTML emails. BTW, the component expects String content and will convert to whatever encoding is specified, no idea what will happen if you encode UTF8 and it then encodes it again. Angus Angus -
SVN for ICS V9 is https://svn.overbyte.be/svn/icsv9/ Do we have the old URL for V8 somewhere? Angus
-
There is a new ICS sample OverbyteIcsBasicWebServer.dpr in SVN, will be zipped overnight, which is a simplified version of OverbyteIcsSslMultiWebServ ignoring configuration INI files, security features, session data, most demo pages and most logging, and settings for localhost set in code, search for IcsHosts to change IP addresses, etc. But this sample will be a much easier starting point for those developing web or Websocket servers with ICS. I'm going to copy most of the code into another new ICS sample that needs a Websocket server. Angus
-
WMIService (PrintJobInfo) spanws to the CPU window , ot trigger exceptio.
Angus Robertson replied to alogrep's topic in VCL
WMI is about LAN computers with NetBIOS, you don't usually use IP addresses to connect to remote servers, but computer names. For the local computer, use a blank name and credentials, but you might need admin rights for some WMI classes. The ICS component library has a WMI unit that does all this for you, and an EXE sample, it displays the Win32_printer class, but I suspect getting the queue is complicated. Angus -
8.71 to 9.3 on D2007
Angus Robertson replied to Jeff Hamblin's topic in ICS - Internet Component Suite
Thanks, fixed the erroneous $ifend. I still have customer applications using D2007, so would have found it soon. The ICS distribution only includes OpenSSL DLLs in C:\ProgramData\ICS-OpenSSL\ which are always the latest version, when you build the packages a batch command file runs that copies them from the install directory to ProgramData, so I guess that failed in your case. The DLLs in version directories were extracted from the resource files, and need to be version specific since different ICS applications may be using different OpenSSL versions. No idea why Windows Security gave you a warning, no-one else has mentioned that in eight months since ICS has used OpenSSL resource files. Angus -
Retrieve Json frame
Angus Robertson replied to CoeurdeLeon's topic in ICS - Internet Component Suite
If you really mean the websocket protocol and not HTTP, there are no header or bodies or protocol, once a websocket is open there is simply a two way TCP stream, and you can send what you like. That stream arrives at the server in the ClientWSFrameRcvdEvent as a string packet and TWebSocketReceivedFrame to tell what typer of data is arriving (text, binary, or closing), it's up to the developer to decide how to interpret that data. Angus -
ICS V9.1 has been released at: https://wiki.overbyte.eu/wiki/index.php/ICS_Download ICS is a free internet component library for Delphi 7, 2006 to 2010, XE to XE8, 10, 10.1, 10.2, 10.3, 10.4, 11 and 12 and C++ Builder 10.4, 11 and 12. ICS supports VCL and FMX, Win32, Win64 and MacOS 32-bit targets. Beware Mac OS-X and C++ have not been tested recently due to lack of support from such users. The distribution zip includes the latest OpenSSL 3.0.13. 3.1.5 and 3.2.1, for Win32 and Win64. The highlights of V9.1 were posted in this topic two weeks ago, and are included in the download page. The full release notes for V9.1 are at https://wiki.overbyte.eu/wiki/index.php/ICS_V9.1 There is also a new page https://wiki.overbyte.eu/wiki/index.php/Updating_projects_to_V9.1 to help with migrating existing projects. The main ICS readme9.txt has the installation section rewritten to explain the new common groups and packages used for Delphi 10.4 and later, so you won't find any dedicated ICS packages for Delphi 11 or 12. The readme now also explains all defines in the .\Source\Include\OverbyteIcsDefs.inc file that control how OpenSSL is loaded. All ICS active samples are available as prebuilt executables, to allow ease of testing without needing to install ICS and build them all. There are four separate zip files split into clients, servers, tools and miscellaneous samples which can be downloaded from https://wiki.overbyte.eu/wiki/index.php/ICS_Samples Angus
-
ICS 9.3 SVN SMTP Attachment
Angus Robertson replied to chmichael's topic in ICS - Internet Component Suite
The line: FEmailBody.Add('Content-Transfer-Encoding: quoted-printable') {AG} is unchanged in 15 years. But I will test the sample to make sure it works, in a few days time. Angus -
ICS 9.3 SVN SMTP Attachment
Angus Robertson replied to chmichael's topic in ICS - Internet Component Suite
There have been no changes to TSSLSmtpCli since V9.0, except to build with other units. I'd make sure whatever properties are used for attachments are cleared, sorry, don't know which off hand. Angus -
ICS 9.3 SVN SMTP Attachment
Angus Robertson replied to chmichael's topic in ICS - Internet Component Suite
Sorry, you'll need to explain what you are doing with which component. Angus -
New Warning in 12.2: Overloading a similar index type by declaring an array property 'Items'
Angus Robertson replied to pyscripter's topic in RTL and Delphi Object Pascal
You still need {$IF Declared(RTLVersion122)} if you want the component to also work on 12.0 and 12.1. And $IF is not supported on earlier compilers, if that matters. Angus