![]() The TLS protocol aims primarily to provide security, including privacy (confidentiality), integrity, and authenticity through the use of cryptography, such as the use of certificates, between two or more communicating computer applications. The protocol is widely used in applications such as email, instant messaging, and voice over IP, but its use in securing HTTPS remains the most publicly visible. I had a lot of trouble get the out-of-the-box version to POST correctly, but with the tip revision, and setting the options as I mentioned, its been a breeze.Transport Layer Security ( TLS) is a cryptographic protocol designed to provide communications security over a computer network. Parameters and Cookies are accessible by obviously named properties. To GET, simple call the Get() method on the TIdHTTP. I just know that this works with a wide range of webservers.įrom there it is dead easy. I found that other permutations these properties just did not work. In the SSL Options, set method to sslvSSLv23 and SSLVersions to. If the protocol is https:, then set the Handler property of the IdHTTP to the IdSSLIOHandlerSocketOpenSSL. Hook all the components up to each other at design-time, with the following change at run-time: If the protocol is plain http:, then disconnect the TIdSSLIOHandlerSocketOpenSSL component. I have 3 components on a datamodule or webmodule: I use the current tip revision of Indy, which is revision 4774, rather that the out-of-the-box version. I am using Delphi 2010, but it this probably works just as well on Delphi XE2 (not tested). Use the standard (latest) binaries for Indy 10. Retrieve all the data until the server closes the connectionĭon't forget to include the OpenSSL libraries libea圓2.sll and sslea圓2.dll in the same folder as your EXE on Windows. ![]() Here's some sample code that demonstrates retrieving a web page over SSL using the TCP component: procedure TForm1.Button1Click(Sender: TObject) ![]() Some web servers no longer support SSLv2, which Indy 9 defaults to. ![]() ![]() It's a good idea to enable the VerifyMode and use the OnVerifyPeer event on the socket component to verify the fingerprint on the server certificate in order to avoid man in the middle attacks.ĭepending on your version of Indy, you may need to set the SSLOptions Method to sslvTLSv1. Otherwise, set the TIdSSLIOHandlerSocketOpenSSL's SSLOptions.Mode to sslmClient, and you should be able to connect. Since you are using the client component, you only need to setup the certificates on the client if the server is going to authenticate the client's certificate. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |