Anubis_68 0 Posted April 29, 2021 If I try to compile the XE3 packages, I get these Unresolved External Errors If I build CB102InstallVclFmx then it builds fine, but I can't install it, I get this error I have added the path to the System Variables, that didn't help. Any clues as to what to try next ? I'm upgrading from v8.26 because I am trying to write a ssl client that connects to AWS Thanks Share this post Link to post
FPiette 384 Posted April 30, 2021 According to the error message, you have not compiled package IcsVclCB102Design.dpk package or if you compiled it, there is an error in path somewhere and the IDE doesn't find it. Share this post Link to post
Anubis_68 0 Posted April 30, 2021 (edited) Thank you for the reply. That was the package I was installing. Why has the location of the output files changes from 8.26 ? I've added this path into the System Variables, anywhere else I need to look ? Edited April 30, 2021 by Anubis_68 Share this post Link to post
Anubis_68 0 Posted April 30, 2021 (edited) I can build and install IcsCommonCBXE3Design.bpl. So this means RadStudio can see the directory OK. But I can't build either IcsVclCBXE3Design.bpl or IcsFmxCBXE3Design.bpl, I get the unresolved externals above. Edited April 30, 2021 by Anubis_68 Share this post Link to post
Angus Robertson 574 Posted May 5, 2021 Why are you trying to install a two year old version, why not use the latest V8.66 version? Note ICS was never tested on D10.1 only D10.2 and later, which is why there are no packages. Angus Share this post Link to post
Anubis_68 0 Posted May 5, 2021 I downloaded the latest on the Overbyte website v8.58 Is that not the latest ? Share this post Link to post
Angus Robertson 574 Posted May 6, 2021 V8.66 was announced in this forum in April with a link to the main ICS wiki download page. Angus Share this post Link to post
Anubis_68 0 Posted May 6, 2021 OK, downloaded and installed the latest, v8.66 But I'm still getting the same issues as above, CBXE3 I get unresolved Externals and CB102 I get Can't Load Package So any ideas ? Share this post Link to post
Angus Robertson 574 Posted May 6, 2021 Sorry, no ideas, I don't use C++. A start would be to change the existing packages to actually target your old compiler, there are different packages for each compiler for a reason. Angus Share this post Link to post
Anubis_68 0 Posted May 6, 2021 I'm upgrading to 10.3 hopefully this will cure this problem, then it's onto the next problem Share this post Link to post
Anubis_68 0 Posted May 7, 2021 OK. I upgraded to 10.3 - everything is good so far. Installed v8.66 - Compiled and installed without an issue. Opened my test app and rebuilt - Had to link in the new files, but no other issues. Run test app and nothing happens, whereas before with v8.26 it at least tried to connect to the server, now ( watching with WireShark ) nothing at all. What I'm trying to do is connect to an AWS Server on port 8883. So this is what I have using Rad Studio - C++Builder Basic FMX project, with a TSslWSocket, SslContext & IcsLogger. With a couple of edit boxes and a go button. See below. This is what I get when I click connect. This is the code behind the button I get no Error, and the app does nothing. With the previous version, the logger recorded this The logger isn't adding anything to the file Share this post Link to post
Angus Robertson 574 Posted May 7, 2021 ICS is an event driven component, you don't appear to have any events, so you have no idea what happens after you start the connection attempt. The logger is designed for debugging the internals of the components, not end user applications. You should be reporting the onConnect event which tells you whether connection worked or failed, also onHandshakeDone. If you are using HTTPS, you should be using the TSslHttpRest which does not require an SslContext. If this is a custom protocol, use TIcsIpStrmLog which doesn't need SslConrext either. Both components are detailed in the Getting Started with ICS in readme8.txt, which explains the best components to use for new applications., also http://wiki.overbyte.eu/wiki/index.php/ICS_Getting_Started Unless your application is using an SSL client certificate (which is rare) you don't need a private key or certfile. Angus Share this post Link to post
Anubis_68 0 Posted May 7, 2021 Hi Angus, All the events in my test app are setup to put information in my InfoList so I can see whats happening. I need to establish a TCP connection to port 8883 as I'm connecting to a secure MQTT server, I can connect without issue on the unsecured port of 1883. I have all the certificates for the connection ( am I putting them in the right places is another question ? ). I am also monitoring the tcp traffic with WireShark and there is nothing at all from the app. Share this post Link to post
Angus Robertson 574 Posted May 7, 2021 After you call Connect, the onConnect event will always be called, maybe not for a minute if the connection fails. You also don't seem to set SslEnable or SslMode anywhere. All this is done for you in TIcsIpStrmLog, but I appreciate there is no C++ sample. Angus Share this post Link to post
Anubis_68 0 Posted May 7, 2021 The SslEnable and SslMode are set on the Socket The app has been "Connecting" for over 7 minutes with no further output. I can read Delphi without any issues, I'll have a look at TIcsIpStrmLog, I had not looked at it because it wasn't marked as Ssl Share this post Link to post
Anubis_68 0 Posted May 7, 2021 (edited) My mistake, thought IpStrmLog was a example project, not a component. Is there a Delphi example using this that I can have a look at ? I have modified my code to match that in OverbyteIcsSimpleSslCli1.pas, so the SslEnable is false in the component and before the call to connect. Then in the connect, I am setting SslEnable to True. ( Or it will when it gets called ) No change in the behavior of the app. Still no attempt to actually send anything to the network. Edited May 7, 2021 by Anubis_68 Share this post Link to post
Angus Robertson 574 Posted May 7, 2021 Some component properties are reset when the socket closes, and need to be set each time it is opened, SslEnable is one of them since the next connection may not be SSL. OverbyteIcsIpStmLogTst.dpr is the sample for TIcsIpStrmLog, it has both client and server modes, you only need the client part, I wrote a simple app to test something:: IcsIpStrmLog1.LogProtocol := logprotTcpClient; IcsIpStrmLog1.RemoteHost := SendHost.Text; IcsIpStrmLog1.RemoteIpPort := SendPort.Text; IcsIpStrmLog1.ForceSsl := True; IcsIpStrmLog1.StartLogging; Log onLogProgEvent and onLogRecvEvent. Angus Share this post Link to post
Anubis_68 0 Posted May 7, 2021 Thanks, I'll have a play and see what comes up Share this post Link to post
Angus Robertson 574 Posted May 7, 2021 I tried connecting to your Amazon server with the IcsIpStrmLog sample, it works without SSL, but not with SSL on that port. Ports are always configured for one or the other, unless the protocol accepts a command like STARTTLS after a non-SSL connection. Angus Share this post Link to post
Anubis_68 0 Posted May 7, 2021 WIth MQTT 1883 is unsecured and 8883 is TLS Question : Does the SslWSocket support ALPN ? I've just been reading on the AWS site that they have enabled connections on 443 and using ALPN (Application Layer Protocol Negotiation) with a specific protocol name - x-amzn-mqtt-ca then changes the protocol to MQTTS I'll see if I can find out any more information Share this post Link to post
Angus Robertson 574 Posted May 7, 2021 There is a SslAlpnProtocols property in TSslWSocket, stringlist of protocols the client accepts. The OverbyteIcsHttpRestTst.dpr sample uses it. Angus Share this post Link to post
Anubis_68 0 Posted May 7, 2021 I started to panic then, but I found it on the TSslContext. I'm creating my test app from scratch, just to make sure there isn't something in the old app that's causing me issues. I'll add a port edit and ALPN option to it as well, to test. Share this post Link to post
Anubis_68 0 Posted May 10, 2021 Well I recreated my test app eventually, 10.3 was not playing ball and I had to manually edit the project cbproj file to get it to compile. But it appears to work. So that's the good news. So now I return to my main project, edit the cbproj before I do anything, just to make sure I'm not wasting my own time. But when I compile ( clean first just to make sure ), I get the following linker error. The components I have in the project are, TWSocket, TSslWSocket, TSslContext & TFtpClient. Share this post Link to post
Angus Robertson 574 Posted May 10, 2021 In your first project, onConnect error=0 is OK, but you are not logging the error for HandshakeDone which quite often fails. It is also where your component should be checking whether you really reached the secure server you requested. Can not help on the C++ missing external, you'll need to resolve that yourself. Angus Share this post Link to post