[PATCH] crypto/x509-utils: don't double set errp

marcandre.lureau@redhat.com posted 1 patch 3 weeks, 5 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260831120926.2809313-1-marcandre.lureau@redhat.com
Maintainers: "Daniel P. Berrangé" <berrange@redhat.com>
crypto/x509-utils.c | 1 -
1 file changed, 1 deletion(-)
[PATCH] crypto/x509-utils: don't double set errp
Posted by marcandre.lureau@redhat.com 3 weeks, 5 days ago
From: Marc-André Lureau <marcandre.lureau@redhat.com>

qcrypto_x509_get_ecc_curve() already sets errp on failure.

Fixes: e8317c4c9f68 ("crypto/x509-utils: Add helper functions for DIAG 320 subcode 2")
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 crypto/x509-utils.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/crypto/x509-utils.c b/crypto/x509-utils.c
index e4767f98384e..34cbfca26bff 100644
--- a/crypto/x509-utils.c
+++ b/crypto/x509-utils.c
@@ -325,7 +325,6 @@ int qcrypto_x509_check_ecc_curve_p521(uint8_t *cert, size_t size, Error **errp)
 
     curve_id = qcrypto_x509_get_ecc_curve(cert, size, errp);
     if (curve_id == -1) {
-        error_setg(errp, "Failed to get ECC curve");
         return -1;
     }
 
-- 
2.55.0.543.g5ebe2ebe4ea8


Re: [PATCH] crypto/x509-utils: don't double set errp
Posted by Daniel P. Berrangé 3 weeks, 4 days ago
On Mon, Aug 31, 2026 at 04:09:26PM +0400, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> qcrypto_x509_get_ecc_curve() already sets errp on failure.
> 
> Fixes: e8317c4c9f68 ("crypto/x509-utils: Add helper functions for DIAG 320 subcode 2")
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  crypto/x509-utils.c | 1 -
>  1 file changed, 1 deletion(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>

and queued

With regards,
Daniel
-- 
|: https://berrange.com       ~~        https://hachyderm.io/@berrange :|
|: https://libvirt.org          ~~          https://entangle-photo.org :|
|: https://pixelfed.art/berrange   ~~    https://fstop138.berrange.com :|


Re: [PATCH] crypto/x509-utils: don't double set errp
Posted by Zhuoying Cai 3 weeks, 5 days ago
Reviewed-by: Zhuoying Cai <zycai@linux.ibm.com>

On 8/31/26 8:09 AM, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> qcrypto_x509_get_ecc_curve() already sets errp on failure.
> 
> Fixes: e8317c4c9f68 ("crypto/x509-utils: Add helper functions for DIAG 320 subcode 2")
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  crypto/x509-utils.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/crypto/x509-utils.c b/crypto/x509-utils.c
> index e4767f98384e..34cbfca26bff 100644
> --- a/crypto/x509-utils.c
> +++ b/crypto/x509-utils.c
> @@ -325,7 +325,6 @@ int qcrypto_x509_check_ecc_curve_p521(uint8_t *cert, size_t size, Error **errp)
>  
>      curve_id = qcrypto_x509_get_ecc_curve(cert, size, errp);
>      if (curve_id == -1) {
> -        error_setg(errp, "Failed to get ECC curve");
>          return -1;
>      }
>