-
Content Count
2055 -
Joined
-
Last visited
-
Days Won
38
Angus Robertson last won the day on May 1
Angus Robertson had the most liked content!
Community Reputation
650 ExcellentAbout Angus Robertson
- Birthday December 16
Technical Information
-
Delphi-Version
Delphi 11 Alexandria
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
SSL/TLS certificate maximum issue period of 47 days is coming in 2029
Angus Robertson replied to Angus Robertson's topic in ICS - Internet Component Suite
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 -
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
-
Added RSA_Verify prototype in OverbyteIcsLIBEAY
Angus Robertson replied to Frédéric's topic in ICS - Internet Component Suite
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 -
Added RSA_Verify prototype in OverbyteIcsLIBEAY
Angus Robertson replied to Frédéric's topic in ICS - Internet Component Suite
You should be able to use the IcsAsymVerifyDigestTB function to replace your old code, passing it the RSA key as EVP_PKEY. Angus -
Added RSA_Verify prototype in OverbyteIcsLIBEAY
Angus Robertson replied to Frédéric's topic in ICS - Internet Component Suite
RSA_verify is a deprecated low-level signing function, you should be using the EVP_VerifyFinal and related EVP functions. Not sure that we want to add deprecated functions, ICS has already been updated to stop using most of them. Angus -
Loading v9.4 into Delphi 11.3Pro
Angus Robertson replied to TonyC's topic in ICS - Internet Component Suite
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 -
Loading v9.4 into Delphi 11.3Pro
Angus Robertson replied to TonyC's topic in ICS - Internet Component Suite
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 -
Using Let's Encrypt certificates in Windows IIS web server
Angus Robertson posted a topic in ICS - Internet Component Suite
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 -
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
-
Poor mans HA
Angus Robertson replied to bk31415's topic in Algorithms, Data Structures and Class Design
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 -
I said that TRestParams can not currently create an array of Json objects, at least without nesting multiple components, but it may in the future, Angus
-
Poor mans HA
Angus Robertson replied to bk31415's topic in Algorithms, Data Structures and Class Design
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 -
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
-
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
-
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