]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Add static_ASN1_SEQUENCE_END to the list of statment macros master
authorBob Beck <beck@openssl.org>
Tue, 9 Dec 2025 16:01:16 +0000 (09:01 -0700)
committerTomas Mraz <tomas@openssl.org>
Thu, 11 Dec 2025 12:21:19 +0000 (13:21 +0100)
This one is pretty special, we should ponder simplifying some of
the clever preprocessor stuff here, but for now..

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29359)

.clang-format
providers/implementations/encode_decode/decode_der2key.c

index 26ee4323a027387ba8ced58e64af1b5619c08943..18b16e0de006b6ded3575b243858cb22ec067e7d 100644 (file)
@@ -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"
index 8d89e64fe5b9190b2dd1f76aabf48ac8ff4ce3bd..b75d73b0fdf6eff345ea0c9305906dd6b01c685e 100644 (file)
@@ -60,11 +60,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 *);