All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] crypto/openssl: fix that remove unneeded check
@ 2017-01-09 14:45 Piotr Azarewicz
  2017-01-10  8:38 ` Chen, Zhaoyan
  2017-01-10  9:28 ` Declan Doherty
  0 siblings, 2 replies; 4+ messages in thread
From: Piotr Azarewicz @ 2017-01-09 14:45 UTC (permalink / raw)
  To: pablo.de.lara.guarch, dev; +Cc: stable

EVP_CIPHER_CTX_set_padding() function always returns 1, so the check is
unneeded.

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 |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 832ea1d..312154a 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -522,8 +522,7 @@
 	if (EVP_DecryptInit_ex(ctx, algo, NULL, key, iv) <= 0)
 		goto process_cipher_decrypt_err;
 
-	if (EVP_CIPHER_CTX_set_padding(ctx, 0) <= 0)
-		goto process_cipher_decrypt_err;
+	EVP_CIPHER_CTX_set_padding(ctx, 0);
 
 	if (EVP_DecryptUpdate(ctx, dst, &dstlen, src, srclen) <= 0)
 		goto process_cipher_decrypt_err;
-- 
1.7.9.5

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

* Re: [PATCH] crypto/openssl: fix that remove unneeded check
  2017-01-09 14:45 [PATCH] crypto/openssl: fix that remove unneeded check Piotr Azarewicz
@ 2017-01-10  8:38 ` Chen, Zhaoyan
  2017-01-10  9:28 ` Declan Doherty
  1 sibling, 0 replies; 4+ messages in thread
From: Chen, Zhaoyan @ 2017-01-10  8:38 UTC (permalink / raw)
  To: dev; +Cc: Azarewicz, PiotrX T, De Lara Guarch, Pablo

Tested-by: Zhaoyan Chen <zhaoyan.chen@intel.com>

- Checked patch: success 
- Apply patch: success
- Compilation: success

Tested basic openssl_pmd tests and check the extra bytes. Passed.

Thanks

/Joey

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Piotr Azarewicz
> Sent: Monday, January 9, 2017 10:46 PM
> To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; dev@dpdk.org
> Cc: stable@dpdk.org
> Subject: [dpdk-dev] [PATCH] crypto/openssl: fix that remove unneeded
> check
> 
> EVP_CIPHER_CTX_set_padding() function always returns 1, so the check is
> unneeded.
> 
> 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 |    3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c
> b/drivers/crypto/openssl/rte_openssl_pmd.c
> index 832ea1d..312154a 100644
> --- a/drivers/crypto/openssl/rte_openssl_pmd.c
> +++ b/drivers/crypto/openssl/rte_openssl_pmd.c
> @@ -522,8 +522,7 @@
>  	if (EVP_DecryptInit_ex(ctx, algo, NULL, key, iv) <= 0)
>  		goto process_cipher_decrypt_err;
> 
> -	if (EVP_CIPHER_CTX_set_padding(ctx, 0) <= 0)
> -		goto process_cipher_decrypt_err;
> +	EVP_CIPHER_CTX_set_padding(ctx, 0);
> 
>  	if (EVP_DecryptUpdate(ctx, dst, &dstlen, src, srclen) <= 0)
>  		goto process_cipher_decrypt_err;
> --
> 1.7.9.5

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

* Re: [PATCH] crypto/openssl: fix that remove unneeded check
  2017-01-09 14:45 [PATCH] crypto/openssl: fix that remove unneeded check Piotr Azarewicz
  2017-01-10  8:38 ` Chen, Zhaoyan
@ 2017-01-10  9:28 ` Declan Doherty
  2017-01-10 13:53   ` De Lara Guarch, Pablo
  1 sibling, 1 reply; 4+ messages in thread
From: Declan Doherty @ 2017-01-10  9:28 UTC (permalink / raw)
  To: Piotr Azarewicz, pablo.de.lara.guarch, dev; +Cc: stable

On 09/01/17 14:45, Piotr Azarewicz wrote:
> EVP_CIPHER_CTX_set_padding() function always returns 1, so the check is
> unneeded.
>
> 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 |    3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
> index 832ea1d..312154a 100644
> --- a/drivers/crypto/openssl/rte_openssl_pmd.c
> +++ b/drivers/crypto/openssl/rte_openssl_pmd.c
> @@ -522,8 +522,7 @@
>  	if (EVP_DecryptInit_ex(ctx, algo, NULL, key, iv) <= 0)
>  		goto process_cipher_decrypt_err;
>
> -	if (EVP_CIPHER_CTX_set_padding(ctx, 0) <= 0)
> -		goto process_cipher_decrypt_err;
> +	EVP_CIPHER_CTX_set_padding(ctx, 0);
>
>  	if (EVP_DecryptUpdate(ctx, dst, &dstlen, src, srclen) <= 0)
>  		goto process_cipher_decrypt_err;
>

Acked-by: Declan Doherty <declan.doherty@intel.com>

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

* Re: [PATCH] crypto/openssl: fix that remove unneeded check
  2017-01-10  9:28 ` Declan Doherty
@ 2017-01-10 13:53   ` De Lara Guarch, Pablo
  0 siblings, 0 replies; 4+ messages in thread
From: De Lara Guarch, Pablo @ 2017-01-10 13:53 UTC (permalink / raw)
  To: Doherty, Declan, Azarewicz, PiotrX T, dev; +Cc: stable



> -----Original Message-----
> From: Doherty, Declan
> Sent: Tuesday, January 10, 2017 9:28 AM
> To: Azarewicz, PiotrX T; De Lara Guarch, Pablo; dev@dpdk.org
> Cc: stable@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] crypto/openssl: fix that remove unneeded
> check
> 
> On 09/01/17 14:45, Piotr Azarewicz wrote:
> > EVP_CIPHER_CTX_set_padding() function always returns 1, so the check is
> > unneeded.
> >
> > 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 |    3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c
> b/drivers/crypto/openssl/rte_openssl_pmd.c
> > index 832ea1d..312154a 100644
> > --- a/drivers/crypto/openssl/rte_openssl_pmd.c
> > +++ b/drivers/crypto/openssl/rte_openssl_pmd.c
> > @@ -522,8 +522,7 @@
> >  	if (EVP_DecryptInit_ex(ctx, algo, NULL, key, iv) <= 0)
> >  		goto process_cipher_decrypt_err;
> >
> > -	if (EVP_CIPHER_CTX_set_padding(ctx, 0) <= 0)
> > -		goto process_cipher_decrypt_err;
> > +	EVP_CIPHER_CTX_set_padding(ctx, 0);
> >
> >  	if (EVP_DecryptUpdate(ctx, dst, &dstlen, src, srclen) <= 0)
> >  		goto process_cipher_decrypt_err;
> >
> 
> Acked-by: Declan Doherty <declan.doherty@intel.com>

Applied to dpdk-next-crypto.
Thanks,

Pablo

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

end of thread, other threads:[~2017-01-10 13:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-09 14:45 [PATCH] crypto/openssl: fix that remove unneeded check Piotr Azarewicz
2017-01-10  8:38 ` Chen, Zhaoyan
2017-01-10  9:28 ` Declan Doherty
2017-01-10 13:53   ` De Lara Guarch, Pablo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.