Jump to content

Search the Community

Showing results for tags 'indy'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Delphi Questions and Answers
    • Algorithms, Data Structures and Class Design
    • VCL
    • FMX
    • RTL and Delphi Object Pascal
    • Databases
    • Network, Cloud and Web
    • Windows API
    • Cross-platform
    • Delphi IDE and APIs
    • General Help
    • Delphi Third-Party
  • C++Builder Questions and Answers
    • General Help
  • General Discussions
    • Embarcadero Lounge
    • Tips / Blogs / Tutorials / Videos
    • Job Opportunities / Coder for Hire
    • I made this
  • Software Development
    • Project Planning and -Management
    • Software Testing and Quality Assurance
  • Community
    • Community Management

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start




Found 19 results

  1. Hi all, sorry in advance for very newbie in TLS/SSL things. I'm trying to create a secure FTP Server (with TLS/SSL) using the latest Indy sources from the GitHub repository. I've created required certificates with OpenSSL and used openssl-1.0.2u-x64_86-win64 DLL's always from a GitHub repository (info from Embarcadero Delphi manual). This is an extract of dummy code to test an early connection using Filezilla FTP Client: unit osFTPServer; interface uses IdContext, IdFTPList, IdFTPServer, IdFTPListOutput, IdSSLOpenSSL; type TFTPServer = class private FFTPServer: TIdFTPServer; FIOHandlerSSLOpenSLL: TIdServerIOHandlerSSLOpenSSL; private procedure ServerConnect(AContext: TIdContext); procedure ServerDisconnect(AContext: TIdContext); procedure ServerUserLogin(ASender: TIdFTPServerContext; const AUsername, APassword: string; var VAuthenticated: Boolean); procedure ServerListDirectory(ASender: TIdFTPServerContext; const APath: TIdFTPFileName; ADirectoryListing: TIdFTPListOutput; const ACmd : String; const ASwitches : String); public constructor Create; destructor Destroy; override; end; implementation uses IdSSLOpenSSLHeaders, osSysUtils; { TFTPServer } constructor TFTPServer.Create; begin inherited; // inits default members values FFTPServer := nil; FIOHandlerSSLOpenSLL := nil; // starts IdOpenSSLSetLibPath('D:\x\develop\qem\rosetta_cnc_1\openssl.64'); FFTPServer := TIdFTPServer.Create; FFTPServer.DefaultPort := 21; FFTPServer.OnConnect := ServerConnect; FFTPServer.OnDisconnect := ServerDisconnect; FFTPServer.OnUserLogin := ServerUserLogin; FFTPServer.OnListDirectory := ServerListDirectory; FIOHandlerSSLOpenSLL := TIdServerIOHandlerSSLOpenSSL.Create(nil); FIOHandlerSSLOpenSLL.SSLOptions.Mode := sslmServer; FIOHandlerSSLOpenSLL.SSLOptions.Method := sslvTLSv1_2; FIOHandlerSSLOpenSLL.SSLOptions.CertFile := 'D:\x\develop\qem\rosetta_cnc_1\certificates\ftpserver\server-cert.pem'; FIOHandlerSSLOpenSLL.SSLOptions.KeyFile := 'D:\x\develop\qem\rosetta_cnc_1\certificates\ftpserver\server-key.pem'; FIOHandlerSSLOpenSLL.SSLOptions.RootCertFile := ''; FFTPServer.IOHandler := FIOHandlerSSLOpenSLL; FFTPServer.Active := True; end; destructor TFTPServer.Destroy; begin //### does jobs to deactivate server before to free it!!! // frees objects SafeFreeAndNil(FFTPServer); SafeFreeAndNil(FIOHandlerSSLOpenSLL); inherited; end; procedure TFTPServer.ServerConnect(AContext: TIdContext); begin //### end; procedure TFTPServer.ServerDisconnect(AContext: TIdContext); begin //### end; procedure TFTPServer.ServerListDirectory(ASender: TIdFTPServerContext; const APath: TIdFTPFileName; ADirectoryListing: TIdFTPListOutput; const ACmd, ASwitches: String); begin //### end; procedure TFTPServer.ServerUserLogin(ASender: TIdFTPServerContext; const AUsername, APassword: string; var VAuthenticated: Boolean); begin //### VAuthenticated := True; end; end. When I try to connect with FileZilla it say: Status: Connecting to Status: Connection established, waiting for welcome message... Status: Insecure server, it does not support FTP over TLS. Status: Logged in Status: Retrieving directory listing... Status: Directory listing of "/" successful What am I doing wrong? Thanks in advance for any suggestions.
  2. HeartWare

    IMAP using TIdIMAP4

    I currently have the following code: but when I try to connect to Microsoft Office365 (at outlook.office365.com) I can't get it to work (get "LOGIN failed" exception). Is there some other property of the TIdIMAP that I need to set? And what exactly should I put into the UserName/Password fields? Anyone have some working code that connects to outlook.office365.com using TIdIMAP4 ? Keld R. Hansen
  3. Hey there, I recently updated out Delphi from 10.3.2 to 11.3. We are communicating as a TLS-Client to our hardware (TLS-Server) via TLS 1.2. On Delphi 10.3.2 everything was working fine, but since the updated Version, I get a "bad hello message" at the handshake of my server. We are using the OpenSSL librariers and Indy libeay32.dll ssleay32.dll procedure myFoo; var FIdTCPClient : TIdTCPClient; FIdSSLIOHandler : TIdSSLIOHandlerSocketOpenSSL; begin FIdTCPClient := TIdTCPClient.Create; FIdTCPClient.Host := ''; FIdTCPClient.Port := 10007; FIdSSLIOHandler := TIdSSLIOHandlerSocketOpenSSL.Create; FIdSSLIOHandler.SSLOptions.Mode := sslmClient; FIdSSLIOHandler.SSLOptions.VerifyMode := []; FIdSSLIOHandler.SSLOptions.VerifyDepth := 0; FIdSSLIOHandler.SSLOptions.SSLVersions := [sslvTLSv1_2]; FIdSSLIOHandler.SSLOptions.Method := sslvTLSv1_2; FIdTCPClient.IOHandler := FIdSSLIOHandler; FIdTCPClient.Connect; FIdTCPclient.Send([0,1,2,3]); // send testdata -> server says "bad hello message" --> testdata is working @ Delphi 10.3.2; Delphi 11.3 not end; So I tried the "ICS" component and did in my opinion the same thing, just advanced the demo "...\icsv870\Samples\Delphi\SslInternet\OverbyteIcsSimpleSslCli.dproj". With this component, the communication is working! So it seems like an issue with indy. procedure TForm1.Button1Click(Sender: TObject); begin Sock.Addr := ''; Sock.Port := '10007'; RecStream.Size := 0; Sock.SslEnable := TRUE; Sock.Connect; //--> sock.TimeoutIdle := 60000; sock.TimeoutConnect := 60000; Sock.StartSslHandshake; // connected with server end; procedure TForm1.Button2Click(Sender: TObject); begin Sock.SendTB([0,1,2,3,4,5,6,7,8,9]); // this data was received by server end; Embarcadero support could't help me, because indy isn't a component developed by them. So anybody else having issues wiht TLS1.2 after updating? Did I miss something to set another parameter in indy? Thanks in advance. By the way, I am using the libeay32.dll, ssleay32.dll with the timestamp of (2019-12-21). I am not able to use the current DLLs which are recommended by embarcadero: https://docwiki.embarcadero.com/RADStudio/Sydney/de/OpenSSL If I use them, I get an error (" Could not open SSL library "), which I found already there: On worst case, I have to switch to "ICS", I try to avoid 3rd party tools and significant changed on TLS communication....
  4. FearDC

    [Very unsure] Indy vs sgcIndy

    Hi to everyone. Today I've been looking for any official news about TLS 1.3 in Indy (included in latest Delphi CE or later version) and came across a new project that I never seen before, it's called sgcIndy. At first all sounds very nice, OpenSSL 1.1.1 and 3.0.0 support is available - exactly what I need. But then it shows up that sgcIndy don't have source code available for free users - I'm kind of person that actually wants to see what's inside before actually using the third-party stuff. Then I looked again on the website that provides sgcIndy and the menu says "Other products > Indy > Download Indy" - so I get even more unsure, it's a different project, but it's called Indy. Very confusing. As I understand, sgcIndy is not Indy, right? Then what is it @esegece? I mean the original Indy is a free project, but if there is another project that builds on it, shouldn't there be at least a changelog or something that explains exactly what has been changed in the original code? It says that sgcIndy always builds on latest Indy, but do we speak about latest release, latest Git commits, unpulled requests? If sgcIndy had a different name with a simple list of new features, then I would understand. No mean to be rude, anything that is new is welcome on the market, and I really respect that, and I understand that you spend your time rewriting a lot of the code and making sure it works with latest Delphi and OpenSSL. But Indy is free, your project is not, while your project is called Indy, while it's not. I got really confused here. @Remy Lebeau what do you say about all this? I really would like to hear. Maybe I'm just too paranoid. And a question to the rest of community: Has anyone actually tested the free version of sgcIndy, what is the difference, does anything work sketchy at runtime? I don't know, maybe someone paid for full version and actually took a look at code and compared it with Indy? Again, no mean to be rude to anyone. Just asking what's new, what's old, why and why not. Regards.
  5. Hi all, First of all, I apologise if what is required is poorly described, but unfortunately I know very little about networks and their knowledge. But let's get down to facts. In an industrial machine control application, I have inserted a server, a TCP/IP server based on JSON messages, which allows the connection of several clients at the same time and enables motor movement commands to be executed or information to be retrieved from the system. A client programme connects to the server and from then on can do anything with the device it has connected to. At this point, security problems arise, especially for the operator standing at the machine, since a malicious client intruding into the network could trigger dangerous operations for the operator standing near the machine and unaware that someone unauthorised has taken control of it remotely. Now I have been asked to add a security layer, but as a complete ignoramus on the subject, I deal mainly with compilers of languages and UI environments and not with networks, I was wondering how to add a system of certification and authorisation of the client to the server connection. For the client I use python while the server is done with Indy 10 using TIdTCPServer. Thank you in advance for any suggestions and help. Best regards Silverio
  6. https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Indy say... The RAD Studio CHM help of the Indy components is not provided when pressing the F1 button. However, RAD Studio provides a third-party help. Click Help > Third-Party Help > Indy Library Help to acces the Indy third-party offline help. But its not available here? How to link the indy help here?
  7. I am trying to connect with web-browser to Indy HTTP server runing on I have read many tutorials and some of them are interesting, like: 1. https://mikejustin.wordpress.com/2019/06/14/how-to-lets-encrypt-certificates-with-indy-http-server/ 2. https://synaptica.info/en/2016/09/21/build-your-own-https-server-with-delphi/ I have created self signed certificates with help of this example tutorial: https://github.com/glenkleidon/DelphiCertAuth As a passphrase for testing I used "123456". After that I have installed newly generated file root_cert.crt in Trusted Root CA in Windows (using "WinKey+R" and certmgr.msc) In my code I have set: ... // create IOHandler for OpenSSL IdServerIOHandlerSSLOpenSSL1.SSLOptions.CertFile := 'mycomputerCertificate.pem'; IdServerIOHandlerSSLOpenSSL1.SSLOptions.KeyFile := 'mycomputerPrivateKey.pem'; IdServerIOHandlerSSLOpenSSL1.SSLOptions.RootCertFile := 'certificateAuthorityCertificate.pem'; IdServerIOHandlerSSLOpenSSL1.SSLOptions.Mode := sslmServer; IdServerIOHandlerSSLOpenSSL1.SSLOptions.SSLVersions := [sslvTLSv1, sslvTLSv1_1, sslvTLSv1_2]; ... procedure TForm1.IdServerIOHandlerSSLOpenSSL1GetPassword(var Password: string); begin Password := '123456'; end; ... procedure TForm1.IdHTTPServer1QuerySSLPort(APort: Word; var VUseSSL: Boolean); // This will not be called when the request is a HTTPS request // It facilitates the use of the server for testing via HTTP://localhost:8080 (i.e. without SSL) begin VUseSSL := (APort <> 8080); end; ... function TForm1.IdServerIOHandlerSSLOpenSSL1VerifyPeer(Certificate: TIdX509; AOk: Boolean; ADepth, AError: Integer): Boolean; begin if ADepth = 0 then Result := AOk else Result := True; end; ... Unfortunately, when I try to connect to I get an warning (check image). In application I can see messages and exception raised: IdServerIOHandlerSSLOpenSSL1StatusInfo(const AMsg: string); AMsg := SSL status: "before/accept initialization"; AMsg := SSL status: "before/accept initialization"; AMsg := SSL status: "SSLv3 read client hello A"; AMsg := SSL status: "SSLv3 write server hello A"; AMsg := SSL status: "SSLv3 write certificate A"; AMsg := SSL status: "SSLv3 write server done A"; AMsg := SSL status: "SSLv3 flush data"; AMsg := SSL status: "SSLv3 read client certificate A"; AMsg := SSL status: "SSLv3 read client key exchange A"; AMsg := SSL status: "error"; Stat Disconnected. IdHTTPServer1Exception(AContext: TIdContext; AException: Exception); EIdOSSLUnderlyingCryptoError: Error accepting connection with SSL. error:14094416:SSL routines:ssl3_read_bytes:sslv3 alert certificate unknown Am I doing something wrong or I am missing something? Why I can't connect to IP address without warning?
  8. Hello girls and boys, I'm try to do a little app to read, post and delete my message in a forum. In forum, i'm like a "Moderator" (but not ADMIN privilegies! then I can post, edit, delete message (mine or from others)! the forum use old tech on server: -- Server: Microsoft-IIS/7.5 -- X-Powered-By: ASP.NET -- Content-Type: text/html; charset=utf-8 -- IP: v4 The answer from Indy "GET" method is a text/html with all necessary to show a "HTML page", but I would just get some data in this page, not whole page! -- NONE API is available to help me! then, just read the page-response!!! ------------------------------------------------------------------- Im using Delphi 10 and "INDY" (TIdHttp class). ``` AHttp := TIdHTTP.Create(nil); try try AHTTP.ReadTimeout := 10000; AHTTP.Request.ContentType := 'application/json'; // maybe other configurations, I dont know? AHTTP.Request.CharSet := 'utf-8'; AHTTP.Request.Accept := '*/*'; AHTTP.Request.BasicAuthentication := true; AHTTP.Request.Username := 'my user name'; AHTTP.Request.Password := 'my password'; ... // method GET... Memo1.Text := Http.Get(HTTP_DEFAULTPAGE); // **GET it's OK for now!!!** ... I would like use others: POST, UPDATE and DELETE except // showmessage... end; finally AHTPP.Free; end ----------------------------------- > resulted GET: 1) for now, I can get the "response" without problem, but the resulted is a "HTML" text. 2) I would like that was in JSON to catch the "key:value", but unfortunatelly ... many tags HTML default ... 3) If was possible "JSON pair", it would help me! it's possible? 4) if not, then is there some way to better get the "message titles", at least? ------------------------------------- NOTE: in my IdHttp, I always send my "username + password" like above! I would like edit a message: ---------------------------- 1) I type the topicID 2) I get the messsage (posted) in "edit" mode 3) I change the message content 4) I post the new message content I would like "add" a message: ----------------------------- I would like delete the message: ---------------------------------------- 1) I type the topicID 2) I send a "delete" command 3) then, the message would be deleted NOTE: -- Currently, to Delete any messages, I have that: 1) Edit the message to see the "button DELETE" (there is not a button before "Edit message" 2) on source of the page I see: <input type="submit" name="del" class="button" value='....'> to delete the current message for now it's only this. thanks
  9. Milan Vydareny

    Indy, OpenSSL, DataSnap on Android

    The difficulties when trying to use OpenSSL filters on a DataSnap application with an Android client have numbers of entries in various forums that go back a number of years. To summarize the problem: 1. Create a DataSnap server that specifies a filter of RSA, in my case using Delphi 11 Update 2, running on a Windows server as a service. 2. Create a DataSnap client that is deployed to an Android device, in my case a Samsung SD-9 with an ARM64-v8a instruction set running Android 10 3. The client application crashes because it is unable to load a required OpenSSL module. I have tried a number of solutions that are discussed in various places but nothing works for me. My question is: Does anyone know of a RECENT posting that provides a workable solution to getting an RSA filter to work with DataSnap/Indy/Firemonkey on an Android device? My current understanding that the root cause of the problem is probably the failure of Indy to remain current with Google's erratic development habits, that has deprecated OpenSSL in favor of a branch called Boring. Has this been addressed effectively by anyone? If not, are there any plans to do so? Thanks in advance, Milan
  10. Hi, I get the 1409442E error that seems to come back in various situations. My Rad Studio version is 11 with update 1. The Indy version is I have tried TLS 1.0, 1.1 and 1.2 with no success. This error happens with sites using CloudFlare that may be detecting inconsistencies in the request (I have tested with various headers and Mozilla "versions" too). Any suggestions?
  11. danielKishlakov

    Indy OpenSSL static linking

    Hi) I need to statically link an existing Delphi app that uses Indy for networking with OpenSSL 1.0.2u. From the Indy code itself and some online resources I can see that Indy is capable of somehow statically linking with OpenSSL. But given Delphi can't link .lib files I try to figure out how do I build OpenSSL in a single object file so I can link it to the project. By now I've managed to compile it into a single obj by #including all the relevant source files into a single file. I made it compile by ifdefing certain structs in the code, got rid of macro redefinition warnings, solved the case insensitive linking issues and finally linked it to the project. But now I keep getting very weird errors, like e.g. call to CRYPTO_free yields access violation error and such. So obviously what I'm doing is more of a hack and it's probably wrong. I know that there has to be a way of doing it properly, could someone please direct me to the way it's supposed to be done. System: Windows 10 x64, RAD Studio Tokyo 10.2, I compile OpenSSL with MSVC for x64
  12. bazzer747

    Attachments to iPhones

    I send many emails out which have PDF attachments and usually via Outlook. However, I also provide the ability to send the same emails with the same PDF attachments via Indy. If the emails go to a Windows PC, or to an Android mobile they arrive correctly and the PDF attachment can be opened and viewed correctly. However, when these same emails go to iPhones the PDF shows as an attachment to the email but cannot be opened. Except if the iPhone is an old model and not at the latest version it can open PDFs from the email. Is this a known issue, or maybe a problem that Indy is aware of and can provide a solution?
  13. Hi, I have an application that takes CAD model data and slices it until layers then posts these layers as binary data using Indy and IdMultipartForm (AddFile()). I am usually not allowed to ask for help outside the company because of the proprietary information, but I will do my best at giving as much information as I can. Most of the time this just works but occasionally I get the following: System.SysGetMem(Opt.out) System._GetMem(???) System._NewUnicodeString(1) System._UStrFromPWCharLen('','sA',1) System._UStrFromWChar(???,'s') IdGlobalProtocols.FindFirstNotOf(#9' ','slice',5,1) IdCoderHeader.DecodeHeader('slice') IdCoderHeader.EncodeHeader('slice','','B','UTF-8') IdMultipartFormData.TIdFormDataField.FormatHeader IdMultipartFormData.TIdFormDataField.GetFieldSize IdMultipartFormData.TIdMultiPartFormDataStream.CalculateSize IdMultipartFormData.TIdMultiPartFormDataStream.IdSeek(???,???) IdGlobal.TIdBaseStream.Seek(???,???) System.Classes.TStream.GetSize The application receives the data from a queue, processes it with 100% success, and then the file is written locally to a a disk, then I do the following: // EDITED: took out "BAD SECTIONS" in attempt to get a better response. function TMain.SaveTheSolvedSlice(FileName: String): Boolean; var MimeType, Response: String; jsonVal: TJSonValue; Stat, Size: String; SendParams: TIdMultiPartFormDataStream; TOPLSliceFile: TStream; //HTTPSendFile: TIdHTTP; begin Result := False; Response := 'NULL'; HTTPSendFile.Request.Clear; HTTPSendFile.ReadTimeout := 2000; HTTPSendFile.ConnectTimeout := 9000; SendParams := TIdMultiPartFormDataStream.Create; Application.ProcessMessages; try if(FileExists('tmp\out\'+FileName)) then begin MimeType := 'application/octet-stream'; While(GetFileSizeInBytes('tmp\out\'+FileName) < MinSliceSizeFromUnsolvedFile+1) Do Delay(10); //Params.AddFormField('_token', 'Myfb9OqYgDBwDws3zTL9QOs492XWfNtGLftUdNsH'); SendParams.AddFile('slice', 'tmp\out\'+FileName, MimeType).ContentTransfer:='binary'; Sleep(10); SendParams.Position := 0; try While(GetFileSizeInBytes('tmp\out\'+FileName) > SendParams.Size) Do Delay(10); finally end; StatusUpdate(Console, 'Attempting to post file '+'tmp\out\'+FileName+' (size: '+SendParams.Size.ToString+' bytes)'); Delay(10); Response := HTTPSendFile.Post(STORAGE_OUT_REPO, SendParams); Delay(5); if(Response <> 'NULL') then begin //{"Slice":{"Status":"ACCEPTED","FileName":"1_Some_Job_Filename.slc","Size":1812}} jsonVal := TJSonObject.ParseJSONValue(Response); Stat := jsonVal.GetValue<String>('Slice.Status'); Size := jsonVal.GetValue<String>('Slice.Size'); jsonVal.Free; StatusUpdate(Console, 'Toasted Slice (size: '+Size+') '+Stat.ToLower); if(Stat = 'ACCEPTED') then Result := True else if(Stat = 'ERROR') then Result := False else Result := False; end; end finally SendParams.Free; Response := 'NULL'; HTTPSendFile.Response.Clear; end; end; I do the comparison of size of original file to that of the Params, which I expect to be slightly larger, to ensure the file has finished writing to disk, then loaded as a File in TIdMultiPartFormDataStream before attempting to post back to API. I suspect that I am trying to get the the size of the Params object too soon, is that likely? Also I use the Indy IdHTTP as object that I dragged into the form, which works better than declaring a new instance and freeing it every time I process a new file. Also note: the method GetFileSizeInBytes() is a method I created a few years back based on example code and always works.
  14. Hi, I am trying to figure out how to connect to office 365 through a proxy server. My application is working well if I connect without a proxy. But now the requirement changed and direct connection to internet is not allowed and I have to use a proxy. I can connect to office 365 from the production machine through proxy using a browser. So the connection setup is good. Now I need to change my application to use a proxy. So I looked around and found that I have to use TIdIOHandlerStack and IdConnectThroughHttpProxy1 to achieve it. But the help document is not that great. So looking for suggestions/help. My code looks like this. type TForm1 = class(TForm) Button1: TButton; IdIMAP: TIdIMAP4; IdConnectThroughHttpProxy1: TIdConnectThroughHttpProxy; IdIOHandlerStack1: TIdIOHandlerStack; Memo1: TMemo; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.Button1Click(Sender: TObject); begin IdIMAP.Username := 'test@test.com'; // outlook user name IdIMAP.Password := 'xxxxx'; // outlook user password IdIMAP.Port := 993; // outlook server port IdIMAP.Host := 'outlook.office365.com'; // outlook server IdIMAP.AuthType := iatUserPass; IdConnectThroughHttpProxy1.Host := 'x.x.x.x'; // Proxy server IdConnectThroughHttpProxy1.Port := 1234; // Proxy server port IdIOHandlerStack1.TransparentProxy := IdConnectThroughHttpProxy1; IdIMAP.IOHandler := IdIOHandlerStack1; try Memo1.Lines.Clear; Memo1.Lines.Add('Trying to connect to server...'); if not IdIMAP.Connected then begin if IdIMAP.Connect(false) then Memo1.Lines.Add('Connected to server') else Memo1.Lines.Add('NOT Connected to server') end; Memo1.Lines.Add('Trying to login to server...'); if not(IdIMAP.ConnectionState in [csAuthenticated, csSelected]) then IdIMAP.Login; Memo1.Lines.Add('Logged in to server'); except on E: Exception do begin Memo1.Lines.Add('Error while connecting: ' + E.Message); end; end; end; When I try this, I get "Error while connecting: 403 forbidden error" Thanks for your time, Kind regards, Soji.
  15. Hello, I have following code running in a thread when application starts. procedure TMainForm.SetSystemTime(); var Sntp: TIdSNTP; begin Sntp := TIdSNTP.Create(nil); try Sntp.Host := 'pool.ntp.org'; try Sntp.SyncTime(); except // eat exception, we are in thread end; finally Sntp.Free(); end; end; When there is no internet connection, thread above code runs is never terminated. I could not find some connection timeout setting for IdSNTP. Is there any other way to terminate Sntp.SyncTime() if it is not completed for a certain period of time like 10 seconds. There is a location with a corporate firewall (with some weird settings I believe) where check for an internet connection is true, but above code still hangs. Thanks & Regards, Ertan
  16. Using TIdHTTP is it possible to distinguish whether POST request has been received (processed) by the server and error occurred during transmission/read of response or whether request has not been received by the server at all? I feel like my planned solution has too many assumptions and is far from perfect. begin // create and set up TIdHTTP instance IdHTTP.HTTPOptions := IdHTTP.HTTPOptions + [hoNoProtocolErrorException, hoWantProtocolErrorContent]; try // prepare request IdHTTP.Post(API_END_POINT, RequestStream, ResponseStream); // check for response code and take actions except on E: EIdSocketError do begin // connection establishment error; the request was not processed end; on E: EIdConnectTimeout do begin // connection establishment error; the request was not processed end; on E: EIdReadTimeout do begin // response read error; the request was processed end; on E: EIdConnClosedGracefully do begin // response read error; the request was processed end; end; end;
  17. Chester Wilson

    Present status of Indy

    Does anyone know the current status of Indy? It is installed on 10.4 with no help files. Pulling (quite a large collection!) of supposed Indy Help files from the net gives .htm files which tell you nothing about the component you are after help on and/or say they have been redirected to a non-extant site; or .chm files which microsoft thinks are variant htm files and deals with inappropriately and unhelpfully. The Indy components can be put in a programme, but to use values (eg tIdPOP3.Authorise = adAuth (I can't remember the name the .pdf file eventually gave me) only fails to be able to define the value! It must be hidden somewhere in another Indy file.
  18. Dear All, I'm not versed in HTTP a SSL, so excuse-me if I make any confusion. A FMX project I'm working on demands GET, POST, FTP and email receiving and parsing capabilities. I started with a simple GET do a HTTPS server, so I dropped a TIdHTTP and a TIdSSLIOHandlerSocketOpenSSL components in a bare form and configured as follows: IdHTTP1.Request.ContentType := 'application/x-www-form-urlencoded'; IdHTTP1.IOHandler := IdSSLIOHandler; IdSSLIOHandler1.SSLOptions.SSLVersions := [sslvTLSv1, sslvTLSv1_1, sslvTLSv1_2]; IdSSLIOHandler1.SSLOptions.SSLMode apparently has no impact and then called IdHTTP1.Get(<https url>); In the application executable folder there are 3 files: libeay32.dll, ssleay32.dll and the application executable. The GET method raises an exception EIdHTTPProtocolException with the message 'HTTP/1.1 403 Forbidden', so I think I'm missing something very basic because the <https url> works in the browser, I just could't figure it out what that would be by going through both component's properties. Can you help me? Also, a long time ago I needed to use Indy in a project, and there were paid support available. Is there nowadays? As I said before, this line of work is not my strong suit and I don't want to be the PITA I'll probably be - I think I'll have many more questions. Best regards & TIA Carlos
  19. The Daraja HTTP Framework is a free open source library for Object Pascal (Free Pascal 3.0.4, Delphi 2009+), based on the stand-alone HTTP server component in Internet Direct (Indy). The 1.2.5 release improves UTF-8 support for Free Pascal by “using” the LazUTF8 unit. More information Home page: https://www.habarisoft.com/daraja_framework.html API documentation: https://www.habarisoft.com/daraja_framework/1.2/docs/api/ Getting started PDF: https://www.habarisoft.com/daraja_framework/1.2/docs/DarajaFrameworkGettingStarted.pdf GitHub: https://github.com/michaelJustin/daraja-framework Wiki: https://github.com/michaelJustin/daraja-framework/wiki