Jump to content

Angus Robertson

Members
  • Content Count

    1881
  • Joined

  • Last visited

  • Days Won

    33

Everything posted by Angus Robertson

  1. No, the question is why if you already have a PFX file with a private key, you are installing it into the Windows Store in the first place, then reading it again without the private key and expecting it to work as a server certificate. Why not use the PFX directly. The ICS pemtool loads certificates into the windows into the Windows Store correctly, I do it all the time to use Let's Encrypt certificates with IIS. The exception will be an error in your code. Angus
  2. So you are attempting to use a certificate from the Windows store as a server certificate? How did you set the private key for this certificate. You can not extract private keys from the Windows store? Server certificates are useless without a private key. Private keys are kept by Windows in a different store and linked to certificates, but not stored together. Windows itself provides a means to export certificates with a private key, if allowed, but this is not implemented by ICS, not sure if the APIs allow it. Most certificate have key export blocked to stop them being stolen. Angus
  3. Can you please explain the purpose of using a certificate from the Windows store? Is this in your client or server application, as a server or client certificate. Is your server or client giving an exception? Angus
  4. The ZLIB changes to use System.Zlib are now in SVN, considerably simplified so two defines are now only used once each in one unit, making it easier to support. But you do need to use the new OverbyteIcsDefs.inc or edit your own version, see the SVN notes. Angus
  5. Angus Robertson

    TRESTClient Security Error 12175 following Windows Update

    Sorry, yes 21H1 is out of support in two months, 21H2 I guess has another eight months. Angus
  6. Angus Robertson

    TRESTClient Security Error 12175 following Windows Update

    My Windows Server 2019 is version 1809, the long term support version of Windows 10, which Microsoft promises not to break with untested Windows updates. The TLS bug seemed to be 21H2 only, for both Windows 10 and 11, and 10 21H2 is out of support in two months anyway. Angus
  7. To send custom error responses you can create overloaded versions of Answer404, etc, in your version of THttpConnection or THttpAppSrvConnection. Angus
  8. Angus Robertson

    TRESTClient Security Error 12175 following Windows Update

    Just done some testing using the D11.2 TRESTClient component on Windows 11 Enterprise 22H2 fully updated, It seems all TLS protocols are still available to the client. I have servers built with the ICS web server component that can report the TLS client hello packet that tells the server what protocols the client can accept. The URL is https://api2.telecom-tariffs.co.uk/serverinfo.htm which returns an information page about the server and client connected, for the TRESTClient with all TLS boxes ticked the Hello starts with: Client Hello: Server Name: api2.telecom-tariffs.co.uk, ALPN: , Versions: TLSv1.2, TLSv1.3, TLSv1.2, TLSv1.1, TLSv1.0, TLSv1.3 Key Share Data which means all four protocols are accepted, ticking just TLS12 and only that protocol appears in the Hello, and works. Windows 11 also connects with TLS/1.3 if requested, without registry patches. However, I may have previously done the patches two years ago when first testing TLS/1.3. I do hack the PC a lot, currently Edge and Windows File Explorer are dead with exceptions. Angus
  9. Angus Robertson

    TRESTClient Security Error 12175 following Windows Update

    It's possible that changing the SSL version tick boxes might require a reboot to be effective, that is certainly the case when you change SSL protocol settings such as ciphers in the registry or using Powershell. Angus
  10. Angus Robertson

    ebay JWS https request

    In theory, you can do this with the ICS JOSE functions like IcsJoseJWKPubKey and IcsJoseJWSComp that are used to implement the ACME protocol for Let's Encyrpt certificate ordering, which work with the ICS REST component. But often these JWT implementations have little tweaks or special features that might mean minor changes to these functions. ICS may be installed from GetIt or http://wiki.overbyte.eu/wiki/index.php/ICS_Download. Angus
  11. You probably have not initialised OpenSSL to load the DLLs with OverbyteIcsWSocket.LoadSsl Angus
  12. Not sure if it's just my PC, but updating to Windows 11 22H2 last week stopped .BAT files running due to the file association being removed, it seems Windows now prefers them to be called .CMD instead. Most other file associations disappeared as well, but that is just Microsoft wanting us to use it's own apps and not better ones. Easy enough to rename my common batch files, but GetIt often builds libraries using BAT files, so had to restore the file association with a little REG file. Windows Registry Editor Version 5.00 [-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.bat] [-HKEY_CURRENT_USER\Software\Classes\.bat] [-HKEY_CURRENT_USER\SOFTWARE\Classes\batfile] [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.bat] @="batfile" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\batfile\shell\open\command] @="\"%1\" %*" Windows Explorer also now crashes with a .NET run time error, which is pretty sad, fortunately I mainly use the Delphi UltraExplorer instead. Possible the Explorer crash is due to third party software like Open Shell Menu. Angus
  13. Angus Robertson

    Windows 11 22H2 lost batch file association

    But not in the GetIt scripts, and perhaps many other installers, which is why I brought it up. Angus
  14. Busy finishing off other things, but the System.Zlib implentation will be the most painless and backward compatible solution possible, as are most ICS changes, don't like breaking things. Angus
  15. Angus Robertson

    Bookmarks 1.6.3 in 11.2

    Delphi 11.2 seems to have new IDE bookmarks behaviour, which I understand is an IDE Bookmarks addin from Parnassus. In the IDE I have dozens of tabs open with different units, with bookmarks in a few of those units. If I right click to show the Bookmarks menu it lists bookmarks in the current unit, but if I select one the editor cursor jumps to a random bookmark in a different unit instead of the current unit. Just discovered there is a new docktable Bookmarks window that seems to work for the current unit, but the right click menu bookmarks I've used for 20 years are still useless. Angus
  16. Angus Robertson

    Bookmarks 1.6.3 in 11.2

    The Bookmarks docking window is not in Delphi 2007, so new some time since then, I've never looked for it before since the old way of using bookmarks worked perfectly, until Delphi 11.2. There are probably numerous other IDE features I've missed as well! I do like conditional lines being (sometimes) greyed in 11.2, very useful when working on projects with vast amounts of conditional code. Did not need to search for that, just worked. Angus
  17. Yes, this is illustrated in the PemTool sample, on the Certificate Tools tab, select a Windows store and click Display Cert Store. This fills a TMsX509List using the LoadFromStore method, the sample displays the main information for all certificates found, but you can use the Find method to get the certificate with a specific SHA1 digest. If you want the SHA256 digest you'll have to loop checking each. Angus
  18. Angus Robertson

    11.2 Patch 1 is out

    No, the Win64 path issue is not fixed by the patch, you have to manually patch the registry or change the library path, just done it, so ICS packages can again be built. Angus
  19. Angus Robertson

    New security requirements for code signing, disruptive ?

    That concept I can live with for a local dongle, the major problem I have is with shipping physical dongles around the world each year to be updated. customs do not like USB keys. Angus
  20. Angus Robertson

    New security requirements for code signing, disruptive ?

    Yubico has a SDK for the ubiHSM 2 FIPS dongle which can be used with older OpenSSL releases using engines, then Osslsigncode updates the PE file authenticode signature. TPM2 might be easier, not sure if Yubico supports it. Angus
  21. Angus Robertson

    New security requirements for code signing, disruptive ?

    I signed the OpenSSL binaries with a Certum dongle for a while, that prompted for a password for each file which was a pain, then Certum told us the dongle was obsolete and we'd have to buy a new one, so gave up and now using my Comodo/Sectigo certificate. One possible solution is to use OpenSSL to sign Windows PE files, there is project Osslsigncode intended to sign on Linux but can be built for Windows. Another project has a TPM2 provider for OpenSSL that should be able to read keys from dongles, although not checked if the Yubikey is a TPM2. Not a trivial project, but might be a good solution. Angus
  22. Angus Robertson

    Delphi 2007/Win11 debugger

    When I run a server application under the Delphi 2007 debugger on Windows 11, I'm seeing a lot of these lines in the debug window, although the server is behaving as expected with no new errors. Debug Output: onecore\net\netprofiles\service\src\nsp\dll\namespaceserviceprovider.cpp(550)\nlansp_c.dll!6A1C85D4: (caller: 7523CD00) LogHr(16) tid(4c44) 8007277C No such service is known. The service cannot be found in the specified name space. Process webapp_telecom.exe (12000) No idea why onecore or net is being used, this is a Win32 application. I've had a DNS problem on the PC since I upgrade to W11 last week, lookups are sluggish as If it's trying the wrong server first, but nothing in the event logs. Angus
  23. Angus Robertson

    Delphi 2007/Win11 debugger

    Not sure the current Microsoft API information is correct, I thought gethostname goes back to the early days of Windows, and Microsoft simply no longer documents versions of Windows it does not support. Reporting bugs to Microsoft is hard work, a while back I did get one fix where a SQL ADO DLL was leaking a handle for each async call, but it took a lot of effort, I rewrote my application to use a thread instead. Angus
  24. Angus Robertson

    New security requirements for code signing, disruptive ?

    The date for this change was 15 November 2022 but has now been postponed until June 2023. One way to put off the inconvenience of buying a $200 dongle and shipping it around the world is to buy a multiyear certificate now. I've got a three year certificate from K Software for $209, SSL.com would be $330 for three years, they sell durations up to 10 years, not sure that is allowed now. Angus
  25. Angus Robertson

    Delphi 2007/Win11 debugger

    Did the German language post suggest an alternative API? gethostname is used by the ICS LocalHostName function, and from my reading there is no alternative API. I guess the namespaceserviceprovider debug error is because the computer host name can come from several places, and internally an error on one location will cause it to look elsewhere. So it's something we just have to live with. A Stack Overflow suggests it's a Windows 11 bug: The behaviour you're seeing seems to be due to Layered Service Providers being deprecated as of Win11 (and potentially an upcoming Win10 update). GetHostByName is listed as deprecated, but GetHostName is not and also displays the same behaviour. In both cases the method queries any available namespace service providers first and then falls back to querying the NetBIOS name if none are found. As of Win11 it seems the call to enumerate the namespace service providers fails internally, generating the debug output you see. Angus
×