-
Content Count
1881 -
Joined
-
Last visited
-
Days Won
33
Everything posted by Angus Robertson
-
How to attach a DigiCert Token certificate to exeutable
Angus Robertson replied to Bart Kindt's topic in Delphi IDE and APIs
No, because the HSM in the token has a program that takes data from the application, signs it with the private key in the HSM and returns a digest to the application as part of the signing process. The whole point is the private key is not available outside the HSM so can not be copied. The HSM/token can be used remotely only if the data to be signed is passed to the PC/server with the HSM, and the digest returned to the originating PC. Angus -
How to attach a DigiCert Token certificate to exeutable
Angus Robertson replied to Bart Kindt's topic in Delphi IDE and APIs
You did not qualify your comment about PFX files only being useful for self signed certificates by mentioning code signing. Not sure how useful self code signing would be. But you are correct, new code signing is all dongles, although my own Comodo PFX files still work fine with signtool: signtool sign /p "xx" /f "c:\certificates\magenta-systems-certkey.pfx" /d "Copyright (c) 1998-2023 The OpenSSL Project" /as /fd sha256 /tr http://timestamp.sectigo.com /td sha256 "c:\svn-repos\signed-openssl\openssl-3.2.0-win32\libcrypto-3.dll" That command only needs a minor change to make it useful a dongle certificate, assuming the drivers for the dongle are installed. Angus -
How to attach a DigiCert Token certificate to exeutable
Angus Robertson replied to Bart Kindt's topic in Delphi IDE and APIs
I would dispute that statement, PFX or PKCS#12 are Microsoft's preferred format since they contain certificate, private key and intermediate certificates, so one file per host. Sure you can create PEM/CER bundles with a private key, but more than one certificate can confuse servers. But Apache does not support PFX, you have to use PEM, that is the main reason PFX is not often seen. Angus -
How to attach a DigiCert Token certificate to exeutable
Angus Robertson replied to Bart Kindt's topic in Delphi IDE and APIs
Is this a Code Signing certificate? If so, you can not export the private key from the token, so no reason to export the certificate either. If not, why did Digicert supply it on a token? Angus -
How to attach a DigiCert Token certificate to exeutable
Angus Robertson replied to Bart Kindt's topic in Delphi IDE and APIs
PemTool has both, two buttons, Create Request from Props and Create Request from Cert, the former uses properties from another tab, lots of them. PemTool takes a while to understand, it is a development tool to test all the ICS certificate functions, and does not have a friendly GUI. It only writes files, no database like XCA. There is a second sample OverbyteIcsX509CertsTst that orders Let's Encrypt certificates and includes an 'Own CA' allowing you to sign your own local certificates with a private CA. Angus -
How to attach a DigiCert Token certificate to exeutable
Angus Robertson replied to Bart Kindt's topic in Delphi IDE and APIs
ICS has a lot of tools for certificate manipulation, reading and writing different formats, so can convert between them, and can read and write to the Windows Store. The OverbyteIcsPemTool sample does all this, it has more features than the XCA tool. A compiled version can be downloaded if you don't want to build it. Angus -
New OpenSSL release 3.2.0, and new resource files linked by ICS
Angus Robertson posted a topic in ICS - Internet Component Suite
OpenSSL has released new minor version 3.2.0, which has a lot of new features. It is compatible with the current versions of ICS, but has only been tested briefly with clients, it needs at least a week of testing with servers before I'm comfortable adding the DLLs to ICS as the defaults. The major change in 3.2.0 is support for client side QUIC protocol. QUIC is based on UDP rather than TCP and allows multiple streams in parallel, typically for downloading web pages with hundreds of elements, QUIC combined with HTTP/2 becomes HTTP/3. There is a DLL solution that has been used to add HTTP/2 to Indy but not native Delphi implementation I'm aware of, it's a lot of work. So no possibility of ICS having HTTP/3 soon. Other changes in 3.2.0 include: Certificate compression in TLS, including support for zlib, zstd and Brotli Deterministic ECDSA. Support for Ed25519ctx, Ed25519ph and Ed448ph. AES-GCM-SIV. Argon2 and supporting thread pool functionality. Hybrid Public Key Encryption (HPKE). The ability to use raw public keys in TLS. Support for Brainpool curves in TLS 1.3. SM4-XTS. Support for using the Windows system certificate store as a source of trusted root certificates. Some of the above cipher and hash changes may be used by TLS connections without change to ICS, if negotiated with the other end, but certificate related changes will need updates to ICS. 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 zip includes a compiled RES resource file that contains 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 file, currently in SVN and the overnight zip. Angus -
ICS V9.0 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 Seattle, 10.1 Berlin, 10.2 Tokyo, 10.3 Rio, 10.4 Sydney and 11 and C++ Builder 2006 to XE3, 10.2 Tokyo, 10.3 Rio, 10.4 Sydney and 11. ICS supports VCL and FMX, Win32, Win64 and MacOS 32-bit targets. The distribution zip includes the latest OpenSSL 3.1.2 win32, with other versions of OpenSSL being available from the download page. ICS V9 is planned to be a long term support release with no new components or major features added, just bug fixes as needed, major changes will be for V10. V9.0 has been tested with Delphi 7, but I had to make changes to several new components due to missing language features and TWebBrowser does not exist, so V9.0 will be the last tested with D7. Delphi 2007 is easier to support for those building ANSI projects and will become the oldest version supported. An overview of the new samples and components was posted in this group a few days ago, and is included in the download page. The full release notes for V9.0 are at https://wiki.overbyte.eu/wiki/index.php/ICS_V9.0 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 The Getting Started page at https://wiki.overbyte.eu/wiki/index.php/ICS_Getting_Started has also been updated with all the new components. Angus
-
How to read DNS TXT record contents?
Angus Robertson replied to TurboMagic's topic in ICS - Internet Component Suite
ICS V9.0 added a function IpHlpGetDnsServers in unit OverbyteIcsIpHlpApi.pas that sets a TStringList with the local PC DNS server IPs. The DnsQuey unit also has a list of public DNS servers, Cloudfare, Google, etc, that TDnsQuey can loop through. Ditto for DoH. Angus -
thttpappsrv Put Handler does not get dispatched
Angus Robertson replied to omnibrain's topic in ICS - Internet Component Suite
The main problem with the PUT handler in the application server was a complete lack of content upload handling, it was just ignored, now fixed, will be in SVN today. Angus -
How to read DNS TXT record contents?
Angus Robertson replied to TurboMagic's topic in ICS - Internet Component Suite
Look at where that code came from in the X509Certs unit, it loops through a few different public DNS servers until one gives the expected result. Angus -
How to read DNS TXT record contents?
Angus Robertson replied to TurboMagic's topic in ICS - Internet Component Suite
Beware DNS caches are not very clever with new TXT records, I found it may take a couple of requests before a newly added TXT records was found, should not matter for email since that rarely changes. Angus -
How to read DNS TXT record contents?
Angus Robertson replied to TurboMagic's topic in ICS - Internet Component Suite
DNS TXT records are undefined, the content varies according to the application. The ICS unit for ordering wildcard SSL certificates simply checks the entire TXT record against the value given: FDnsQuery.QueryAnySync(Item.CPage, DnsQueryTXT) ; if FDnsQuery.TXTRecordCount > 0 then begin for I := 0 to FDnsQuery.TXTRecordCount - 1 do begin if (FDnsQuery.TXTRecord = Item.CDNSValue) then begin LogEvent('Successfully tested DNS challenge for: ' + Item.CPage + ', Data=' + Item.CDNSValue); Result := True; Exit; end; end; For email SPF records, you might search the record for v=spf1 and look at the rest afterwards. Angus -
thttpappsrv Put Handler does not get dispatched
Angus Robertson replied to omnibrain's topic in ICS - Internet Component Suite
I will test PUT finally works this week, but not for a couple of days. Angus -
How to read DNS TXT record contents?
Angus Robertson replied to TurboMagic's topic in ICS - Internet Component Suite
TDnsQuery in V9.0 added TXTRecordCount and TXTRecord[n] methods, since there are often multiple TXT records. Also sync mode to make it easier to use. Look at the latest OverbyteIcsNsLookup sample. Angus -
thttpappsrv Put Handler does not get dispatched
Angus Robertson replied to omnibrain's topic in ICS - Internet Component Suite
Thanks, that will explain why a PUT test upload failed recently, it was still on my list to test, fix will be in SVN this week. Angus -
ICS V9.0 - mobile platforms
Angus Robertson replied to wright's topic in ICS - Internet Component Suite
The second option to avoid distributing OpenSSL DLLs was added last week, embedding the DLLs in the application and extracting them when the application is first run to a common directory, this was discussed in the last OpenSSL update message. Other related changes will happen this week. I always saw the major downside of SChannel that Microsoft is slow to add new features, and they are only added to new Windows versions, even TLS/1.2 took several years to be added to Windows 8/Server 2012 and did not support EC certificates properly. So exactly the same update policy as OpenSSL, except you have to upgrade the entire OS instead of a couple of DLLs. Angus -
Undeclared identifiers X509_get_X509_PUBKEY, i2d_X509_PUBKEY_bio
Angus Robertson replied to Nigel Thomas's topic in ICS - Internet Component Suite
The fix was in SVN weeks ago. If you work with ICS from SVN, you need to keep it up to date and accept things may get broken, and you may need to wait a few days for bug fixes, I try to make sure SVN always has a buildable version, but it does not always work, currently SVN is waiting for two Posix fixes from the last update, but I've changed dozens of units since then which need a lot of testing. Angus -
ICS V9.0 - mobile platforms
Angus Robertson replied to wright's topic in ICS - Internet Component Suite
That would be a massive amount of work, OpenSSL functions are buried in a lot of ICS functions at low level. I looked at your SChannel implementation for ICS when you initially wrote it. At the time the USP was no DLLs, but there are now two separate solutions that avoid distributing separate OpenSSL DLLs, so what do you now see as the benefit of SChannel? Angus -
ICS V9.0 announced
Angus Robertson replied to Angus Robertson's topic in ICS - Internet Component Suite
The output folders should be created when the DCU are built. If not the batch lines you copied earlier create both folders. It is not necessary to distribute lots of empty folders, except for ancient versions that did not create them. Angus -
ICS V9.0 announced
Angus Robertson replied to Angus Robertson's topic in ICS - Internet Component Suite
Looking at the D2010 package, there is typo, you need to correct the post-build command to change a win64 to win32, since D2010 does not have Win64 so the directory will not exist, Sorry, these package changes are done manually, and I have to edit hundreds of files by hand. Angus -
ICS V9.0 - mobile platforms
Angus Robertson replied to wright's topic in ICS - Internet Component Suite
Don't worry about the compile errors with Android, I've just installed Android support for Delphi 12 and get a load of errors when building ICS 9.1 for Android (and a couple of Linux) which I will fix or suppress in the near future. For ICS V10, just comment out the offending functions like IcsIsValidAnsiCodePage which uses ICON and IcsGetFreeDiskSpace, which are fine for Posix not seemingly not Android, doubt any of this stuff is needed to get basic sockets working on Android. And avoid changes like using generics that are unnecessary to make ICS work on Android. Angus -
ICS V9.0 announced
Angus Robertson replied to Angus Robertson's topic in ICS - Internet Component Suite
Those build command in the package copy DFM forms from the source directory to compiled Lib, but you can do it manually if it fails and remove the build lines from the package. Angus -
Issue in TIcsFtpMulti component
Angus Robertson replied to nemifoy5261's topic in ICS - Internet Component Suite
Thanks, I'll attempt to reproduce those conditions to see if I can reproduce the error, then fix it, for the next release. Zipping did get changed recently to support the native component, and I don't use zipping myself much nowadays. Angus -
ICS V9.0 - mobile platforms
Angus Robertson replied to wright's topic in ICS - Internet Component Suite
Please don't post large chunks of code in this topic, few people need to look at it. Either attach to a short message as a text file or send it by private message to whoever has requested it. Angus