EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Indy http post ssl

Also by EldoS: CallbackProcess
A component to control process creation and termination in Windows and .NET applications.
#22144
Posted: 10/24/2012 02:15:20
by medax (Standard support level)
Joined: 08/28/2012
Posts: 36

Good day,
I use Indy IdHTTP.Post via https (ssl).
Code
var
  IdHTTP: TIdHTTP;
  IdIOHandler: TElClientIndySSLIOHandlerSocket;
  MemoryCertStorage: TElMemoryCertStorage;
  ms: TMemoryStream;
begin
  // PFX certificate is loaded into MemoryCertStorage
  ...
  IdIOHandler := TElClientIndySSLIOHandlerSocket.Create(nil);
  IdIOHandler.ClientCertStorage := MemoryCertStorage;
  ...
  IdHTTP.IOHandler := IdIOHandler;
  ...
  XmlRes := HTTP.Post('https://...', ms);

On my computer it works.
But on another computer on last line "XmlRes := HTTP.Post('https:..." occurs error "EElASN1ReadError with message 'Invalid size'".
On both computers use the same PFX certificate.

Thank you, Martin
#22145
Posted: 10/24/2012 02:18:47
by Vsevolod Ievgiienko (EldoS Corp.)

Thank you for contacting us.

Its an internal error handled by SecureBlackbox code. Try to run the application outside the IDE - it should disappear.
#22146
Posted: 10/24/2012 02:19:49
by Eugene Mayevski (EldoS Corp.)

The error happens during loading of some certificate, but it's not possible to definitely say what certificate is being loaded (the one sent by the server or one of certificates in Windows certificate storage etc).

Also does the error happen in IDE or outside of IDE? Such exceptions must be normally caught internally.


Sincerely yours
Eugene Mayevski
#22153
Posted: 10/24/2012 04:27:27
by medax (Standard support level)
Joined: 08/28/2012
Posts: 36

Thank you, outside Delphi it works.
Martin

Reply

Statistics

Topic viewed 940 times

Number of guests: 3, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!