Failure of ..new() for CTX objects in openssl 1.1.1g

prudvi raj rajprudvi98 at gmail.com
Mon Aug 24 10:18:23 UTC 2020


Hi,

we are upgrading our codebase to openssl 1.1.1g from openssl 1.0.2k
Previously, all the ctx objects are allocated memory using "calloc"
typedef struct CryptWrapMDContext_t
{
#ifdef OPENSSL
    EVP_MD_CTX  evpMDCtx;
......
    struct CryptWrapMDContext_t *pNext;
}

Allocation :  return ((CryptWrapMDContext_t *)  calloc (1, sizeof
(CryptWrapMDContext_t)));

Now that in openssl 1.1.1 , as objects are opaque , we have to use pointers
(*) & new()  .
typedef struct CryptWrapMDContext_t
{
#ifdef OPENSSL
    EVP_MD_CTX *evpMDCtx;
......
    struct CryptWrapMDContext_t *pNext;
}
CryptWrapMDContext_t;
 So Allocation becomes :
       CryptWrapMDContext_t *pTemp;
        pTemp = ((CryptWrapMDContext_t *) calloc (1, sizeof
(CryptWrapMDContext_t)));
         pTemp-> evpMDCtx = EVP_MD_CTX_new();
        return pTemp;

But , we are seeing crash upon the call of  EVP_MD_CTX_new();  (new is
returning null)
So, are there any probable reasons why the new() has failed ??

Regards,
prud.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mta.openssl.org/pipermail/openssl-users/attachments/20200824/0a5e7c20/attachment.html>


More information about the openssl-users mailing list