diff options
author | Richard Levitte <levitte@openssl.org> | 2000-06-02 00:19:21 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2000-06-02 00:19:21 +0200 |
commit | 26a3a48d65c7464b400ec1de439994d7f0d25fed (patch) | |
tree | 91abb7d351b174e58f60e5353b731b916eaf0c5c /crypto/x509/x509spki.c | |
parent | Use NO_FP_API. (diff) | |
download | openssl-26a3a48d65c7464b400ec1de439994d7f0d25fed.tar.xz openssl-26a3a48d65c7464b400ec1de439994d7f0d25fed.zip |
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/x509/x509spki.c')
-rw-r--r-- | crypto/x509/x509spki.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/crypto/x509/x509spki.c b/crypto/x509/x509spki.c index b35c3f92e7..fd0a534d88 100644 --- a/crypto/x509/x509spki.c +++ b/crypto/x509/x509spki.c @@ -82,7 +82,7 @@ NETSCAPE_SPKI * NETSCAPE_SPKI_b64_decode(const char *str, int len) int spki_len; NETSCAPE_SPKI *spki; if(len <= 0) len = strlen(str); - if (!(spki_der = Malloc(len + 1))) { + if (!(spki_der = OPENSSL_malloc(len + 1))) { X509err(X509_F_NETSCAPE_SPKI_B64_DECODE, ERR_R_MALLOC_FAILURE); return NULL; } @@ -90,12 +90,12 @@ NETSCAPE_SPKI * NETSCAPE_SPKI_b64_decode(const char *str, int len) if(spki_len < 0) { X509err(X509_F_NETSCAPE_SPKI_B64_DECODE, X509_R_BASE64_DECODE_ERROR); - Free(spki_der); + OPENSSL_free(spki_der); return NULL; } p = spki_der; spki = d2i_NETSCAPE_SPKI(NULL, &p, spki_len); - Free(spki_der); + OPENSSL_free(spki_der); return spki; } @@ -107,8 +107,8 @@ char * NETSCAPE_SPKI_b64_encode(NETSCAPE_SPKI *spki) char *b64_str; int der_len; der_len = i2d_NETSCAPE_SPKI(spki, NULL); - der_spki = Malloc(der_len); - b64_str = Malloc(der_len * 2); + der_spki = OPENSSL_malloc(der_len); + b64_str = OPENSSL_malloc(der_len * 2); if(!der_spki || !b64_str) { X509err(X509_F_NETSCAPE_SPKI_B64_ENCODE, ERR_R_MALLOC_FAILURE); return NULL; @@ -116,6 +116,6 @@ char * NETSCAPE_SPKI_b64_encode(NETSCAPE_SPKI *spki) p = der_spki; i2d_NETSCAPE_SPKI(spki, &p); EVP_EncodeBlock((unsigned char *)b64_str, der_spki, der_len); - Free(der_spki); + OPENSSL_free(der_spki); return b64_str; } |