TScSslClient.IsSecure failure
Posted: Wed 21 Mar 2018 15:53
According to the documentation at https://www.devart.com/sbridge/docs/ssl ... ration.htm, the last step in setting up a secure client connection is "To make the connection secure, turn the IsSecure property to True."
In my code, I am doing this in the component's AfterConnect event.
However, when MySslClient.IsSecure is called, we are getting an alert from THandshakeLayer.ProcessAlert:
"The other side has sent a failure alert: [40]"
Why would this happen when we try to set IsSecure?
Thanks!
In my code, I am doing this in the component's AfterConnect event.
Code: Select all
MySslClient.IsSecure := True;
try
RequestResult := MySslClient.WriteBuffer(ReqBuff, 0, Length(ReqBuff));
SetLength(RespBuff, 1024*1024);
Len := MySslClient.ReadBuffer(RespBuff, 0, Length(RespBuff));
if Len = 0 then
Raise('Zero length response from host');
SetLength(RespBuff, Len);
ResponseStr := ResponseStr + AsciiBytesToStr(RespBuff);
ShowMessage(ResponseStr);
finally
MySslClient.Disconnect;
end;
"The other side has sent a failure alert: [40]"
Why would this happen when we try to set IsSecure?
Thanks!