EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Indy http post ssl

Also by EldoS: CallbackDisk
Create virtual disks backed by memory or custom location, expose disk images as disks and more.
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).
  IdIOHandler: TElClientIndySSLIOHandlerSocket;
  MemoryCertStorage: TElMemoryCertStorage;
  ms: TMemoryStream;
  // 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
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.
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
Posted: 10/24/2012 04:27:27
by medax (Standard support level)
Joined: 08/28/2012
Posts: 36

Thank you, outside Delphi it works.



Topic viewed 1008 times

Number of guests: 1, 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!