summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/engine/hw_cryptodev.c4
-rw-r--r--src/lib/libssl/src/crypto/engine/hw_cryptodev.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libcrypto/engine/hw_cryptodev.c b/src/lib/libcrypto/engine/hw_cryptodev.c
index 7700adf971..c2a144f4eb 100644
--- a/src/lib/libcrypto/engine/hw_cryptodev.c
+++ b/src/lib/libcrypto/engine/hw_cryptodev.c
@@ -743,7 +743,7 @@ xcrypt_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
743 int i; 743 int i;
744#endif 744#endif
745 745
746 bzero(k, sizeof *k); 746 memset(k, 0, sizeof *k);
747 if (enc) 747 if (enc)
748 AES_set_encrypt_key(key, ctx->key_len * 8, k); 748 AES_set_encrypt_key(key, ctx->key_len * 8, k);
749 else 749 else
@@ -765,7 +765,7 @@ xcrypt_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
765static int 765static int
766xcrypt_cleanup(EVP_CIPHER_CTX *ctx) 766xcrypt_cleanup(EVP_CIPHER_CTX *ctx)
767{ 767{
768 bzero(ctx->cipher_data, ctx->cipher->ctx_size); 768 memset(ctx->cipher_data, 0, ctx->cipher->ctx_size);
769 return (1); 769 return (1);
770} 770}
771 771
diff --git a/src/lib/libssl/src/crypto/engine/hw_cryptodev.c b/src/lib/libssl/src/crypto/engine/hw_cryptodev.c
index 7700adf971..c2a144f4eb 100644
--- a/src/lib/libssl/src/crypto/engine/hw_cryptodev.c
+++ b/src/lib/libssl/src/crypto/engine/hw_cryptodev.c
@@ -743,7 +743,7 @@ xcrypt_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
743 int i; 743 int i;
744#endif 744#endif
745 745
746 bzero(k, sizeof *k); 746 memset(k, 0, sizeof *k);
747 if (enc) 747 if (enc)
748 AES_set_encrypt_key(key, ctx->key_len * 8, k); 748 AES_set_encrypt_key(key, ctx->key_len * 8, k);
749 else 749 else
@@ -765,7 +765,7 @@ xcrypt_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
765static int 765static int
766xcrypt_cleanup(EVP_CIPHER_CTX *ctx) 766xcrypt_cleanup(EVP_CIPHER_CTX *ctx)
767{ 767{
768 bzero(ctx->cipher_data, ctx->cipher->ctx_size); 768 memset(ctx->cipher_data, 0, ctx->cipher->ctx_size);
769 return (1); 769 return (1);
770} 770}
771 771