Using certificate and private key from Windows cert store with OpenSSL Using certificate and private key from Windows cert store with OpenSSL windows windows

Using certificate and private key from Windows cert store with OpenSSL


It seems to me the most reasonable reasons you would get these errors include:

  1. Wrong version of OpenSSL dlls (libeay32 ssleay.dll) or error in declaring SSL wrappers (in this case you might need an Indy Version 10 upgrade).

  2. Having already freed the block of memory you're passing into the DLL, as per Ken's comment.

  3. Some subtle pointer dereferencing bug in the code you posted. A call to CopyMemory might be missing a level of pointer indirection via "PointerVariableName^" instead of just "PointerVariableName". Read up on "untyped var parameters and pointers in pascal" if you're unclear.