From 3832147944209ece35557234102548413ef1b460 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Mon, 22 Dec 2025 16:13:21 +0000 Subject: [PATCH] [crypto] Fix identification of non-wrapped elliptic curve identifiers Signed-off-by: Michael Brown --- src/crypto/asn1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/crypto/asn1.c b/src/crypto/asn1.c index 21029f6f6..dd0b954e1 100644 --- a/src/crypto/asn1.c +++ b/src/crypto/asn1.c @@ -667,8 +667,8 @@ int asn1_curve_algorithm ( const struct asn1_cursor *cursor, * * - a standalone object identifier for the curve */ - if ( wrapper && asn1_check_algorithm ( cursor, wrapper, - &curve ) != 0 ) { + if ( ( wrapper == NULL ) || + ( asn1_check_algorithm ( cursor, wrapper, &curve ) != 0 ) ) { memcpy ( &curve, cursor, sizeof ( curve ) ); }