summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2014-06-09 22:22:20 +0000
committerderaadt <deraadt@openbsd.org>2014-06-09 22:22:20 +0000
commit09a953cff48a1b87c17b7257b1e0507791f96a21 (patch)
treea9d628f77d45b8d45d339654aa27e4ed8c6894f8
parentdo not include dso.h where it is not needed; ok miod (diff)
downloadwireguard-openbsd-09a953cff48a1b87c17b7257b1e0507791f96a21.tar.xz
wireguard-openbsd-09a953cff48a1b87c17b7257b1e0507791f96a21.zip
use memset instead of bzero
-rw-r--r--lib/libcrypto/engine/hw_cryptodev.c4
-rw-r--r--lib/libssl/src/crypto/engine/hw_cryptodev.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/libcrypto/engine/hw_cryptodev.c b/lib/libcrypto/engine/hw_cryptodev.c
index 7700adf971d..c2a144f4eb6 100644
--- a/lib/libcrypto/engine/hw_cryptodev.c
+++ b/lib/libcrypto/engine/hw_cryptodev.c
@@ -743,7 +743,7 @@ xcrypt_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
int i;
#endif
- bzero(k, sizeof *k);
+ memset(k, 0, sizeof *k);
if (enc)
AES_set_encrypt_key(key, ctx->key_len * 8, k);
else
@@ -765,7 +765,7 @@ xcrypt_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
static int
xcrypt_cleanup(EVP_CIPHER_CTX *ctx)
{
- bzero(ctx->cipher_data, ctx->cipher->ctx_size);
+ memset(ctx->cipher_data, 0, ctx->cipher->ctx_size);
return (1);
}
diff --git a/lib/libssl/src/crypto/engine/hw_cryptodev.c b/lib/libssl/src/crypto/engine/hw_cryptodev.c
index 7700adf971d..c2a144f4eb6 100644
--- a/lib/libssl/src/crypto/engine/hw_cryptodev.c
+++ b/lib/libssl/src/crypto/engine/hw_cryptodev.c
@@ -743,7 +743,7 @@ xcrypt_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
int i;
#endif
- bzero(k, sizeof *k);
+ memset(k, 0, sizeof *k);
if (enc)
AES_set_encrypt_key(key, ctx->key_len * 8, k);
else
@@ -765,7 +765,7 @@ xcrypt_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
static int
xcrypt_cleanup(EVP_CIPHER_CTX *ctx)
{
- bzero(ctx->cipher_data, ctx->cipher->ctx_size);
+ memset(ctx->cipher_data, 0, ctx->cipher->ctx_size);
return (1);
}