<div dir="ltr">Hi,<div><br></div><div>we are upgrading our codebase to openssl 1.1.1g from openssl 1.0.2k</div><div>Previously, all the ctx objects are allocated memory using "calloc"</div><div><div>typedef struct CryptWrapMDContext_t<br>{<br>#ifdef OPENSSL<br> EVP_MD_CTX evpMDCtx;<br>......<br> struct CryptWrapMDContext_t *pNext;<br>}<br></div><div><br></div><div>Allocation : return ((CryptWrapMDContext_t *) calloc (1, sizeof (CryptWrapMDContext_t)));</div><div><br></div></div><div>Now that in openssl 1.1.1 , as objects are opaque , we have to use pointers (*) & new() . </div><div>typedef struct CryptWrapMDContext_t<br>{<br>#ifdef OPENSSL<br> EVP_MD_CTX *evpMDCtx;</div><div>......<br> struct CryptWrapMDContext_t *pNext;<br>}<br>CryptWrapMDContext_t;<br></div><div> So Allocation becomes : </div><div> CryptWrapMDContext_t *pTemp;</div><div> pTemp = ((CryptWrapMDContext_t *) calloc (1, sizeof (CryptWrapMDContext_t)));<br></div><div> pTemp->
evpMDCtx = EVP_MD_CTX_new();</div><div> return pTemp;</div><div><br></div><div>But , we are seeing crash upon the call of EVP_MD_CTX_new(); (new is returning null)</div><div>So, are there any probable reasons why the new() has failed ??</div><div><br></div><div>Regards,</div><div>prud.</div><div><br></div><div><br></div></div>