Core dump on DSA_free -- libssl.so.1.0.0

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Core dump on DSA_free -- libssl.so.1.0.0

OpenSSL - User mailing list
Thanks for the help,


DSA *pDSA = d2i_DSA_PUBKEY(NULL, (const unsigned char **) &pKey, dwKeySize);
bool bRet = false;
if (pDSA)
{
bRet = DSA_verify(0, signature, 20, (BYTE *) pFile, dwSize, (DSA *) pDSA) == 1 ? true : false;
DSA_free(pDSA); 
}

Jason

--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Core dump on DSA_free -- libssl.so.1.0.0

OpenSSL - User mailing list
> 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

--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Core dump on DSA_free -- libssl.so.1.0.0

OpenSSL - User mailing list
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 <[hidden email]> 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



--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Core dump on DSA_free -- libssl.so.1.0.0

OpenSSL - User mailing list

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: [hidden email] Twitter: RichSalz

 

From: Jason Qian [mailto:[hidden email]]
Sent: Friday, August 11, 2017 3:14 PM
To: Salz, Rich <[hidden email]>
Cc: [hidden email]
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 <[hidden email]> 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

 


--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
Loading...