Jump to content

Angus Robertson

Members
  • Content Count

    2063
  • Joined

  • Last visited

  • Days Won

    38

Posts posted by Angus Robertson


  1. OpenSSL has issued new releases of all the currently supported versions, 3.5.1, 3.4.2, 3.3.4, 3.2.5 and 3.0.17.

     

    OpenSSL 3.5.1 fixes a low risk CVE-2025-4575 relating to use of a command in the openssl.exe application to use trusted certificates.  All releases include periodic miscellaneous minor bug fixes.

     

    Windows binaries are available in SVN and the overnight zip file and separately from https://wiki.overbyte.eu/wiki/index.php/ICS_Download or https://www.magsys.co.uk/delphi/magics.asp

    In addition to the three DLL files, the zips include compiled RES resource files that contain the same DLLs, text files and version information, see the RC file. The RES file may be linked into application EXE files and code then used to extract the DLLs from the resource to a temporary directory to avoid distributing them separately.

     

    ICS V9.1 and later optionally support loading the resource files.

     

    These OpenSSL versions are included with ICS V9.5 beta available from SVN and the overnight zip.

     

    ICS V9.5 beta now defaults to using OpenSSL 3.5.1, provided the new OverbyteIcsDefs.inc files is installed, or you undefine OpenSSL_35 and suppress an earlier version.

     

    The SSL/TLS Certificate Authority Root Stores bundles have also been updated with new roots, more information at https://wiki.overbyte.eu/wiki/index.php/FAQ_SSL/TLS_Certificate_Authority_Root_Stores and downloads at: https://www.magsys.co.uk/download/software/ca-root-bundles.zip and are already included with ICS V9.5 beta.

     

    Separately, https://www.yunqa.de/ has released 3.0.17, 3.3.4 and 3.4.2 as commercial DCUs allowing applications to be used with OpenSSL without needing separate DLLs.

     

    Angus

     

    • Like 1

  2. Your issues are now fixed in SVN and will be zipped overnight.  

     

    The GET and DELETE methods now support REST PContBodyJson, PContBodyUrlEn and PContBodyXML content types, beware web servers may not support this. The ICS web server also now supports body content with GET and DELETE requests, provided there are UrlJHandlers for these methods or the application handles the content stream. 

     

    The TRestParams component has a new RParamFmt property that for Json only defines whether nested objects or an array should be formatted, default is RPFmtNestObj (Nested Objects, same as previously), or RPFmtArrayVal (Array of Values) if first element is any array, or RPFmtArrayObj (Array of Objects) where each element is treated as object in the array. Note RPFmtArrayObj allows duplicate names in Add methods, since output into different objects. For instance:

     

    RPFmtNestObj: {"field1":"data1","field2":"data2","field3":[data1, data2, data3]}
    RPFmtArrayVal: [data1, data2, data3]
    RPFmtArrayObj: [{"field":"data1"},{"field":"data2"},{"field":[data1, data2, data3]}]

     

    Angus

     

    • Like 1

  3. Your change is now in SVN, but you'll need a new DEFINE OpenSSL_Deprecated to use it. 

     

    I've moved about 130 OpenSSL deprecated 3.0 exports to a new table only loaded with the new define, and fixed two units that still used deprecated EC_x exports.  Not sure if all these deprecated exports will disappear in OpenSSL 4.0 due next April, but at least ICS is now ready. 

     

    Angus

     


  4. The TMimeDecodeW.PartNameW property should decode the inline MIME correctly, although PartName should have returned the encoded version.  This is because the unit was written in AnsiString times, and unicode added later to the W .  It's possibly due for rewrite to remove AnsiStrings.

     

    However I'm not sure about the quotes around the name, I don't think we expect them for inline MIME. 

     

    I can not test your MIME because DelphiPraxis has corrupted what appears to be fixed text with hidden unicode characters that can not be pasted into Delphi, or easily removed, so our MimeDemo sample is unable to decode your name value.  

     

    Angus

     


  5. This is fixed in SVN and the overnight zip, took a while to find all the horrible LongInt casts being used to handle unsigned 32-bit IPv4s.  

     

    Mar 04, 2025 V9.5  Using TIcsIPv4Address instead of TIPAddr (longint) to avoid range errors.

     

    You should be able to just use the new ICMP unit with V9.4. 

     

    Angus

     

     


  6. Yes, you need a Google account with credit card details, but there is no charge for ACME issued certificates.  I just used my Google Play account from Android (I think), or maybe my Google maps account (they send an invoice monthly, for zero), somehow the Command Line Tool just worked, I explain briefly in the supplier notes in the OverbyteIcsSslX509Certs unit, but will do it properly in a wiki page, or look at:  https://cloud.google.com/certificate-manager/docs/public-ca-tutorial

     

    The product manager made some interesting comments about Google's intentions at  https://community.letsencrypt.org/t/acme-support-in-google-s-ca/174736/38?page=2

     

    Angus

     

     

     

     


  7. SVN and the overnight zip have been updated with a new ICS beta, with a lot of SSL/TLS changes.  Took a little longer than expected due to adding support for new certificate suppliers and a major sample upgrade.

     

    Since Let's Encrypt introduced the ACME (Automatic Certificate Management Environment) protocol to download SSL/TLS certificates, other suppliers have added automated ordering using the same API, mostly with extra account information for commercial certificates.  ICS has been tested successfully with free certificates from Google Trust Services and Buypass, and should work with DigiCert, ZeroSSL and SSLcom, but these last three are primarily commercial suppliers and need prepaid accounts, so not tested yet.

     

    Google Trust Services offers an excellent alternate to Let's Encrypt and offers almost the same free certificates up to 90 days with multiple wildcards, but allows the expiry days to be specified during ordering, down to three days.  Some companies were reluctant to use Let's Encrypt when there was no alternative in case of extended down time, now Google offers that alternate.  Bypass is a Norwegian business, offers free 180 day certificates but no wild cards and only five domains per certificate, but may be suitable for those that don't want to use American certificates.

     

    Apart from Let's Encrypt and Buypass, suppliers use ACME external accounting to tie the ordering process to web site accounts, which is explained in comments in the OverbyteIcsSslX509Certs unit, more information will be added and the wiki pages updated before release.  Google needs the Google Cloud CLI Windows application installing, type a few commands and you get the external account information Acme needs.  The OverbyteIcsX509CertsTst sample has a major revision to support multiple account suppliers and to specify the external accounting information.  The sample needs to be run on any servers that will order certificates to create the initial Acme account (except for Let's Encrypt), and includes a web server allowing test certificates to be ordered provided DNS points to a public IP on the server.  Most suppliers provide a testing endpoint which is listed in OverbyteIcsX509CertsTst so you can order fake certificates to understand the process.

     

    OCSP is being deprecated by the industry in favour of shorter expiry certificates, Let's Encrypt stopped adding an OCSP URL to certificates in May 2025 and will turn off it's OCSP servers in August 2025.  This means OCSP Stapling no longer works, nor checking OCSP during chain verification.  ICS has two new defines OpenSSL_OcspStaple and OpenSSL_OcspChains defaulting to false, that need to set to enable ICS to continue using OCSP for any suppliers still supporting it. The default saves a lot of extra OCSP code being linked into applications. When existing projects with server components are opened, 'Error reading: xx: Property OcspSrvStapling does not exist' may appear, just click past it and the property will be removed from the form.

     

    To replace OCSP for servers, the ACME specification now supports a renewal information API, that for each certificate provides a recommended date range when the certificate should be renewed, which may change dynamically if the certificate is revoked.  ICS servers now check certificate renewal information, usually every six hours.

     

    ACME certificate profiles are now supported, currently Let's Encrypt only, default classic, optional tlsserver and shortlived (7 day, not yet available).

     

    Angus

     

    • Like 1

  8. I only use 125% scaling on my 4K monitor, but it is 49 inches, my old Toshiba TV (got a larger one).  But my second side monitor is 32in at 100% scaling, so I can move applications sideways to easily check the form positioning is correct.  

     

    Having started my development life in 1980 with 80x24 terminals, then 14in PC monitors, having large screens with so many open windows side by side really does make life so much easier. 

     

    Angus

     

     


  9. On reflection, I will add your new prototypes to ICS. 

     

    I was going to suggest you created your own import table with the RSA functions, similarly to the OpenSSL engine table that requires a define conditional to import. 

     

    But ICS has a problem with the OpenSSL import tables getting larger as new functions are added, but old ones rarely disappear when they cease being used. 

     

    So I'll create a new import table that will have most of the RSA_, ECDA_, DH_., EC_KEY_, EC_GROUP_ and DSA_ exports, with a new define around all those functions and the table, to ensure that none are currently being used by ICS.  I already had to remove some EC_GROUP_ exports that have disappeared from some Linux distributions.

     

    Should be in SVN in a couple of days. 

     

    Angus

     

    • Like 1

  10. The release announcement for 3.4.0 last October said 'Also note when building the ICS packages for the first time with 3.4.0, there may be a dialog 'entry point could not be located', because the new DLLs are only extracted from the resource files when the first application is run, but the packages have built OK'.  

     

    Your original error was a mismatch of the two DLLs, an old export had gone from one which the other expected, once both DLLs matched the problem went away.  Don't recall the second error, but probably related. 

     

    The problem might relate to your other component package using different versions of OpenSSL in a different location. 

     

    Angus

     

     


  11. I saw this once a few months ago, when updating to a new release of OpenSSL, but it goes away when you run an application built with the latest ICS that has the latest OpenSSL, which updates the OpenSSL DLLs the first time it runs.  If you have not copied the latest DLLs from the distribution into  C:\ProgramData\ICS_OpenSSL

     

    Angus

     


  12. If you are using ICS created Let's Encrypt certificates in Windows IIS web server, you may find web sites no longer work correctly, giving a certificate error.  

     

    This is because Let's Encrypt had discontinued it's OCSP service as a means of determining if certificates have been revoked.  

     

    In each IIS site bindings, for each listener, you need to tick 'Disable OCSP Stapling', and the certificates should work again.  

     

    Happened here after a reboot for patch Tuesday.  I did not see any OCSP errors or warning in the IIS or Windows event logs, but knew about OCSP being abandoned. 

     

    I've already added conditionals to the next ICS release to remove our OCSP code.  

     

    Angus

     

    • Like 1

  13. There is also the risk when using non-standard protocol extensions that firewalls, proxies, load balances, etc, may reject or corrupt the requests.  

     

    If an API needs to delete a massive number of files, it should use an HTTP POST request with the Json including a delete command, not the HTTP DELETE request with content.

     

    But I will look at adding this to the ICS client and server, so we can at least test what happens when content is sent with GET and DELETE. 

     

    Angus

     


  14. Quote

    BTW, I am using ICS (your brain child) and would like to thank you for it.

    I have heavily modified the MQTT code. When finished, I might submit it for the next major version.

    Please make sure you are using MQTT from SVN or the overnight zip, I did a major rewrite a couple of months ago that is not yet released.

     

    Coming back to your original problem, the best solution will be a new wrapper component around the ICS MQTT client, that handles reconnection if the connection drops, including using a list of IP addresses for multiple servers.  This will avoid applications needing to handle all the reconnection stuff, which is tedious.  I'll put it on my list, but it may not make the next release, which is already overdue.

     

    The TIcsIpStrmLog client component already does reconnections, just need to take those properties and methods.

     

    Angus

     

    • Like 1

  15. Not sure how quickly your network will recognize that an IP address has moved between devices, that is something that does not happen very often.   Each client will need to refresh its ARP cache table to find the MAC of the new PC. 

     

    WMI can be used to change IP addresses, ICS has a free WMI component and sample that sets IP addresses and gateway. 

     

    A better solution would be for the clients to know about each server, and use the secondary if the primary fails to respond. 

     

    Angus

     


  16. Quote

    Could you please tell me how to do it manually? Maybe there is some example?

    You just build a Json string with your parameters, you can use some helpers from TRestParams.GetParamStream like IcsEscapeJson if your content needs such processing. Then pass the string as RawParams in RestRequest(), the component then builds a stream for you.  

     

    But this will fail for DELETE as discussed above.  Can you please check the API server really is expecting content, do you get a 204 error, does the API documentation actually say content is needed for DELETE?   I'm not going to update the component unless I can test it and know the change is really needed.

     

    Angus

     


  17. Anything that crashes the ICS web server is something that should be fixed, if you are sure GET with body is fatal, I'll put it on my list to test and try and fix. 

     

    I get thousands of hacking attempts on my public server daily, even have a dynamic blacklist to block repeats accesses, currently 4,600 IPs blocked for the last thee days.

     

    Angus

     

     

    • Like 1

  18. I'm not aware that the DELETE request is allowed to submit data as a body, this is not mentioned at:

     

    https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Methods/DELETE

     

    Which is why PContBodyJson is ignored.   If a body is allowed for DELETE, ICS will need to be updated

     

    TRestParams does have an array method, RPTypeArray, used by AddItemAR(const aName: String; aValue: TStrings), but there is currently no way to create an array of objects in the manner you require, sorry I simply never anticipated it when designing the component, there are simply too many ways to build Json.  I'll put it on my list, but it may take a while. 

     

    Meanwhile, you could build the Json with SuperObject or manually.

     

    Angus

     

     


  19. I've removed the unwanted DCR and -k, did not show up because Build Groups stops on the first error, so never got to build all the different versions.  

     

    I fixed the MQTT warning yesterday and have just done the AnsiString warnings, so C++ Win32 now builds without any warnings or errors.

     

    Win64 fails completely because dcc64.exe seems to have disappeared with D12.3, think they want us to use Win64 Modern only now, but I get the same error with Win64 Modern.  Sorry, no time to mess any more now.

     

    Can not upload anything to SVN until I've finished some testing, early next week. 

     

    Angus

     


  20. I've just built V9.5 for Win32 using C++12.3 without any errors, just a couple of deprecated warnings.  As I did before the V9.4 release.  I have removed the -r argument. 

     

    So maybe you had old versions of these files somewhere, 

     

    I'll be updating SVN in the next few days, and I'll make sure my work C++ library files are in the SVN directory.  

     

    Angus

     

×