diff options
author | Richard Levitte <levitte@openssl.org> | 2020-09-14 11:30:14 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2020-12-05 11:09:20 +0100 |
commit | 9256e8a2487697c347f8e54db69509dc662b26f7 (patch) | |
tree | a7756aa28aeaa909797fa1cce59aa6874b8dbddf /util/perl/OpenSSL/ParseC.pm | |
parent | 030da84412c5e01c070a580ad237e713c2057626 (diff) |
PEM: Add a more generic way to implement PEM _ex functions for libctx
This also adds the following functions, for completeness:
PEM_write_PrivateKey_ex(), PEM_write_bio_PrivateKey_ex(),
PEM_write_PUBKEY_ex, PEM_write_bio_PUBKEY_ex
Fixes #13542
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/13547)
Diffstat (limited to 'util/perl/OpenSSL/ParseC.pm')
-rw-r--r-- | util/perl/OpenSSL/ParseC.pm | 40 |
1 files changed, 39 insertions, 1 deletions
diff --git a/util/perl/OpenSSL/ParseC.pm b/util/perl/OpenSSL/ParseC.pm index 5cc5f28bf3..f4e5783e98 100644 --- a/util/perl/OpenSSL/ParseC.pm +++ b/util/perl/OpenSSL/ParseC.pm @@ -553,6 +553,21 @@ int PEM_write_bio_$1(void); EOF }, }, + { regexp => qr/DECLARE_PEM(?|_rw|_rw_cb|_rw_const)_ex<<<\((.*?),.*\)>>>/, + massager => sub { return (<<"EOF"); +#ifndef OPENSSL_NO_STDIO +int PEM_read_$1(void); +int PEM_write_$1(void); +int PEM_read_$1_ex(void); +int PEM_write_$1_ex(void); +#endif +int PEM_read_bio_$1(void); +int PEM_write_bio_$1(void); +int PEM_read_bio_$1_ex(void); +int PEM_write_bio_$1_ex(void); +EOF + }, + }, { regexp => qr/DECLARE_PEM(?|_write|_write_cb|_write_const)<<<\((.*?),.*\)>>>/, massager => sub { return (<<"EOF"); #ifndef OPENSSL_NO_STDIO @@ -562,6 +577,17 @@ int PEM_write_bio_$1(void); EOF }, }, + { regexp => qr/DECLARE_PEM(?|_write|_write_cb|_write_const)_ex<<<\((.*?),.*\)>>>/, + massager => sub { return (<<"EOF"); +#ifndef OPENSSL_NO_STDIO +int PEM_write_$1(void); +int PEM_write_$1_ex(void); +#endif +int PEM_write_bio_$1(void); +int PEM_write_bio_$1_ex(void); +EOF + }, + }, { regexp => qr/DECLARE_PEM(?|_read|_read_cb)<<<\((.*?),.*\)>>>/, massager => sub { return (<<"EOF"); #ifndef OPENSSL_NO_STDIO @@ -571,10 +597,22 @@ int PEM_read_bio_$1(void); EOF }, }, + { regexp => qr/DECLARE_PEM(?|_read|_read_cb)_ex<<<\((.*?),.*\)>>>/, + massager => sub { return (<<"EOF"); +#ifndef OPENSSL_NO_STDIO +int PEM_read_$1(void); +int PEM_read_$1_ex(void); +#endif +int PEM_read_bio_$1(void); +int PEM_read_bio_$1_ex(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) + ((?:_rw|_rw_cb|_rw_const|_write|_write_cb|_write_const|_read|_read_cb) + (?:_ex)?) _attr <<<\(\s*OSSL_DEPRECATEDIN_(.*?)\s*,(.*?)\)>>> /x, |