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/pkcs12/p12_utl.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/pkcs12/p12_utl.c')
| -rw-r--r-- | src/lib/libcrypto/pkcs12/p12_utl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libcrypto/pkcs12/p12_utl.c b/src/lib/libcrypto/pkcs12/p12_utl.c index 59c6f453f6..9c58036169 100644 --- a/src/lib/libcrypto/pkcs12/p12_utl.c +++ b/src/lib/libcrypto/pkcs12/p12_utl.c | |||
| @@ -68,7 +68,7 @@ unsigned char *OPENSSL_asc2uni(const char *asc, int asclen, unsigned char **uni, | |||
| 68 | unsigned char *unitmp; | 68 | unsigned char *unitmp; |
| 69 | if (asclen == -1) asclen = strlen(asc); | 69 | if (asclen == -1) asclen = strlen(asc); |
| 70 | ulen = asclen*2 + 2; | 70 | ulen = asclen*2 + 2; |
| 71 | if (!(unitmp = OPENSSL_malloc(ulen))) return NULL; | 71 | if (!(unitmp = malloc(ulen))) return NULL; |
| 72 | for (i = 0; i < ulen - 2; i+=2) { | 72 | for (i = 0; i < ulen - 2; i+=2) { |
| 73 | unitmp[i] = 0; | 73 | unitmp[i] = 0; |
| 74 | unitmp[i + 1] = asc[i>>1]; | 74 | unitmp[i + 1] = asc[i>>1]; |
| @@ -89,7 +89,7 @@ char *OPENSSL_uni2asc(unsigned char *uni, int unilen) | |||
| 89 | /* If no terminating zero allow for one */ | 89 | /* If no terminating zero allow for one */ |
| 90 | if (!unilen || uni[unilen - 1]) asclen++; | 90 | if (!unilen || uni[unilen - 1]) asclen++; |
| 91 | uni++; | 91 | uni++; |
| 92 | if (!(asctmp = OPENSSL_malloc(asclen))) return NULL; | 92 | if (!(asctmp = malloc(asclen))) return NULL; |
| 93 | for (i = 0; i < unilen; i+=2) asctmp[i>>1] = uni[i]; | 93 | for (i = 0; i < unilen; i+=2) asctmp[i>>1] = uni[i]; |
| 94 | asctmp[asclen - 1] = 0; | 94 | asctmp[asclen - 1] = 0; |
| 95 | return asctmp; | 95 | return asctmp; |
