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/e_chacha20poly1305.c | |
| 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/e_chacha20poly1305.c')
| -rw-r--r-- | src/lib/libcrypto/evp/e_chacha20poly1305.c | 4 |
1 files changed, 2 insertions, 2 deletions
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 |
