diff options
| author | beck <> | 2014-04-17 13:37:50 +0000 | 
|---|---|---|
| committer | beck <> | 2014-04-17 13:37:50 +0000 | 
| commit | 6aa5f85bab6ba5f9189fbc3d53a12e0f6dae48dd (patch) | |
| tree | 7595a93a27385c367802aa17ecf20f96551cf14d /src/lib/libcrypto/rsa/rsa_lib.c | |
| parent | 4d13fb9c7b5ac7311d7031173c21ab0121388413 (diff) | |
| download | openbsd-6aa5f85bab6ba5f9189fbc3d53a12e0f6dae48dd.tar.gz openbsd-6aa5f85bab6ba5f9189fbc3d53a12e0f6dae48dd.tar.bz2 openbsd-6aa5f85bab6ba5f9189fbc3d53a12e0f6dae48dd.zip | |
Change library to use intrinsic memory allocation functions instead of
OPENSSL_foo wrappers. This changes:
OPENSSL_malloc->malloc
OPENSSL_free->free
OPENSSL_relloc->realloc
OPENSSL_freeFunc->free
Diffstat (limited to 'src/lib/libcrypto/rsa/rsa_lib.c')
| -rw-r--r-- | src/lib/libcrypto/rsa/rsa_lib.c | 12 | 
1 files changed, 6 insertions, 6 deletions
| diff --git a/src/lib/libcrypto/rsa/rsa_lib.c b/src/lib/libcrypto/rsa/rsa_lib.c index 9e3f7dafcd..e99a3627dc 100644 --- a/src/lib/libcrypto/rsa/rsa_lib.c +++ b/src/lib/libcrypto/rsa/rsa_lib.c | |||
| @@ -125,7 +125,7 @@ RSA *RSA_new_method(ENGINE *engine) | |||
| 125 | { | 125 | { | 
| 126 | RSA *ret; | 126 | RSA *ret; | 
| 127 | 127 | ||
| 128 | ret=(RSA *)OPENSSL_malloc(sizeof(RSA)); | 128 | ret=(RSA *)malloc(sizeof(RSA)); | 
| 129 | if (ret == NULL) | 129 | if (ret == NULL) | 
| 130 | { | 130 | { | 
| 131 | RSAerr(RSA_F_RSA_NEW_METHOD,ERR_R_MALLOC_FAILURE); | 131 | RSAerr(RSA_F_RSA_NEW_METHOD,ERR_R_MALLOC_FAILURE); | 
| @@ -139,7 +139,7 @@ RSA *RSA_new_method(ENGINE *engine) | |||
| 139 | if (!ENGINE_init(engine)) | 139 | if (!ENGINE_init(engine)) | 
| 140 | { | 140 | { | 
| 141 | RSAerr(RSA_F_RSA_NEW_METHOD, ERR_R_ENGINE_LIB); | 141 | RSAerr(RSA_F_RSA_NEW_METHOD, ERR_R_ENGINE_LIB); | 
| 142 | OPENSSL_free(ret); | 142 | free(ret); | 
| 143 | return NULL; | 143 | return NULL; | 
| 144 | } | 144 | } | 
| 145 | ret->engine = engine; | 145 | ret->engine = engine; | 
| @@ -154,7 +154,7 @@ RSA *RSA_new_method(ENGINE *engine) | |||
| 154 | RSAerr(RSA_F_RSA_NEW_METHOD, | 154 | RSAerr(RSA_F_RSA_NEW_METHOD, | 
| 155 | ERR_R_ENGINE_LIB); | 155 | ERR_R_ENGINE_LIB); | 
| 156 | ENGINE_finish(ret->engine); | 156 | ENGINE_finish(ret->engine); | 
| 157 | OPENSSL_free(ret); | 157 | free(ret); | 
| 158 | return NULL; | 158 | return NULL; | 
| 159 | } | 159 | } | 
| 160 | } | 160 | } | 
| @@ -184,7 +184,7 @@ RSA *RSA_new_method(ENGINE *engine) | |||
| 184 | if (ret->engine) | 184 | if (ret->engine) | 
| 185 | ENGINE_finish(ret->engine); | 185 | ENGINE_finish(ret->engine); | 
| 186 | #endif | 186 | #endif | 
| 187 | OPENSSL_free(ret); | 187 | free(ret); | 
| 188 | return(NULL); | 188 | return(NULL); | 
| 189 | } | 189 | } | 
| 190 | 190 | ||
| @@ -195,7 +195,7 @@ RSA *RSA_new_method(ENGINE *engine) | |||
| 195 | ENGINE_finish(ret->engine); | 195 | ENGINE_finish(ret->engine); | 
| 196 | #endif | 196 | #endif | 
| 197 | CRYPTO_free_ex_data(CRYPTO_EX_INDEX_RSA, ret, &ret->ex_data); | 197 | CRYPTO_free_ex_data(CRYPTO_EX_INDEX_RSA, ret, &ret->ex_data); | 
| 198 | OPENSSL_free(ret); | 198 | free(ret); | 
| 199 | ret=NULL; | 199 | ret=NULL; | 
| 200 | } | 200 | } | 
| 201 | return(ret); | 201 | return(ret); | 
| @@ -240,7 +240,7 @@ void RSA_free(RSA *r) | |||
| 240 | if (r->blinding != NULL) BN_BLINDING_free(r->blinding); | 240 | if (r->blinding != NULL) BN_BLINDING_free(r->blinding); | 
| 241 | if (r->mt_blinding != NULL) BN_BLINDING_free(r->mt_blinding); | 241 | if (r->mt_blinding != NULL) BN_BLINDING_free(r->mt_blinding); | 
| 242 | if (r->bignum_data != NULL) OPENSSL_free_locked(r->bignum_data); | 242 | if (r->bignum_data != NULL) OPENSSL_free_locked(r->bignum_data); | 
| 243 | OPENSSL_free(r); | 243 | free(r); | 
| 244 | } | 244 | } | 
| 245 | 245 | ||
| 246 | int RSA_up_ref(RSA *r) | 246 | int RSA_up_ref(RSA *r) | 
