summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorderaadt <>2014-06-09 22:22:20 +0000
committerderaadt <>2014-06-09 22:22:20 +0000
commit504d483047bcc780e5ca4d60e109b88c40ab74ea (patch)
treef85432a1172e496ca11ff0ad40f2d3bf02d6a030 /src/lib
parent1bc3a8dec0d82a0fc13cc58a0c3337c8570f39df (diff)
downloadopenbsd-504d483047bcc780e5ca4d60e109b88c40ab74ea.tar.gz
openbsd-504d483047bcc780e5ca4d60e109b88c40ab74ea.tar.bz2
openbsd-504d483047bcc780e5ca4d60e109b88c40ab74ea.zip
use memset instead of bzero
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