summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/pkcs12/p12_utl.c
diff options
context:
space:
mode:
authorbeck <>2014-04-17 13:37:50 +0000
committerbeck <>2014-04-17 13:37:50 +0000
commitbddb7c686e3d1aeb156722adc64b6c35ae720f87 (patch)
tree7595a93a27385c367802aa17ecf20f96551cf14d /src/lib/libcrypto/pkcs12/p12_utl.c
parentecec66222d758996a4ff2671ca5026d9ede5ef76 (diff)
downloadopenbsd-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/pkcs12/p12_utl.c')
-rw-r--r--src/lib/libcrypto/pkcs12/p12_utl.c4
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;