[crypto] Fix identification of non-wrapped elliptic curve identifiers

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2025-12-22 16:13:21 +00:00
parent 5aab6b7a31
commit 3832147944

View File

@@ -667,8 +667,8 @@ int asn1_curve_algorithm ( const struct asn1_cursor *cursor,
* *
* - a standalone object identifier for the curve * - a standalone object identifier for the curve
*/ */
if ( wrapper && asn1_check_algorithm ( cursor, wrapper, if ( ( wrapper == NULL ) ||
&curve ) != 0 ) { ( asn1_check_algorithm ( cursor, wrapper, &curve ) != 0 ) ) {
memcpy ( &curve, cursor, sizeof ( curve ) ); memcpy ( &curve, cursor, sizeof ( curve ) );
} }