diff options
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; | 
