summaryrefslogtreecommitdiff
path: root/util/perl
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2020-10-04 12:51:42 +0200
committerRichard Levitte <levitte@openssl.org>2020-10-12 08:29:31 +0200
commit3ad9c478642d6edf5964c8c890845d93b40cb9a0 (patch)
tree47877f793e2344f6f82505308e6cc8713332ba76 /util/perl
parent895419b7d13bd9ba68718e6a25c92e52fd6fec7f (diff)
downloadopenssl-new-3ad9c478642d6edf5964c8c890845d93b40cb9a0.tar.gz
Add PEM declaration macros that take attributes
This makes it possible to easily deprecated selections of PEM functions. Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/13074)
Diffstat (limited to 'util/perl')
-rw-r--r--util/perl/OpenSSL/ParseC.pm18
1 files changed, 15 insertions, 3 deletions
diff --git a/util/perl/OpenSSL/ParseC.pm b/util/perl/OpenSSL/ParseC.pm
index 7e79011aea..e08d4637b3 100644
--- a/util/perl/OpenSSL/ParseC.pm
+++ b/util/perl/OpenSSL/ParseC.pm
@@ -525,6 +525,9 @@ EOF
{ regexp => qr/DECLARE_PKCS12_SET_OF<<<\((.*)\)>>>/,
massager => sub { return (); }
},
+
+ #####
+ # PEM stuff
{ regexp => qr/DECLARE_PEM(?|_rw|_rw_cb|_rw_const)<<<\((.*?),.*\)>>>/,
massager => sub { return (<<"EOF");
#ifndef OPENSSL_NO_STDIO
@@ -536,9 +539,6 @@ int PEM_write_bio_$1(void);
EOF
},
},
-
- #####
- # PEM stuff
{ regexp => qr/DECLARE_PEM(?|_write|_write_cb|_write_const)<<<\((.*?),.*\)>>>/,
massager => sub { return (<<"EOF");
#ifndef OPENSSL_NO_STDIO
@@ -557,6 +557,18 @@ int PEM_read_bio_$1(void);
EOF
},
},
+ # Universal translator of attributed PEM declarators
+ { regexp => qr/
+ DECLARE_PEM
+ (_rw|_rw_cb|_rw_const|_write|_write_cb|_write_const|_read|_read_cb)
+ _attr
+ <<<\(\s*OSSL_DEPRECATEDIN_(.*?)\s*,(.*?)\)>>>
+ /x,
+ massager => sub { return (<<"EOF");
+DECLARE_PEM$1($3)
+EOF
+ },
+ },
# Spurious stuff found in the OpenSSL headers
# Usually, these are just macros that expand to, well, something