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/hmac/hm_pmeth.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/hmac/hm_pmeth.c')
-rw-r--r-- | src/lib/libcrypto/hmac/hm_pmeth.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libcrypto/hmac/hm_pmeth.c b/src/lib/libcrypto/hmac/hm_pmeth.c index 0daa44511d..f1c67329d0 100644 --- a/src/lib/libcrypto/hmac/hm_pmeth.c +++ b/src/lib/libcrypto/hmac/hm_pmeth.c | |||
@@ -75,7 +75,7 @@ typedef struct | |||
75 | static int pkey_hmac_init(EVP_PKEY_CTX *ctx) | 75 | static int pkey_hmac_init(EVP_PKEY_CTX *ctx) |
76 | { | 76 | { |
77 | HMAC_PKEY_CTX *hctx; | 77 | HMAC_PKEY_CTX *hctx; |
78 | hctx = OPENSSL_malloc(sizeof(HMAC_PKEY_CTX)); | 78 | hctx = malloc(sizeof(HMAC_PKEY_CTX)); |
79 | if (!hctx) | 79 | if (!hctx) |
80 | return 0; | 80 | return 0; |
81 | hctx->md = NULL; | 81 | hctx->md = NULL; |
@@ -119,10 +119,10 @@ static void pkey_hmac_cleanup(EVP_PKEY_CTX *ctx) | |||
119 | { | 119 | { |
120 | if (hctx->ktmp.length) | 120 | if (hctx->ktmp.length) |
121 | OPENSSL_cleanse(hctx->ktmp.data, hctx->ktmp.length); | 121 | OPENSSL_cleanse(hctx->ktmp.data, hctx->ktmp.length); |
122 | OPENSSL_free(hctx->ktmp.data); | 122 | free(hctx->ktmp.data); |
123 | hctx->ktmp.data = NULL; | 123 | hctx->ktmp.data = NULL; |
124 | } | 124 | } |
125 | OPENSSL_free(hctx); | 125 | free(hctx); |
126 | } | 126 | } |
127 | 127 | ||
128 | static int pkey_hmac_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey) | 128 | static int pkey_hmac_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey) |
@@ -229,7 +229,7 @@ static int pkey_hmac_ctrl_str(EVP_PKEY_CTX *ctx, | |||
229 | if (!key) | 229 | if (!key) |
230 | return 0; | 230 | return 0; |
231 | r = pkey_hmac_ctrl(ctx, EVP_PKEY_CTRL_SET_MAC_KEY, keylen, key); | 231 | r = pkey_hmac_ctrl(ctx, EVP_PKEY_CTRL_SET_MAC_KEY, keylen, key); |
232 | OPENSSL_free(key); | 232 | free(key); |
233 | return r; | 233 | return r; |
234 | } | 234 | } |
235 | return -2; | 235 | return -2; |