DDL Indy forcing TLS requests 1.2

Asked

Viewed 745 times

1

I am trying to refactor the code the code of the DLL Gerencianet Payments for the DLL to make requests only by the protocol TLS 1.2. Reference: uGerenciaNetIndy.pas

I am compiling the DLL through Delphi Embarcadeiro 10.1 update 2 Berlin with Indy updated in version 10.

Searching the net, I could notice that when the DLL can not communicate by the latest protocol, it goes back to the oldest, in this case 1.0, it is right that?

I could also notice the existence of updated windows Dlls that support the protocol (libeay32, ssleay32), I saw on a link of the forum itself: link

Should I think about using a different component and changing the encoding, or should I try to consider that the failure is due to the absence of the DLL’s? I confess that I have many doubts about the use of Indy with Delphi.

I would be grateful if someone could assist me with a north for this question.

  • You are setting the property IOHandler of the component?

  • 1

    Dear @Juniormoreira, that’s right. Setei a propriedade do IOHandler e baixei as DLLs atualizadas do OPENSSL:

Result.IOHandler := TIdSSLIOHandlerSocketOpenSSL.Create(nil);
TIdSSLIOHandlerSocketOpenSSL(Result.IOHandler).SSLOptions.SSLVersions := [sslvTLSv1_2];

Funcionou perfeitamente. Thank you ;)

1 answer

0

If endpoint is an https it is no use just setting the properties and adding the DLL.

It is necessary to inform the component responsible for managing SSL. Necessary to inform the property IOHandler of TIdHTTP

  • I set the component that inherits the Tidhttp attributes, so it worked fine. I showed only one snippet of the file code in GIT.

  • Ok. I answered only to formalize and help in future searches for the same problem. Please mark the answer as correct!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.