diff options
| author | beck <> | 2014-05-22 21:56:02 +0000 |
|---|---|---|
| committer | beck <> | 2014-05-22 21:56:02 +0000 |
| commit | c2ed0bb5f435dc8317e8f7e2d64d1eb5efa1975a (patch) | |
| tree | ad01380ef0f2b2de9b4b3d5c76c4e3dcd7fdccdd /src/lib/libcrypto/evp | |
| parent | 31181df3ca3b68e1419bc9a97e4aee92a5f91f73 (diff) | |
| download | openbsd-c2ed0bb5f435dc8317e8f7e2d64d1eb5efa1975a.tar.gz openbsd-c2ed0bb5f435dc8317e8f7e2d64d1eb5efa1975a.tar.bz2 openbsd-c2ed0bb5f435dc8317e8f7e2d64d1eb5efa1975a.zip | |
Convert OPENSSL_malloc stuff back to intrinsics, a few were missed
as new stuff was brought in.
ok miod@
Diffstat (limited to 'src/lib/libcrypto/evp')
| -rw-r--r-- | src/lib/libcrypto/evp/e_aes.c | 4 | ||||
| -rw-r--r-- | src/lib/libcrypto/evp/e_chacha20poly1305.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libcrypto/evp/e_aes.c b/src/lib/libcrypto/evp/e_aes.c index 4da61b8f62..2e81495e5f 100644 --- a/src/lib/libcrypto/evp/e_aes.c +++ b/src/lib/libcrypto/evp/e_aes.c | |||
| @@ -1294,7 +1294,7 @@ aead_aes_gcm_init(EVP_AEAD_CTX *ctx, const unsigned char *key, size_t key_len, | |||
| 1294 | return 0; | 1294 | return 0; |
| 1295 | } | 1295 | } |
| 1296 | 1296 | ||
| 1297 | gcm_ctx = OPENSSL_malloc(sizeof(struct aead_aes_gcm_ctx)); | 1297 | gcm_ctx = malloc(sizeof(struct aead_aes_gcm_ctx)); |
| 1298 | if (gcm_ctx == NULL) | 1298 | if (gcm_ctx == NULL) |
| 1299 | return 0; | 1299 | return 0; |
| 1300 | 1300 | ||
| @@ -1321,7 +1321,7 @@ aead_aes_gcm_cleanup(EVP_AEAD_CTX *ctx) | |||
| 1321 | { | 1321 | { |
| 1322 | struct aead_aes_gcm_ctx *gcm_ctx = ctx->aead_state; | 1322 | struct aead_aes_gcm_ctx *gcm_ctx = ctx->aead_state; |
| 1323 | 1323 | ||
| 1324 | OPENSSL_free(gcm_ctx); | 1324 | free(gcm_ctx); |
| 1325 | } | 1325 | } |
| 1326 | 1326 | ||
| 1327 | static ssize_t | 1327 | static ssize_t |
diff --git a/src/lib/libcrypto/evp/e_chacha20poly1305.c b/src/lib/libcrypto/evp/e_chacha20poly1305.c index 75ff7f209c..7e32668b7f 100644 --- a/src/lib/libcrypto/evp/e_chacha20poly1305.c +++ b/src/lib/libcrypto/evp/e_chacha20poly1305.c | |||
| @@ -85,7 +85,7 @@ aead_chacha20_poly1305_init(EVP_AEAD_CTX *ctx, const unsigned char *key, | |||
| 85 | if (key_len != sizeof(c20_ctx->key)) | 85 | if (key_len != sizeof(c20_ctx->key)) |
| 86 | return 0; /* internal error - EVP_AEAD_CTX_init should catch this. */ | 86 | return 0; /* internal error - EVP_AEAD_CTX_init should catch this. */ |
| 87 | 87 | ||
| 88 | c20_ctx = OPENSSL_malloc(sizeof(struct aead_chacha20_poly1305_ctx)); | 88 | c20_ctx = malloc(sizeof(struct aead_chacha20_poly1305_ctx)); |
| 89 | if (c20_ctx == NULL) | 89 | if (c20_ctx == NULL) |
| 90 | return 0; | 90 | return 0; |
| 91 | 91 | ||
| @@ -101,7 +101,7 @@ aead_chacha20_poly1305_cleanup(EVP_AEAD_CTX *ctx) | |||
| 101 | { | 101 | { |
| 102 | struct aead_chacha20_poly1305_ctx *c20_ctx = ctx->aead_state; | 102 | struct aead_chacha20_poly1305_ctx *c20_ctx = ctx->aead_state; |
| 103 | OPENSSL_cleanse(c20_ctx->key, sizeof(c20_ctx->key)); | 103 | OPENSSL_cleanse(c20_ctx->key, sizeof(c20_ctx->key)); |
| 104 | OPENSSL_free(c20_ctx); | 104 | free(c20_ctx); |
| 105 | } | 105 | } |
| 106 | 106 | ||
| 107 | static void | 107 | static void |
