diff options
Diffstat (limited to 'providers')
4 files changed, 5 insertions, 0 deletions
diff --git a/providers/implementations/ciphers/cipher_aes_ocb.c b/providers/implementations/ciphers/cipher_aes_ocb.c index 2f30b7ffdf..230b353c50 100644 --- a/providers/implementations/ciphers/cipher_aes_ocb.c +++ b/providers/implementations/ciphers/cipher_aes_ocb.c @@ -103,6 +103,8 @@ static int aes_ocb_init(void *vctx, const unsigned char *key, size_t keylen, { PROV_AES_OCB_CTX *ctx = (PROV_AES_OCB_CTX *)vctx; + ctx->aad_buf_len = 0; + ctx->data_buf_len = 0; ctx->base.enc = enc; if (iv != NULL) { diff --git a/providers/implementations/ciphers/cipher_des.c b/providers/implementations/ciphers/cipher_des.c index 9a7c13902f..4974234efd 100644 --- a/providers/implementations/ciphers/cipher_des.c +++ b/providers/implementations/ciphers/cipher_des.c @@ -68,6 +68,7 @@ static int des_init(void *vctx, const unsigned char *key, size_t keylen, PROV_CIPHER_CTX *ctx = (PROV_CIPHER_CTX *)vctx; ctx->num = 0; + ctx->bufsz = 0; ctx->enc = enc; if (iv != NULL) { diff --git a/providers/implementations/ciphers/cipher_tdes_common.c b/providers/implementations/ciphers/cipher_tdes_common.c index d2379f741b..a226e2aac4 100644 --- a/providers/implementations/ciphers/cipher_tdes_common.c +++ b/providers/implementations/ciphers/cipher_tdes_common.c @@ -58,6 +58,7 @@ static int tdes_init(void *vctx, const unsigned char *key, size_t keylen, PROV_CIPHER_CTX *ctx = (PROV_CIPHER_CTX *)vctx; ctx->num = 0; + ctx->bufsz = 0; ctx->enc = enc; if (iv != NULL) { diff --git a/providers/implementations/ciphers/ciphercommon.c b/providers/implementations/ciphers/ciphercommon.c index a3ebd3f7e7..2d119a7b39 100644 --- a/providers/implementations/ciphers/ciphercommon.c +++ b/providers/implementations/ciphers/ciphercommon.c @@ -150,6 +150,7 @@ static int cipher_generic_init_internal(PROV_CIPHER_CTX *ctx, int enc) { ctx->num = 0; + ctx->bufsz = 0; ctx->updated = 0; ctx->enc = enc ? 1 : 0; |