[openssl-users] Core dump on DSA_free -- libssl.so.1.0.0

Salz, Rich rsalz at akamai.com
Fri Aug 11 19:42:12 UTC 2017


Please read what I wrote.

The d2i functions *modify the pointer they are given.*  You have to give them a temporary copy.

--
Senior Architect, Akamai Technologies
Member, OpenSSL Dev Team
IM: richsalz at jabber.at Twitter: RichSalz

From: Jason Qian [mailto:jqian at tibco.com]
Sent: Friday, August 11, 2017 3:14 PM
To: Salz, Rich <rsalz at akamai.com>
Cc: openssl-users at openssl.org
Subject: Re: [openssl-users] Core dump on DSA_free -- libssl.so.1.0.0

Thanks for look into this,

void * pKey = LockResource(hHandle);

The code works most of the time, only occasionally generates exception and Not sure why on DSA_free(pDSA);




On Fri, Aug 11, 2017 at 2:57 PM, Salz, Rich <rsalz at akamai.com<mailto:rsalz at akamai.com>> wrote:
> DSA *pDSA = d2i_DSA_PUBKEY(NULL, (const unsigned char **) &pKey, dwKeySize);

Where and how is pKey set?  Not that the manpage says it's incremented to point *past* the object, so you need something like
        unsigned char data = .....whatever your data source is .....
        unsigned char *pKey = data
and then use &pKey in your call

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mta.openssl.org/pipermail/openssl-users/attachments/20170811/2d539506/attachment.html>


More information about the openssl-users mailing list