]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - crypto/evp/evp_lib.c
Replumbing: make the oneshot proider cipher function like the others
[thirdparty/openssl.git] / crypto / evp / evp_lib.c
index 189c953266d9eb522dba95a040128462bbbf44be..34b938281efddc9f8471eac42329f501571f0756 100644 (file)
@@ -232,8 +232,14 @@ int EVP_Cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
                const unsigned char *in, unsigned int inl)
 {
     if (ctx->cipher->prov != NULL) {
+        size_t outl = 0;         /* ignored */
+        int blocksize = EVP_CIPHER_CTX_block_size(ctx);
+
         if (ctx->cipher->ccipher != NULL)
-            return ctx->cipher->ccipher(ctx->provctx, out, in, (size_t)inl);
+            return
+                ctx->cipher->ccipher(ctx->provctx, out, &outl,
+                                     inl + (blocksize == 1 ? 0 : blocksize),
+                                     in, (size_t)inl);
         return 0;
     }