Jump to content

giomach

Members
  • Content Count

    13
  • Joined

  • Last visited

Everything posted by giomach

  1. This problem is similar to "tlsv1 alert protocol version" raised on this forum in December 2020. I have tried to understand the solution to that problem but I cannot follow it and I cannot know if it applies to my system. I wrote a Delphi program using units IdHTTP, IdSSLOPenSSL, etc. to access the Babelfy server (http://babelfy.org/guide#HowdoIobtainaBabelfyAPIkey? option HTTP API). The program worked until recently, but now gives "Error connecting with SSL. error:1409442E:SSL routines:ssl3_read_bytes:tlsv1 alert ptorocol version". I gather that this may mean that the server has disabled something called TLS v1, but no information can be obtained about any such change, or what version of TLS is now required. In trying to follow the previous postings, my first step was to change a statement to the following LHandler.SSLOptions.SSLVersions := [sslvTLSv1, sslvTLSv1_1, sslvTLSv1_2]; where previously it has only sslvTLSv1. However the extra parameters are 'undeclared identifiers' in Delphi. I have Delphi XE Version 15.0.3953.35171 with update 1 installed, and (according to the Delphi Help) Indy.Sokets 10.1.1. Is it possible to say from this whether my system can support access to servers which have dropped TLS v1?
  2. giomach

    Another case of tlsv1 alert protocol version

    Many thanks again. I have to leave this project aside for a while, but I think I should be able to complete installation when I return to it, with the help I have received here.
  3. giomach

    Another case of tlsv1 alert protocol version

    Many thanks again for your patience. I've now compiled the five .dpks. The new files created are: • In "Package Output Directory": IndySystem150.bpl, IndyCore150.bpl, IndyProtocols150.bpl, dclIndyCore150.bpl, dclIndyProtocols150.bpl • In "DCP Output Directory": IndySystem150.dcp, IndyCore150.dcp, IndyProtocols150.dcp, dclIndyCore150.dcp, dclIndyProtocols150.dcp The above directories were empty before compilation. There were also loads of .dcu files and a few .proj files created. I'm satisfied that all the files of my original (10.1.1) Indy installation are unchanged. Note that I have NOT (yet) uninstalled anything. The next step seems to be "installation", but I'm not clear what that means. Is it about making the packages appear (or rather, updating them) in the IDE's Tool Palette? And is it then only the two design-time packages that require installation? In the IDE, do I: Open dclIndyCore150.proj, then Component/Install Packages? And then the same for dclIndyProtocols.proj? What files will that create, and how will I avoid disabling 10.1.1, which I might need for DataSnap in the future? It doesn't look like I can have two versions of Indy installed in the IDE at the same time. > you can install the 2 dcl Packages in the IDE if you want to (replacing the old one), or just update individual projects to reference the newer non-dcl packages as needed Does that mean that I might not need to (re)install anything, but just change Project Options to pick up the new files? Looking at the Indy 10.1.1 files, there are the five .bpl files in the \bin directory, all WITH the "150" suffix in their names and three .dcp files, all WITHOUT the "150" suffix, in lib\win32\debug and three others (smaller) in lib\win32\release. I suppose that's the structure I should be aiming for, but in different directories from 10.1.1. How do I get there, please?
  4. giomach

    Another case of tlsv1 alert protocol version

    Sorry to be so obtuse. I've not worked with packages before. > open the 5 .DPK packages directly in the IDE and then compile+install them from the Project Manager From the directory where I unpacked Indy-master.zip, I opened Indy-master\Lib\System\IndySystem150.dpk in the IDE. I got a warning that IndySystem150.dproj (I think) would be updated and a backup created. I gave that the go-ahead and I have a new IndySystem150.dproj in the \Lib\System directory, which did not exist in the zip file. IndySystem150.dpk has not changed. When I reopen IndySystem150.dpk in the IDE, I find myself in "IndySystem150 - Delphi XE - ProjectGroup1.groupproj." Is my next move to choose "Compile IndySystem150" from the "Project" menu? What will the compiled output be called and where will it be placed? The project option "Package Output Directory" has been set to $(BDSCOMMONDIR)Bpl (wherever that is! - there's a Bpl subdirectory under C:\Users\Public\Documents\RAD Studio\8.0, and it's empty). Do I need to change the package output directory to avoid disturbing the original IndySystem150.bpl in RAD Studio\8.0\bin, or does that only arise at the next step of "installation"? Where is my original installed version of the package anyway? These are among the files that were created long ago when Delphi XE was installed: RAD Studio\8.0\source\Indy10\System\IndySystem.dpk RAD Studio\8.0\bin\IndySystem150.bpl and other copies buried deep in ProgramData and in Users\AllUsers RAD Studio\8.0\lib\win32\debug\IndySystem.dcp RAD Studio\8.0\lib\win32\release\IndySystem.dcp
  5. giomach

    Another case of tlsv1 alert protocol version

    Two questions already about compilation and installation of Indy. 1. Is the batch file for installation in Delphi XE called FULLD_XE.BAT? I don't see such a file in Indy-master.zip. 2. The instructions for XE say "If you need to use DataSnap, then you will need to maintain the original Indy 10 packages for use in DataSnap projects. You can use a separate installation of Indy 10 for non-DataSnap projects." I don't use DataSnap but I don't want to rule it out unnecessarily for the future. How then can I make a "separate installation" of Indy 10, thus keeping the original packages installed where they are, given that "If Indy10 is installed, it must be uninstalled first"?
  6. giomach

    Another case of tlsv1 alert protocol version

    Thanks for clarifying the relationship between Delphi, Indy and OpenSSL. I'll try to recompile Indy for XE. Just for the record — it doesn't change anything significant, just makes things more consistent — the references in my last post on this thread to Studio/20.0 should instead have been to RAD Studio/8.0. The libeay32.dll and ssleay32.dll there are version 0.9.8.14. And lines 231–2 of IdSSLOpenSSL.pas actually read type TIdSSLVersion = (sslvSSLv2, sslvSSLv23, sslvSSLv3, sslvTLSv1)
  7. giomach

    Another case of tlsv1 alert protocol version

    Many thanks for replying. As I'm way out of my depth here, I don't want to try anything too ambitious, like recompiling Indy from source (if that is what your suggestion involves — I downloaded Indy-master.zip from your link and it seems to be all source) . The idea that Indy could be updated independently from the rest of Delphi is something I haven't yet come to terms with. So can I try your patience and ask: can I use compiled dlls instead, like libeay32.dll and ssleay32.dll? I've downloaded those (v 1.0.2.21) from https://github.com/IndySockets/OpenSSL-Binaries but simply placing them in the application directory changes nothing. There are no files called libeay32.dll or ssleay32.dll already on my computer, except in the system directories of installed applications. One of these directories is Program Files (x86)\Embarcadero\Studio\20.0\bin\subversion They are v 1.0.2.14. Could that be where Delphi finds them? My project search path consists of $(BDSLIB)\$(Platform)\release, $(BDSUSERDIR)\Imports, $(BDS)\Imports, $(BDSCOMMONDIR)\Dcp and $(BDS)\include, which doesn't seem to cover it. Also, Delphi tells me that the identifier sslvTLSv1 is defined at IdSSLOpenSSL.pas (232). The source of that file, apparently rev 1.40, in Program Files (x86)\Embarcadero\Studio\20.0\source\Indy10\Protocols, contains no such definition at that line, but lines 236–7 are type TIdSSLVersion = (sslvSSLv2, sslvSSLv23, sslvSSLv3, sslvTLSv1,sslvTLSv1_1,sslvTLSv1_2) Nevertheless only the fourth of these is recognized by my Delphi as a defined identifier. But at least the programmer was aware of the other versions by name. I'm hoping there is some way to "activate" them with the least possible disturbance. The IdSSLOpenSSL.pas in Indy-master.zip and the one in my machine source are both labelled rev 1.40. They differ in a few ways, but not — as far as I can see — in any way that relates to this problem.
  8. giomach

    Behaviour of TListView (Delphi XE)

    This simple test program places a number of strings in a single-column ListView. I don't understand why it behaves differently in virtual and non-virtual modes. In non-virtual mode, the strings are added directly to the ListView. In virtual mode, they are placed in a StringList, and linked from there to the ListView. When the strings are in place, the first item of the ListView is assigned to a local TListItem variable. Then another item (the 7th for example) is accessed (its caption is read and displayed). Then we look at the local TListItem again. In non-virtual mode, it has not changed. But in virtual mode, it now contains the 7th item, not the first. Is this expected behaviour? If so, why? Source and output attached. WNExploreUnit.pas [Sorry this file was wrong. See further message for the right file.]
  9. giomach

    Behaviour of TListView (Delphi XE)

    Thanks for taking the trouble to give this explanation. I've also noticed that, in virtual mode, every item of a ListView has the same Top value of maxint. So its not possible to scroll to a numbered item by using their Items[index].Top property, but the method using DisplayRect (drBounds).Top, mentioned earlier in this thread, works.
  10. giomach

    Behaviour of TListView (Delphi XE)

    I see now ... I should be working with the StringList rather than with ListView.Items. That never occurred to me. In virtual mode, what about code like ListItem := WordListView.FindCaption (0, 'a', true, true, false); WordListView.Scroll (0, ListItem.DisplayRect (drBounds).Top); For example, do I need to replace FindCaption by a search of the StringList? By way of explanation, it was while trying to debug such code that I became concerned about what was happening to ListItem, leading me to display its Index value. Although I no longer need to do this, it is still disconcerting that (in virtual mode) its value can change in the way that my test program showed. Thanks for pointing me in the right direction. @emailx45: I didn't explain it well. I am happy with non-virtual mode. My problem was with virtual mode, the change in value of ListItem between the two lines where its value was displayed.
  11. giomach

    Behaviour of TListView (Delphi XE)

    The right source file this time — hopefully. WNExploreUnit.pas
  12. giomach

    Behaviour of TListView (Delphi XE)

    Sorry, wrong source file. The right one will be posted asap.
  13. giomach

    Highlight a specific popup menu item?

    I've been looking for a sticky popup solution, and this looks very promising. I've downloaded and run StickyPopupMenuSimulation 3.zip. I want to use hotkeys in the menu, and I have put a & on each menu item, Test &1, Test &2. There are two small problems. 1. When the menu appears, the hotkeys are not underlined. Underlining appears when a hotkey is pressed, and disappears again when a menuitem is clicked with the mouse. 2. When a hotkey for item 1 (say) is pressed, item1 is highlighted. If the mouse now hovers over item2, item2 is highlighted, but item1 also remains highlighted until the mouse is clicked. Hopefully this will not be hard to fix. I'm using Delphi XE2, update 1.
×