#include <cryptolib_init.h>
#include <openssl/evp.h>

int cryptolib_init()
{
    int ret = 1;
#ifndef BORING_SSL
    #if (defined(OWN_ALLOCATOR) || defined(CUSTOM_LIBC))

    ret = libc_init();
    if(!ret)
    {
        return 0;
    }
    #endif

    #ifdef DO_NOT_USE_MD_RAND
        /* use pd_rand as source of entropy input */
        drbg_ossl_init(pd_rand, NULL, 0);
    #endif

    OPENSSL_add_all_algorithms_noconf();
#endif /* BORING_SSL */
    ret = 1;
    return ret;
}
