Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Delphi 7 and Indy 9.0 Error Connecting SSL
#1
Wink 
I'm using TIdHTTP component to execute GET command, resulting in above error message:

Code:
Request.ContentType := 'text/html';
Request.CustomHeader.Values['Authorization'] := 'Basic '+ TIdEncoderMIME.EncodeString(SPIAKey)+':'TIdEncoderMIME.EncodeString(SAPISecret);

TIdSSLIOHHandlerSocket
Method - sslvSSLv2
Can someone help me on this?

I try to upgraded to Indy version 10 but I cannot find TIdHTTP, what should I do?
Reply
#2
(02-24-2020, 05:00 AM)jerltlim Wrote: I'm using TIdHTTP component to execute GET command, resulting in above error message

I already answered your exact same question 4 days ago on StackOverflow:

Delphi 7 and Indy 9.0 Error Connecting SSL

That is 2 days before you posted it here.  Why are you asking the same question again, in a different forum, without regard to an answer already given to you earlier?  That is just bad forum etiquette.

For the benefits of other readers, I'll copy my StackOverflow answer here:

rlebeau Wrote:NOBODY uses SSL v2.0 or SSL v3.0 anymore, as they are no longer secure. You need to use TLS v1.0 at a minimum (1). Indy 9's TIdSSLIOHandlerSocket component supports up to TLS v1.0 max. Set the SSLOptions.Method property to sslvTLSv1 for that.

1: be aware that websites have slowly been dropping support for TLS v1.0, and major webbrowser vendors are dropping support for TLS v1.0 and v1.1 later this year.


To use TLS v1.1 and higher, you need to upgrade to Indy 10, where TIdSSLIOHandlerSocket has been renamed to TIdSSLIOHandlerSocketOpenSSL, and its SSLOptions.Method property has been deprecated in favor of a new SSLOptions.SSLVersions property, which will allow you to enable TLS v1.0, v1.1, and v1.2 at the same time.



On a side note, you do not need to use the TIdHTTP.Request.CustomHeader property to use Basic authentication. TIdHTTP has built-in support for Basic. Simply set the TIdHTTP.Request.BasicAuthentication property to True and then use the TIdHTTP.Request.Username and TIdHTTP.Request.Password properties:

Code:
Request.ContentType := 'text/html';
Request.BasicAuthentication := True;
Request.Username := SPIAKey;
Request.Password := SAPISecret;

This works in both Indy 9 and 10.

(02-24-2020, 05:00 AM)jerltlim Wrote: I try to upgraded to Indy version 10 but I cannot find TIdHTTP, what should I do?

Indy 10 has TIdHTTP, so if you can't find it then either you are looking in the wrong place for it, or you did not install Indy 10 correctly to begin with.

Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)