Jump to content

Angus Robertson

Members
  • Content Count

    1881
  • Joined

  • Last visited

  • Days Won

    33

Everything posted by Angus Robertson

  1. Angus Robertson

    THttpServer port number...

    The port number property does not change if you specify zero, it remains zero. You need to find the port number allocated by windows: saddr : TSockAddrIn6; saddrlen : Integer; { Get the port number as assigned by Windows } saddrLen := SizeOf(saddr); ListenSocket.GetSockName(PSockAddrIn(@saddr)^, saddrLen); DataPort := WSocket_ntohs(saddr.sin6_port); This should work with the listen socket in SocketServer, but other things that need the port won't know about it. And not tested for zero. Angus
  2. Angus Robertson

    THttpServer port number...

    TWSocket allows the port to set to zero and listen called with a random port allocated by Windows, this is used by the ICS FTP client for the PORT command. Not sure about TWSocketServer, never tried it but it's rather more complex listening on multiple ports so ignoring zero is quite possible, TWSocketServer is certainly not designed to listen on a random port. Again the FTP client has code to allocated ports sequentially from a specific range, trying the next if in use, so you could borrow that. Angus
  3. Angus Robertson

    JOSE functions - IcsJoseFindAlg

    A RSA-PSS key should be PS256 not RS256, but this is really down the other end, whether it accepts both type of RSA keys for RS256. Easy to relax our code, if the server is also relaxed. I'll look at this stuff when I do SASL for gmail. Angus
  4. Angus Robertson

    ICS icsv863 wil not compile under MacOS 64 bit (MACOSX 10.14)

    And what happens when you build for MacOS? I think you will get the same errors. It seems GetSystemTime is Windows only so need some conditional code there, guess no-one has tried to build for MacOS for a few months since that was added. You can try making those two UTC function dummies removing the real code, I think they are only used for the time client and server. Sorry, I won't be looking at this immediately. Angus
  5. Angus Robertson

    ICS Wish List

    I did finally get a Twitter developer account a while back, but always seem to be fire fighting something else when I try to get back to OAUth1. Angus
  6. Angus Robertson

    JOSE functions - IcsJoseFindAlg

    I was testing Google Accounts last week, it's OAuth2 implementation is unusual but now supported by ICS, did not get as far as trying a service account. But if Google is returning RSA-PSS keys, we need to support them, so on my list. Angus
  7. Angus Robertson

    ICS icsv863 wil not compile under MacOS 64 bit (MACOSX 10.14)

    Quite happy to make ICS compatible with MacOS64, but you need to tell me what errors appear in which units, I don't have any Apple hardware to test. Or is this a DEFINE issue, with MACOS or POSIX not being declared on MacOS64? Angus
  8. Angus Robertson

    ICS icsv863 wil not compile under MacOS 64 bit (MACOSX 10.14)

    Which previous version did you successfully build under MacOs64? The announcement said MacOS and Win64, not MacOs64. Angus
  9. Angus Robertson

    ICS V8.63 announced

    ICS V8.63 has been released at: http://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 and 10.3 Rio, and C++Builder 2006 to XE3, 10.2 Tokyo and 10.3 Rio. ICS supports VCL and FMX, Win32, Win64 and MacOS targets. The distribution zip includes the latest OpenSSL 1.1.1d win32, with other versions of OpenSSL being available from the download page. 1 - IcsHosts is now supported in all the main ICS server components, TWSocketServer, TSslHttpServer, TSslHttpAppSrv, TIcsProxy, TIcsHttpProxy, TIcsIpStrmLog and TSslFtpServer. This simplifies server applications which do not need to setup an SSL context, can easily support multiple listeners and hosts, and can automatically order and install SSL/TLS certificates from Let's Encrypt and commercial suppliers. 2 - There are several changes relating to automatic certificate ordering, mostly cosmetic based on experience adding the feature into more applications with a few issues fixed during testing with better logging. 3 - Made improvements to handle the OAuth2 version used by Google Accounts, allowing the REST component to access Google APIs such as Gmail. 4 - Did a major refresh of the three SSL/TLS trusted root certificate bundles included with ICS, to add new roots from Amazon and others, and remove untrusted certificates. 5 - There are improvements in TFtpCli to access FTP servers behind NAT routers where the internal and external IP addresses are different and not correctly handled by the FTP server. 6 - The TSslFtpServer component now uses the IcsHosts concept added to the web and proxy servers two years ago, see above. There is a new IcsHosts property which allows multiple hosts to be specified. Also fixed ftpsNoPasvIpAddrInLan and ftpsNoPasvIpAddrSameSubnet options to work correctly to present local passive IP address on LANs. 7 - The TIcsIpStrmLog component will now start despite non-fatal SSL/TLS certificate warnings, and may be used with self signed certificates. The OverbyteIcsIpStmLogTst sample shows how to restart the TCP server after the first SSL/TLS certificate is automatically installed. More detailed release notes are at: http://wiki.overbyte.eu/wiki/index.php/ICS_V8.63 Angus
  10. Angus Robertson

    ICS V8.63 announced

    V8.63 was tested yesterday on RAD Studio 10.3 Rio Release 3 (aka 10.3.3) without any problems. Angus
  11. Angus Robertson

    JOSE functions - IcsJoseFindAlg

    Sorry, RSA-PSS key support is only partially implemented, it is shown as pending at the top of the unit. I spent a lot of time learning and implementing the Jose stuff, and started to code new keys types, but never got to test them properly since they are rarely used even 18 months later. In the end I have to move on and implement the Let's Encrypt stuff this was written for. Looking at the code, RSA-PSS keys are actually checked later in that function for jsigRsaPss256, or are you saying they can also be used with jsigRsa256? Angus
  12. ICS contains dozens of units, only a few of which are updated for new releases. So many units have older versions. But units they depend on may be later and fix bugs in that unit. The overnight zip from SVN is the latest, V8.63 will be finally released later this week. Angus
  13. If you want help with connection problems you need to give us real URLs, we can not waste time looking for code problems when the input or site is faulty. Your previous post was a perfect example. You should also test the site using the REST sample which has proper logging to show what is happening. It will probably work, and you can then check why your own code fails. Please don't post ICS source code here, we have it already. Angus
  14. Angus Robertson

    Server Image Files corrupting *(NOT)

    Not aware of any file download problems with the web server, my clients access thousands of files daily, for 10 years. I'll put this on the list to test, but it will take a while. Angus
  15. Thanks, fixed, it also checked an older setting, which is why I missed it. Angus
  16. Angus Robertson

    Sending Email via GMail Using OAuth 2.0 via Indy

    Gmail still allows SMTP and POP3 access with basic authentication, provided you ignore all attempts by Google to set-up better security on the account, and accept the odd/regular email that your account is being used by a suspicious application. But once you have turned on 'better security' (forget it's real name) you can not turn it off, so have to set-up a new gmail account. The OAuth2 option is not too bad, you only need to authenticate with a Google login using a browser once and the refresh token provided remains valid until not used for six months, or when the account is changed. so you can get a new access token each time you send email without needing to authenticate again. Other OAuth2 implementations usually expire the refresh token within 24 hours. Angus
  17. The install instructions are in readme8.txt in the ICS root. You only install one of those groups, depending on whether you want just VCL or VCL and FMX. Angus
  18. This was reported in this forum on 21st October and an illegal date of zero no longer raises an exception in V8.63 which will be released real soon, but can be downloaded now from SVN or the overnight zip. But functionally your application will not behave differently, the conversion function simply returns zero rather the exception setting zero, so will not explain your other issues. Are you using TSslHttpRest yet, it has cookie handling built-in. Angus
  19. So you have built and installed all the component packages with 64-bit targets? And only have the 64-bit library paths for your application? The install group project for each compiler has a Build Group pane that builds for 32 and 64-bit platforms automatically. Your screen shot above should show Release/Win64 and Release/Win32 paths so you have done something unusual. Having said that, when doing releases I only build for the D2007 and latest compilers, not the dozens of others, some no longer have licenses available... But they built when last the latest and have all the new units since. Angus
  20. Bad URL, nothing more that can said. If you want real help, you need to give us real data. Angus
  21. Angus Robertson

    The HTTP 206 Partial Content

    Which must be the result of code you have not shown, you need to use the debugger. You should build the OverbyteIcsHttpRestTst.dpr sample and try your URL using the GUI first. Angus
  22. Angus Robertson

    The HTTP 206 Partial Content

    One possible reason is HTTP 1.0 does not support Keep-Alive, it should be 1.1. You are also setting a POST content type but using GET. That component added httpAuthBearer 18 months ago so you are probably using an old version. You would be better using the newer TSslHttpRest component that is much easier to use than THttpCli and has a new demo OverbyteIcsHttpRestTst.dpr designed for OAuth2. REST and Json. Angus
  23. Angus Robertson

    FTP transfers...

    The FTPMulti component only use sync commands. Sure it will work with extra code to set the correct directory, but that code will be called anyway including creating directories if they don';t exist, with the correct parameters. Try the sample. Angus
  24. Angus Robertson

    FTP transfers...

    Just tested 'Single FTP' upload using the ICS File Transfer Demo and it seems to work correctly. You should not need to set any component properties for paths, FtpUpOneFile uses the remote path specified there and correctly changes to the specified directory: > PWD < 257 "/" is current directory. > CWD /logs/testing/ < 250 CWD command successful. "/logs/testing" is current directory. > PWD < 257 "/logs/testing" is current directory. Uploading File, C:\tempfiles\regnam20.zip to /logs/testing/regnam20.zip, size 238 Kbytes Angus
  25. Angus Robertson

    TCP File Server

    If you want to do some ICS stress testing, you can use my ComCap5 and ComGen5 tools, the former is a general purpose data capture tool, the latter generates streams of TCP or UDP data to test the former. I tested ComGen5 creating 2,000 sessions to ComCap5, with 100 new connections per second (which is configurable) with ComCap5 saving data from all the connections into the same log file. Both tools use a single thread for all the connections. ComGen5 uses an array of TIcsIpStrmLog components to make the TCP client connections to TWSocketServer in ComCap5. SSL slows down the number of new connections per second, with about 300 out of 2,000 failing first time, but TIcsIpStrmLog retries failed connections so the session start on the next attempt. Angus
×