Flag to disable automatic copying of contexts.
[openssl.git] / crypto / evp / e_des3.c
index dd44ac325ce1e6f48d2bea4b1d06eaa1bd463d9a..eb4c472244c70c4e0e2f3944f40fe4fd5f85ac5a 100644 (file)
@@ -121,7 +121,7 @@ static int des_ede_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
 static int des_ede_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
                              const unsigned char *in, size_t inl)
 {
-       if (inl>=EVP_MAXCHUNK)
+       while (inl>=EVP_MAXCHUNK)
                {
                DES_ede3_ofb64_encrypt(in, out, (long)EVP_MAXCHUNK,
                               &data(ctx)->ks1, &data(ctx)->ks2, &data(ctx)->ks3,
@@ -160,7 +160,7 @@ static int des_ede_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
                return 1;
                }
 
-       if (inl>=EVP_MAXCHUNK)
+       while (inl>=EVP_MAXCHUNK)
                {
                DES_ede3_cbc_encrypt(in, out, (long)EVP_MAXCHUNK,
                             &dat->ks1, &dat->ks2, &dat->ks3,
@@ -179,7 +179,7 @@ static int des_ede_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
 static int des_ede_cfb64_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
                              const unsigned char *in, size_t inl)
 {
-       if (inl>=EVP_MAXCHUNK)
+       while (inl>=EVP_MAXCHUNK)
                {
                DES_ede3_cfb64_encrypt(in, out, (long)EVP_MAXCHUNK, 
                               &data(ctx)->ks1, &data(ctx)->ks2, &data(ctx)->ks3,