Hi,

just for the record, I found an ugly memory leak in the PemTool. 
Will fix it soon however here's a workaround:

The following call converts a Windows DER formated certificate to
an OpenSSL X509 structure: 
f_d2i_X509(nil, @pCertContext.pbCertEncoded, pCertContext.cbCertEncoded);

Instead of assigning it directly to TX509Base.X509 just assign it to a 
temporary variable of type PX509 and free the variable after assigning
it to TX509Base like:
var
  xTmp : PX509;
[..]
xTmp := f_d2i_X509(nil, @pCertContext.pbCertEncoded, 
pCertContext.cbCertEncoded);
if Assigned(xTmp) then
begin
    Cert.X509 := xTmp;
    f_X509_free(xTmp); // !!
[..]
 
--
Arno Garrels
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to