Jump to content

Angus Robertson

Members
  • Content Count

    2063
  • Joined

  • Last visited

  • Days Won

    38

Everything posted by Angus Robertson

  1. Angus Robertson

    Convert ISuperObject TDateTime to RFC3339

    I will be looking at the time zone issue, but fixing it in a non-breaking way. Angus
  2. Angus Robertson

    TSuperObjectIter ObjectFindFirst problem

    Sorry, I don't have the time to enhance your code, unless there is a specific application for it. Nor do I change anything for which there are no tests. Angus
  3. Angus Robertson

    Convert ISuperObject TDateTime to RFC3339

    Date/time handling in ISuperObject was lacking, so I added it myself, from the changes at the top of the OverbyteIcsSuperObject unit: Added new datetime get/set type for Delphi TDateTime, saves as ISO 8601/RFC3339 string: obj.AsDateTime, obj.AsObject.DT['foo'], obj.DT['foo'], obj.AsArray.DT[0] I also improved the parser to return error information upon failure instead of a nil object. Angus
  4. Angus Robertson

    Error with Overbyte ICS sample project

    OK, YuOpenSSL does solve the DLL problem, although your application installer should ensure it's not really a problem anyway. I'm aware there are trial and commercial versions of YuOpenSSL, and that the trial version of other components expire in spectacular manner, so I would check the trial lasts more than a few weeks, and you can get new trial versions with security fixes. Angus
  5. Angus Robertson

    Error with Overbyte ICS sample project

    The latest OpenSSL DLL files can be downloaded from the same site you found ICS V8.70, they are also included in that zip, in the Samples\Delphi\SslInternet\ directory and in OpenSSL-Win32\. You need to copy the DLLs into the same directory as your EXE and leave GSSL_DLL_DIR blank, no idea what path you are trying to set. YuOpenSSL is an alternative commercial product that avoids needing DLLs, you don't need it to use ICS. Angus
  6. Angus Robertson

    ICS & DelphiMVCFramework

    Your solution may be easier than a pool, but it does not seem to work. ICS was not designed for cross thread use, use of threads within ICS is very rare, only for long ZLIB operations and a background mail queue. Angus
  7. Angus Robertson

    ICS & DelphiMVCFramework

    So effectively you want to use an external pool of TSslHttpCli objects from within your threads, rather than creating them as needed within the threads? So why use TSslHttpCli in the thread, why not just use one of the pool objects asynchronously, waiting in the thread for a semaphore to be set on competition? Windows actually creates a thread for async winsock operations, so there is no reason to use TSslHttpCli in the thread with all the messy stuff that goes with it. One of the ICS samples uses a pool of components and a queue to download all the elements on a web page. Angus
  8. Angus Robertson

    TSuperObjectIter ObjectFindFirst problem

    Thanks for the code, added to my local copy, will be in SVN later this week. Angus
  9. Angus Robertson

    OAUTH and Exchange POP 3

    It looks like all the OAuth2 stuff has worked, but the account you authenticated does not have access to POP3 mail. Could be different scopes are required for Exchange, I only test against consumer accounts and servers like office365.com. The error for graph.microsoft.com is attempting to get your profile and email address, which works with Google but not currently Microsoft, I could not find scopes that gave access to all the APIs I needed. It's not fatal. Angus
  10. Angus Robertson

    OAUTH and Exchange POP 3

    To use OAuth2 with the POP3 component, you need to also use the TIcsRestEmail which handles all the OAuth2 stuff, look at the OverbyteIcsSslMailRcv sample which has all the extra code needed. There will be significantly improved OAuth2 support with a new embedded browser window later this week. Angus
  11. Angus Robertson

    FinalizeSsl

    Can you reproduce this problem in any of the ICS sample applications? Never seen it before. Generally, ICS handles loading and unloading OpenSSL itself, some application use LoadSsl to load it early to check for errors or version, but it's not necessary. Angus
  12. The main issue in implementing your dual protocol concept is pre-reading the initial data received from the client, and then resetting so that it's read a second time after initialising SSL. That will be messy with our event driven structure. Angus
  13. My own servers listen happily on multiple ports and addresses using IcsHosts without a problem. This is my main web server: Socket 1 State: Listening Only IPv4 on 217.146.102.150 port 80 Socket 2 State: Listening Only IPv6 on 2a00:1940:2:2::150 port 80 Socket 3 State: Listening Only IPv4 on 217.146.102.150 port 443 SSL Socket 4 State: Listening Only IPv6 on 2a00:1940:2:2::150 port 443 SSL Socket 5 State: Listening Only IPv4 on 217.146.102.155 port 80 Socket 6 State: Listening Only IPv6 on 2a00:1940:2:2::155 port 80 Socket 7 State: Listening Only IPv4 on 217.146.102.155 port 443 SSL Socket 8 State: Listening Only IPv6 on 2a00:1940:2:2::155 port 443 SSL Socket 9 State: Listening Only IPv6 on 2a00:1940:2:2::250 port 80 Socket 10 State: Listening Only IPv6 on 2a00:1940:2:2::250 port 443 SSL Socket 11 State: Listening Only IPv4 on 217.146.102.153 port 80 Socket 12 State: Listening Only IPv6 on 2a00:1940:2:2::153 port 80 Socket 13 State: Listening Only IPv4 on 217.146.102.153 port 443 SSL Socket 14 State: Listening Only IPv6 on 2a00:1940:2:2::153 port 443 SSL Hosts=www.telecom-tariffs.co.uk,www.telecom-tariffs.uk,telecom-tariffs.co.uk,telecom-tariffs.uk BindIpAddr=217.146.102.150 BindIpAddr2=2a00:1940:2:2::150 BindNonPort=80 BindSslPort=443 (lots more) And different Let's Encrypt certificates on each address. Angus
  14. I accept your concept is possible, but would be messy to implement in ICS, and add code that would be of no use to the vast majority of users but would end up in all server applications. I suggest you derive a new component from TSSLWSocketServer, and implement it yourself. If there is interest from other developers for this functionality, it could be added to ICS. Angus
  15. Technically, it is possible to recognise a non-SSL connection is being made to an SSL port, OpenSSL specifically checks if an HTTP header is being received rather than a HELLO packet and raises an error. And hackers often do this, attempting to made non-SSL connections to port 443, no idea why. But to fall back from SSL to non-SSL would require the co-operation of both client and server, a non-SSL client would never attempt to connect to port 443, unless incorrectly configured. So I'm not sure what scenario you are anticipating. Perhaps some industrial environment where you use a special port 8080 or something for ease of configuration of both protocols on the same port? This is hardly a widely needed feature, so development would be hard to justify, except commercially. Angus
  16. Angus Robertson

    ICS V8.70 announced

    There are ifdefs relating to other zlib related files, and those changed in V8.70 to support native Delphi zlib, but OverbyteIcsZlibHigh is always used unconditionally in any unit that needs ZLIB support. But I may have screwed something up, I'll do more testing later in the week. Angus
  17. Angus Robertson

    ICS V8.70 announced

    Those literals and functions are in OverbyteIcsZlibHigh.pas. That unit was heavily rewritten last month for the last release, but has existed for many years. Angus
  18. Angus Robertson

    TSuperObjectIter ObjectFindFirst problem

    If you build the OverbyteIcsHttpRestTst sample application and access your JSON URL, you'll see the sample parses the JSON into a ListView, you can click on an object and it will expand that into another window, mostly done in the DisplayJson procedure using SuperObject DataType. Angus
  19. Angus Robertson

    ICS V8.70 announced

    All I can say is it builds here without errors on 11.2, do it almost daily. I rarely build the non-FMX packages, but if you are not using FMX they should be fine. Angus
  20. Angus Robertson

    Error with Overbyte ICS sample project

    Your main problem is trying to use old software in a world where security changes need newer software. The SSL error you got is almost certainly because the application was using obsolete SSL protocols that are no longer supported, only TLSv1.2 and TLSv1.3 are acceptable today, and the latter needs software released in the last two years, V8.58 is four years old and will be packaged with obsolete versions of OpenSSL and default protocols. You should be using V8.70. Also we have not updated or tested the C++ samples for 10 years, so they need updating to use the latest protocols, you need to compare the Delphi samples and see what changes have been made in 10 years. Sorry, the ICS authors don't support C++, that can only be done by users of the component. Angus
  21. Angus Robertson

    Net Find Component

    The component probably was in use 15 to 20 years ago, it looks like clean code, but compilers change. That User Made page is all very old projects for old versions of ICS, several of them are now part of ICS. Angus
  22. Angus Robertson

    Net Find Component

    But what error are you getting, and when, compile or runtime?. That ancient program was built for an earlier version of ICS, but should still work once the unit names are corrected. You may want to change all strings to AnsiStrings and Char to AnsiChar since you are using a unicode compiler. Or are you expecting someone to correct, build and debug it for you? Angus
  23. ISuperObject documentation and examples are very poor, but it's a reliable and fast library... There is an example in the OverbyteIcsSslX509Certs.pas unit, search for SA([]) which creates an empty array, then you can add elements with a blank name to create a simple array. Angus
  24. Conditionally added CRLF to a header line is certainly possible, but it would be better done when the properties are set. I'm planning a new multi-threaded web server which will be an opportunity to clean up legacy problems with the existing server that has evolved over 25 years. Angus
  25. Angus Robertson

    Zip Compression library

    The USP of LZMA in 7Zip was higher compression size and better decompression speed, against a slower compression speed, which is usually done rather less frequently. ZLIB deflate as used by ZIP and HTTP compression is speed, not minimal size, with options for both. The ZLIB library in Delphi is optimised C code which will be faster than the Pascal conversion of LZMA, I'm sure the DLL version will be faster, but then we are into DLL hell. Angus
×