summaryrefslogtreecommitdiffstats
path: root/crypto/bn/bn_lib.c
diff options
context:
space:
mode:
authorUlf Möller <ulf@openssl.org>2000-02-05 14:17:32 +0000
committerUlf Möller <ulf@openssl.org>2000-02-05 14:17:32 +0000
commit9b141126d4b6f0636bc047e81b846c193ae26611 (patch)
treec8786c99bfccc8b9899cad5c3aa30f29ada5e1b9 /crypto/bn/bn_lib.c
parent7e708ebee066d0308a335579b546326220dc8317 (diff)
New functions BN_CTX_start(), BN_CTX_get(), BN_CTX_end() to access
temporary BIGNUMs. BN_CTX still uses a fixed number of BIGNUMs, but the BN_CTX implementation could now easily be changed.
Diffstat (limited to 'crypto/bn/bn_lib.c')
-rw-r--r--crypto/bn/bn_lib.c37
1 files changed, 0 insertions, 37 deletions
diff --git a/crypto/bn/bn_lib.c b/crypto/bn/bn_lib.c
index e734909968..8c62761d4c 100644
--- a/crypto/bn/bn_lib.c
+++ b/crypto/bn/bn_lib.c
@@ -304,43 +304,6 @@ BIGNUM *BN_new(void)
return(ret);
}
-
-BN_CTX *BN_CTX_new(void)
- {
- BN_CTX *ret;
-
- ret=(BN_CTX *)Malloc(sizeof(BN_CTX));
- if (ret == NULL)
- {
- BNerr(BN_F_BN_CTX_NEW,ERR_R_MALLOC_FAILURE);
- return(NULL);
- }
-
- BN_CTX_init(ret);
- ret->flags=BN_FLG_MALLOCED;
- return(ret);
- }
-
-void BN_CTX_init(BN_CTX *ctx)
- {
- memset(ctx,0,sizeof(BN_CTX));
- ctx->tos=0;
- ctx->flags=0;
- }
-
-void BN_CTX_free(BN_CTX *c)
- {
- int i;
-
- if(c == NULL)
- return;
-
- for (i=0; i<BN_CTX_NUM; i++)
- BN_clear_free(&(c->bn[i]));
- if (c->flags & BN_FLG_MALLOCED)
- Free(c);
- }
-
/* This is an internal function that should not be used in applications.
* It ensures that 'b' has enough room for a 'bits' bit number. It is
* mostly used by the various BIGNUM routines. If there is an error,