diff options
author | Rich Salz <rsalz@akamai.com> | 2019-12-19 17:30:24 -0500 |
---|---|---|
committer | Tomas Mraz <tmraz@fedoraproject.org> | 2020-04-24 16:42:46 +0200 |
commit | 852c2ed260860b6b85c84f9fe96fb4d23d49c9f2 (patch) | |
tree | d8104686e0a02217c13f51e5d10d7434fa13e3dc /util | |
parent | 4692e98bdbaebb6f078e89a75c54395839e68b24 (diff) |
In OpenSSL builds, declare STACK for datatypes ...
... and only *define* them in the source files that need them.
Use DEFINE_OR_DECLARE which is set appropriately for internal builds
and not non-deprecated builds.
Deprecate stack-of-block
Better documentation
Move some ASN1 struct typedefs to types.h
Update ParseC to handle this. Most of all, ParseC needed to be more
consistent. The handlers are "recursive", in so far that they are called
again and again until they terminate, which depends entirely on what the
"massager" returns. There's a comment at the beginning of ParseC that
explains how that works. {Richard Levtte}
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/10669)
Diffstat (limited to 'util')
-rw-r--r-- | util/missingmacro.txt | 5 | ||||
-rw-r--r-- | util/perl/OpenSSL/ParseC.pm | 22 |
2 files changed, 27 insertions, 0 deletions
diff --git a/util/missingmacro.txt b/util/missingmacro.txt index ed0f61056f..2b02fef5f5 100644 --- a/util/missingmacro.txt +++ b/util/missingmacro.txt @@ -124,6 +124,11 @@ PKCS7_get_detached(3) PKCS7_is_detached(3) STACK_OF(3) SKM_DEFINE_STACK_OF(3) +DEFINE_OR_DECLARE_STACK_OF(3) +DEFINE_OR_DECLARE_STACK_OF_STRING(3) +DEFINE_OR_DECLARE_STACK_OF_CSTRING(3) +DEFINE_STACK_OF_STRING(3) +DEFINE_STACK_OF_CSTRING(3) U64(3) SSL_set_mtu(3) DTLS_set_link_mtu(3) diff --git a/util/perl/OpenSSL/ParseC.pm b/util/perl/OpenSSL/ParseC.pm index 6d615016b4..6d060bb77a 100644 --- a/util/perl/OpenSSL/ParseC.pm +++ b/util/perl/OpenSSL/ParseC.pm @@ -372,6 +372,28 @@ EOF { regexp => qr/DEFINE_STACK_OF_CONST<<<\((.*)\)>>>/, massager => sub { return ("SKM_DEFINE_STACK_OF($1,const $1,$1)"); }, }, + { regexp => qr/DEFINE_STACK_OF_STRING<<<\((.*?)\)>>>/, + massager => sub { + return ("DEFINE_SPECIAL_STACK_OF(OPENSSL_STRING, char)"); + } + }, + { regexp => qr/DEFINE_STACK_OF_CSTRING<<<\((.*?)\)>>>/, + massager => sub { + return ("DEFINE_SPECIAL_STACK_OF_CONST(OPENSSL_CSTRING, char)"); + } + }, + # DEFINE_OR_DECLARE macro calls must be interpretted as DEFINE macro + # calls, because that's what they look like to the external apps. + # (if that ever changes, we must change the substitutions to STACK_OF) + { regexp => qr/DEFINE_OR_DECLARE_STACK_OF<<<\((.*?)\)>>>/, + massager => sub { return ("DEFINE_STACK_OF($1)"); } + }, + { regexp => qr/DEFINE_OR_DECLARE_STACK_OF_STRING<<<\(\)>>>/, + massager => sub { return ("DEFINE_STACK_OF_STRING()"); }, + }, + { regexp => qr/DEFINE_OR_DECLARE_STACK_OF_CSTRING<<<\(\)>>>/, + massager => sub { return ("DEFINE_STACK_OF_CSTRING()"); }, + }, ##### # ASN1 stuff |