summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorderaadt <>2014-06-09 22:22:20 +0000
committerderaadt <>2014-06-09 22:22:20 +0000
commite1b854f100e2e8f243d8afc553a6811b56a3ee4f (patch)
treef85432a1172e496ca11ff0ad40f2d3bf02d6a030 /src
parent750e585a6ddcca3ccd77433132702b50da9e30d9 (diff)
downloadopenbsd-e1b854f100e2e8f243d8afc553a6811b56a3ee4f.tar.gz
openbsd-e1b854f100e2e8f243d8afc553a6811b56a3ee4f.tar.bz2
openbsd-e1b854f100e2e8f243d8afc553a6811b56a3ee4f.zip
use memset instead of bzero
Diffstat (limited to 'src')
-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