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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux