summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2020-10-04 12:20:17 +0200
committerRichard Levitte <levitte@openssl.org>2020-10-12 08:29:30 +0200
commit895419b7d13bd9ba68718e6a25c92e52fd6fec7f (patch)
treea2cf0234923260a20f26ef3078c265a1926ec138 /util
parent053730c5b7e9f4d0e97108e01d0fce472f300edd (diff)
Add ASN1 declaration macros that take attributes
This makes it possible to easily deprecated selections of ASN1 functions. Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/13074)
Diffstat (limited to 'util')
-rw-r--r--util/perl/OpenSSL/ParseC.pm15
1 files changed, 15 insertions, 0 deletions
diff --git a/util/perl/OpenSSL/ParseC.pm b/util/perl/OpenSSL/ParseC.pm
index d7e7c40f1f..7e79011aea 100644
--- a/util/perl/OpenSSL/ParseC.pm
+++ b/util/perl/OpenSSL/ParseC.pm
@@ -507,6 +507,21 @@ int $2_dup(void);
EOF
}
},
+ # Universal translator of attributed PEM declarators
+ { regexp => qr/
+ DECLARE_ASN1
+ (_ENCODE_FUNCTIONS_only|_ENCODE_FUNCTIONS|_ENCODE_FUNCTIONS_name
+ |_ALLOC_FUNCTIONS_name|_ALLOC_FUNCTIONS|_FUNCTIONS_name|_FUNCTIONS
+ |_NDEF_FUNCTION|_PRINT_FUNCTION|_PRINT_FUNCTION_name
+ |_DUP_FUNCTION|_DUP_FUNCTION_name)
+ _attr
+ <<<\(\s*OSSL_DEPRECATEDIN_(.*?)\s*,(.*?)\)>>>
+ /x,
+ massager => sub { return (<<"EOF");
+DECLARE_ASN1$1($3)
+EOF
+ },
+ },
{ regexp => qr/DECLARE_PKCS12_SET_OF<<<\((.*)\)>>>/,
massager => sub { return (); }
},