diff options
author | Richard Levitte <levitte@openssl.org> | 2000-06-01 22:19:21 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2000-06-01 22:19:21 +0000 |
commit | 26a3a48d65c7464b400ec1de439994d7f0d25fed (patch) | |
tree | 91abb7d351b174e58f60e5353b731b916eaf0c5c /crypto/rsa/rsa_eay.c | |
parent | de42b6a7a82be33d2976ab605e74d7bc95b71447 (diff) |
There have been a number of complaints from a number of sources that names
like Malloc, Realloc and especially Free conflict with already existing names
on some operating systems or other packages. That is reason enough to change
the names of the OpenSSL memory allocation macros to something that has a
better chance of being unique, like prepending them with OPENSSL_.
This change includes all the name changes needed throughout all C files.
Diffstat (limited to 'crypto/rsa/rsa_eay.c')
-rw-r--r-- | crypto/rsa/rsa_eay.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/crypto/rsa/rsa_eay.c b/crypto/rsa/rsa_eay.c index b7d2460754..618b5bd595 100644 --- a/crypto/rsa/rsa_eay.c +++ b/crypto/rsa/rsa_eay.c @@ -106,7 +106,7 @@ static int RSA_eay_public_encrypt(int flen, unsigned char *from, BN_init(&ret); if ((ctx=BN_CTX_new()) == NULL) goto err; num=BN_num_bytes(rsa->n); - if ((buf=(unsigned char *)Malloc(num)) == NULL) + if ((buf=(unsigned char *)OPENSSL_malloc(num)) == NULL) { RSAerr(RSA_F_RSA_EAY_PUBLIC_ENCRYPT,ERR_R_MALLOC_FAILURE); goto err; @@ -161,7 +161,7 @@ err: if (buf != NULL) { memset(buf,0,num); - Free(buf); + OPENSSL_free(buf); } return(r); } @@ -179,7 +179,7 @@ static int RSA_eay_private_encrypt(int flen, unsigned char *from, if ((ctx=BN_CTX_new()) == NULL) goto err; num=BN_num_bytes(rsa->n); - if ((buf=(unsigned char *)Malloc(num)) == NULL) + if ((buf=(unsigned char *)OPENSSL_malloc(num)) == NULL) { RSAerr(RSA_F_RSA_EAY_PRIVATE_ENCRYPT,ERR_R_MALLOC_FAILURE); goto err; @@ -237,7 +237,7 @@ err: if (buf != NULL) { memset(buf,0,num); - Free(buf); + OPENSSL_free(buf); } return(r); } @@ -258,7 +258,7 @@ static int RSA_eay_private_decrypt(int flen, unsigned char *from, num=BN_num_bytes(rsa->n); - if ((buf=(unsigned char *)Malloc(num)) == NULL) + if ((buf=(unsigned char *)OPENSSL_malloc(num)) == NULL) { RSAerr(RSA_F_RSA_EAY_PRIVATE_DECRYPT,ERR_R_MALLOC_FAILURE); goto err; @@ -330,7 +330,7 @@ err: if (buf != NULL) { memset(buf,0,num); - Free(buf); + OPENSSL_free(buf); } return(r); } @@ -350,7 +350,7 @@ static int RSA_eay_public_decrypt(int flen, unsigned char *from, if (ctx == NULL) goto err; num=BN_num_bytes(rsa->n); - buf=(unsigned char *)Malloc(num); + buf=(unsigned char *)OPENSSL_malloc(num); if (buf == NULL) { RSAerr(RSA_F_RSA_EAY_PUBLIC_DECRYPT,ERR_R_MALLOC_FAILURE); @@ -402,7 +402,7 @@ err: if (buf != NULL) { memset(buf,0,num); - Free(buf); + OPENSSL_free(buf); } return(r); } |