diff options
author | beck <> | 2014-04-17 13:37:50 +0000 |
---|---|---|
committer | beck <> | 2014-04-17 13:37:50 +0000 |
commit | bddb7c686e3d1aeb156722adc64b6c35ae720f87 (patch) | |
tree | 7595a93a27385c367802aa17ecf20f96551cf14d /src/lib/libcrypto/rsa/rsa_lib.c | |
parent | ecec66222d758996a4ff2671ca5026d9ede5ef76 (diff) | |
download | openbsd-bddb7c686e3d1aeb156722adc64b6c35ae720f87.tar.gz openbsd-bddb7c686e3d1aeb156722adc64b6c35ae720f87.tar.bz2 openbsd-bddb7c686e3d1aeb156722adc64b6c35ae720f87.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) |