Beispiel #1
0
BN_CTX *BN_CTX_new(void)
{
    BN_CTX *ret;

    if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL) {
        BNerr(BN_F_BN_CTX_NEW, ERR_R_MALLOC_FAILURE);
        return NULL;
    }
    /* Initialise the structure */
    BN_POOL_init(&ret->pool);
    BN_STACK_init(&ret->stack);
    return ret;
}
Beispiel #2
0
BN_CTX *BN_CTX_new(void) {
  BN_CTX *ret = OPENSSL_malloc(sizeof(BN_CTX));
  if (!ret) {
    OPENSSL_PUT_ERROR(BN, ERR_R_MALLOC_FAILURE);
    return NULL;
  }

  /* Initialise the structure */
  BN_POOL_init(&ret->pool);
  BN_STACK_init(&ret->stack);
  ret->used = 0;
  ret->err_stack = 0;
  ret->too_many = 0;
  return ret;
}
Beispiel #3
0
BN_CTX *BN_CTX_new(void)
	{
	BN_CTX *ret = clBnAlloc("BN_CTX_new",sizeof(BN_CTX));	/* pcg */
	if(!ret)
		{
		BNerr(BN_F_BN_CTX_NEW,ERR_R_MALLOC_FAILURE);
		return NULL;
		}
	memset( ret, 0, sizeof( BN_CTX ) );		/* pcg */
	/* Initialise the structure */
	BN_POOL_init(&ret->pool);
	BN_STACK_init(&ret->stack);
	ret->used = 0;
	ret->err_stack = 0;
	ret->too_many = 0;
	return ret;
	}