DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] crypto/openssl: fix extra bytes being written at end of data
@ 2016-12-07 10:45 Piotr Azarewicz
  2016-12-16 10:30 ` De Lara Guarch, Pablo
  0 siblings, 1 reply; 3+ messages in thread
From: Piotr Azarewicz @ 2016-12-07 10:45 UTC (permalink / raw)
  To: pablo.de.lara.guarch; +Cc: dev, stable

Extra bytes are being written at end of data while process standard
openssl cipher encryption. This behaviour is unexpected.

This patch disable the padding feature in openssl library, which is
causing the problem.

Fixes: d61f70b4c918 ("crypto/libcrypto: add driver for OpenSSL library")

Signed-off-by: Piotr Azarewicz <piotrx.t.azarewicz@intel.com>
---
 drivers/crypto/openssl/rte_openssl_pmd.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 5f8fa33..832ea1d 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -496,6 +496,8 @@
 	if (EVP_EncryptInit_ex(ctx, algo, NULL, key, iv) <= 0)
 		goto process_cipher_encrypt_err;
 
+	EVP_CIPHER_CTX_set_padding(ctx, 0);
+
 	if (EVP_EncryptUpdate(ctx, dst, &dstlen, src, srclen) <= 0)
 		goto process_cipher_encrypt_err;
 
-- 
1.7.9.5

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] crypto/openssl: fix extra bytes being written at end of data
  2016-12-07 10:45 [dpdk-dev] [PATCH] crypto/openssl: fix extra bytes being written at end of data Piotr Azarewicz
@ 2016-12-16 10:30 ` De Lara Guarch, Pablo
  2016-12-16 15:12   ` De Lara Guarch, Pablo
  0 siblings, 1 reply; 3+ messages in thread
From: De Lara Guarch, Pablo @ 2016-12-16 10:30 UTC (permalink / raw)
  To: Azarewicz, PiotrX T; +Cc: dev, stable



> -----Original Message-----
> From: Azarewicz, PiotrX T
> Sent: Wednesday, December 07, 2016 10:46 AM
> To: De Lara Guarch, Pablo
> Cc: dev@dpdk.org; stable@dpdk.org
> Subject: [PATCH] crypto/openssl: fix extra bytes being written at end of
> data
> 
> Extra bytes are being written at end of data while process standard
> openssl cipher encryption. This behaviour is unexpected.
> 
> This patch disable the padding feature in openssl library, which is
> causing the problem.
> 
> Fixes: d61f70b4c918 ("crypto/libcrypto: add driver for OpenSSL library")
> 
> Signed-off-by: Piotr Azarewicz <piotrx.t.azarewicz@intel.com>

Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] crypto/openssl: fix extra bytes being written at end of data
  2016-12-16 10:30 ` De Lara Guarch, Pablo
@ 2016-12-16 15:12   ` De Lara Guarch, Pablo
  0 siblings, 0 replies; 3+ messages in thread
From: De Lara Guarch, Pablo @ 2016-12-16 15:12 UTC (permalink / raw)
  To: De Lara Guarch, Pablo, Azarewicz, PiotrX T; +Cc: dev, stable



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of De Lara Guarch,
> Pablo
> Sent: Friday, December 16, 2016 10:30 AM
> To: Azarewicz, PiotrX T
> Cc: dev@dpdk.org; stable@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] crypto/openssl: fix extra bytes being
> written at end of data
> 
> 
> 
> > -----Original Message-----
> > From: Azarewicz, PiotrX T
> > Sent: Wednesday, December 07, 2016 10:46 AM
> > To: De Lara Guarch, Pablo
> > Cc: dev@dpdk.org; stable@dpdk.org
> > Subject: [PATCH] crypto/openssl: fix extra bytes being written at end of
> > data
> >
> > Extra bytes are being written at end of data while process standard
> > openssl cipher encryption. This behaviour is unexpected.
> >
> > This patch disable the padding feature in openssl library, which is
> > causing the problem.
> >
> > Fixes: d61f70b4c918 ("crypto/libcrypto: add driver for OpenSSL library")
> >
> > Signed-off-by: Piotr Azarewicz <piotrx.t.azarewicz@intel.com>
> 
> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

Applied to dpdk-next-crypto.
Thanks,

Pablo

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-12-16 15:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-07 10:45 [dpdk-dev] [PATCH] crypto/openssl: fix extra bytes being written at end of data Piotr Azarewicz
2016-12-16 10:30 ` De Lara Guarch, Pablo
2016-12-16 15:12   ` De Lara Guarch, Pablo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).