NAME
BNCTXnew, BNCTXinit, BNCTXfree - allocate and free BNCTX
structuresSYNOPSIS
#include
BNCTX *BNCTXnew(void); void BNCTXinit(BNCTX *c); void BNCTXfree(BNCTX *c);DESCRIPTION
A BBNNCCTTXX is a structure that holds BBIIGGNNUUMM temporary variables used by library functions. Since dynamic memory allocation to create BBIIGGNNUUMMs is rather expensive when used in conjunction with repeated subroutine calls, the BBNNCCTTXX structure is used. BNCTXnew() allocates and initializes a BBNNCCTTXX structure. BNCTXinit() initializes an existing uninitialized BBNNCCTTXX. BNCTXfree() frees the components of the BBNNCCTTXX, and if it was created by BNCTXnew(), also the structure itself. If BNCTXstart(3) has been used on the BBNNCCTTXX, BNCTXend(3) must be called before the BBNNCCTTXX may be freed by BNCTXfree().RETURN VALUES
BNCTXnew() returns a pointer to the BBNNCCTTXX. If the allocation fails, it returns NNUULLLL and sets an error code that can be obtained by ERRgeterror(3). BNCTXinit() and BNCTXfree() have no return values.SEE ALSO
bn(3), ERRgeterror(3), BNadd(3), BNCTXstart(3) HISTORY BNCTXnew() and BNCTXfree() are available in all versions on SSLeay and OpenSSL. BNCTXinit() was added in SSLeay 0.9.1b.0.9.7l 2002-09-25 BNCTXnew(3)