Jump to content

Angus Robertson

Members
  • Content Count

    2071
  • Joined

  • Last visited

  • Days Won

    38

Posts posted by Angus Robertson


  1. Sure you can copy a certificate from a token, the certificate is also in every program you sign. 

     

    But the token keeps the certificate private key secure so it can not be copied, shared or stolen, which means you can only sign code with the token, which actually handles the sign operation, the private key never leaves the token.

     

    There are ways to remotely sign code using the cloud or remote servers, suggest reading https://www.finalbuilder.com/resources/blogs/code-signing-with-usb-tokens

     

    Microsoft also has a remote signing solution https://learn.microsoft.com/en-gb/azure/trusted-signing/

     

    Angus

    • Thanks 1

  2. Another define to kill, OpenSSL_Check_SignCert will stop the verify trust check, usually that only fails on very old versions of Windows.  

     

    OAuth2 uses two tokens, when you authenticate with a login and password a refresh token is generated which usually has a very long expiry, maybe years, and is used to generate an access token which is short lived, an hour to a day, and a new one is generated regularly by ICS from the refresh token.   So you save securely the refresh token, not the access token. 

     

    Angus

     


  3. Be careful with OAuth2 refresh tokens, they do make authentication very simple and usually remain valid for months or even years.  But you must have some code in place for the day the token becomes invalid without notice, immediate emails to the system admin (using the IcsMailQueue component), because otherwise you are going to have hundreds of failed requests very quickly.  Perhaps dummy requests during the night so you get a warning before the rush. 

     

    Angus

     


  4. You should also undefine OpenSSL_AutoLoad_CA_Bundle.  This causes OpenSSL to be loaded when any ICS application is loaded, even if no ICS components are used. 

     

    This define is usually best since otherwise OpenSSL can be loaded and unloaded repeatedly if not done manually once before making any SSL calls. 

     

    I've never tried using ICS in an ISAPI, only simple DLLs, they are not quite standard with a few special exports.  All my Windows 2025 servers run an ISAPI I wrote 20 years ago and last compiled in 2005, never needed to touch it, just keeps working, fortunately Microsoft does not mess with IIS, so nothing ever breaks. 

     

    Angus

     


  5. webview2loader.dll is used to load the Edge browser, no way that will run as a Windows service, no Window.  You can use ICS OAuth2 stuff in services, but only with saved refresh tokens obtained from another application. 

     

    If you are using a recent ICS version, the loading problem is probably ICS trying to extract the OpenSSL DLLs from the DLL, never tested that, try disabling define OpenSSL_Resource_Files.

     

    The component itself runs fine in a normal DLL, I recently updated OverbyteIcsConHttp.dpr

     

    Angus

     


  6. This error often happens with older versions, but usually just means the property is lost for the old version, which only matters if you have been already set it specifically for the newer version.  I often open applications in both Delphi 11.3 and 2007, and ignoring properties never causes a problem.

     

    What is more annoying is the IDE inability to cope with a lot of similar errors, insisting on presenting dozens of modal dialogs if you open a large project group, you have to be so careful if what you click to avoid components not being removed from forms if they are not currently installed in the IDE.

     

    Angus

     


  7. I have implemented extended passive (and port) mode for the ICS client for IPv4 connections, however I'm not sure if it will fix the original poster's problem since it will only be used if the server FEAT command advertises availability, so it is unlikely to fail.  If it does fail, there is a new option that stops the EPSV and EPRT commands being used.  I asked for an FTP log that would have shown the FEAT command and failure response, but can not guess what is happening.

     

    The ICS FTP server already supports EPSV for IPv4, unfortunately the developer that added it missed updating the FEAT command so it's not advertised, and few FTP clients will use it for IPv4, now fixed as well, will be in SVN once more testing is done.

     

    Angus


  8. Packages and programs only have one Win32 option, no idea how you select the tool chain. 

     

    In terms of samples, the obvious ones OverbyteIcsHttpsTst.cbproj, OverbyteIcsWebServ.cbproj, OverbyteIcsCliDemo.cbproj, would be a good start to check applications build.

     

    Angus

     


  9. I'll update the types unit with the new include emits shortly. 

     

    I can only build C++ packages not use them, since the ICS C++ samples are too old to build with modern compilers, it really needs someone to update two or three C++ samples so I can test that they build with new versions of ICS. 

     

    The C++ Win64 packages build with release for me, but not debug, someone will need to look at that. 

     

    The common package builds for Win64x, but not the run package which imports conmon, because currently D12.2 can only import Delphi packages and not C++ due to missing symbol files, due to fixed in a future release.  

     

    Angus

     

     


  10. The concept of certificate revocation is changing due to the slow down it causes and the massive databases needed.  OCSP seems to be dead with browsers no longer using it (CRL instead), Let's Encrypt is stopping it's OSCP servers service soon.  The industry wants certificate life to be shorter so they are replaced regularly (monthly) rather than being revoked.  

     

    But this is not really relevant to code signing, since expired certificates are usually trusted provided they are time stamped signed, Azure issues code signing certificates that expire within two days or something.  You can only revoke unexpired certificates, and our signed applications need to run for years or decades, thus the time stamp.  

     

    In theory, the OS or scanners could try and check old signing certificates being revoked, but it would not be easy.

     

    Angus

     


  11. It is up to the FTP client to decide whether to start passive mode with a PASV or EPSV command, the former has worked with IPv4 for decades, the latter is required for IPv6 so no check for availability is needed.  None of this has changed in ICS in 15 years or more. 

     

    I've never seen a server refuse a PASV request, even if it supports EPSV as well.

     

    It would need changes to the FTP client to prioritise EPSV over PASV, and I'm not likely to get to that for a few weeks.

     

    Angus

     

×