From: Bob Beck Date: Tue, 9 Dec 2025 16:01:16 +0000 (-0700) Subject: Add static_ASN1_SEQUENCE_END to the list of statment macros X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5b25812e250ca893a30744e789bf70bebb0e30fe;p=thirdparty%2Fopenssl.git Add static_ASN1_SEQUENCE_END to the list of statment macros This one is pretty special, we should ponder simplifying some of the clever preprocessor stuff here, but for now.. Reviewed-by: Matt Caswell Reviewed-by: Richard Levitte Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/29359) (cherry picked from commit ba4970afb5b60f022126b7fb3ee3c44cb9ceac8c) --- diff --git a/.clang-format b/.clang-format index 26ee4323a02..18b16e0de00 100644 --- a/.clang-format +++ b/.clang-format @@ -243,6 +243,7 @@ StatementMacros: - "ASN1_SEQUENCE_END_enc" - "ASN1_SEQUENCE_END_name" - "ASN1_SEQUENCE_END_ref" + - "static_ASN1_SEQUENCE_END" # This isn't quite right, but it causes clang-format to do a slightly better # job formatting this macro. - "ASN1_EX_TEMPLATE_TYPE" diff --git a/providers/implementations/encode_decode/decode_der2key.c.in b/providers/implementations/encode_decode/decode_der2key.c.in index aeb5b527c66..62a6a8777d7 100644 --- a/providers/implementations/encode_decode/decode_der2key.c.in +++ b/providers/implementations/encode_decode/decode_der2key.c.in @@ -64,11 +64,13 @@ ASN1_SEQUENCE(BARE_ALGOR) = { ASN1_SIMPLE(BARE_ALGOR, oid, ASN1_OBJECT), } static_ASN1_SEQUENCE_END(BARE_ALGOR) - ASN1_SEQUENCE(BARE_PUBKEY) - = { ASN1_EMBED(BARE_PUBKEY, algor, BARE_ALGOR), ASN1_SIMPLE(BARE_PUBKEY, pubkey, ASN1_BIT_STRING) } static_ASN1_SEQUENCE_END(BARE_PUBKEY) +ASN1_SEQUENCE(BARE_PUBKEY) = { + ASN1_EMBED(BARE_PUBKEY, algor, BARE_ALGOR), + ASN1_SIMPLE(BARE_PUBKEY, pubkey, ASN1_BIT_STRING) +} static_ASN1_SEQUENCE_END(BARE_PUBKEY) #endif /* OPENSSL_NO_SLH_DSA */ - struct der2key_ctx_st; /* Forward declaration */ +struct der2key_ctx_st; /* Forward declaration */ typedef int check_key_fn(void *, struct der2key_ctx_st *ctx); typedef void adjust_key_fn(void *, struct der2key_ctx_st *ctx); typedef void free_key_fn(void *);